Closed kchebani closed 11 months ago
Thanks for the issue report @kchebani. I found the fix for this issue. You were right it is in the _resolve_coords()
function. On line
feat["coordinates"] = lofl[0] if len(lofl) == 1 else lofl
It was taking index 0
of the list if it is a single coordinate, regardless if the geometry type is a Point or MultiPoint. This was wrong as you found out.
Thank again for the report!
Thanks for your kind work !
Hi,
I import a MultiPoint Collection to a Topology object :
Example using MultiPoint objects with more than one point
This Works fine π
Example using MultiPoint objects with only one point
This code results in :
After some investigations I found out that the problem is coming from this part of topojson code (core/topology.py) :
This part of the code flattens the multidimensionnal array of the MultiPoint to a simple coordinates array like a Point, wich result to the Shapely Error.
Am I doing something wrong ?