You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to be able to compute a "center" point for the largest landmasses in the geometries for the countries. The shapely.ops.polylabel function implements a good algorithm for doing that.
I need to be able to compute a "center" point for the largest landmasses in the geometries for the countries. The shapely.ops.polylabel function implements a good algorithm for doing that.
Note that if I use the 50m (https://github.com/AshKyd/geojson-regions/blob/master/countries/50m/SDN.geojson) version of the file, polylabel works.
Unfortunately, the geometry defined by SDN.geojson is invalid. Shapely's explain_validity function returns the following information:
make_valid generates the following error:
I suggest updating how the geometries are computed so they are guaranteed to be valid. There are several other invalid geometries in the dataset.
A script that generates the error is:
The data is the SDN.geojson file located at https://github.com/AshKyd/geojson-regions/blob/master/countries/110m/SDN.geojson
(removed some of the "properties" for simplicity). It will draw correctly.
The text was updated successfully, but these errors were encountered: