Issue: Creating a polygon shape from list of coordinates does not work
I was trying to construct a polygon or MultiPolygon from a list of coordinates that I received in a geojson. This did not work. Instead I had to use import shape from shapely.geometry and pass into shape(geojson) the geometry section of the response for example:
Result:
res = { 'type': 'MultiPolygon', 'coordinates' : [[[[ ]]]]}
Does not work:
MultiPolygon(res[coordinates])
does work:
shape(res)
Just wanted to put this here for people struggling to create a polygon from coordinates in the future.
This looks like a usage question. This feedstock is only about the community curated conda package. You'll have better chances at Stackoverflow or a mailing list for shapely.
Issue: Creating a polygon shape from list of coordinates does not work
I was trying to construct a polygon or MultiPolygon from a list of coordinates that I received in a geojson. This did not work. Instead I had to use import shape from shapely.geometry and pass into shape(geojson) the geometry section of the response for example:
Result: res = { 'type': 'MultiPolygon', 'coordinates' : [[[[ ]]]]}
Does not work: MultiPolygon(res[coordinates])
does work: shape(res)
Just wanted to put this here for people struggling to create a polygon from coordinates in the future.