nvkelso / natural-earth-vector

A global, public domain map dataset available at three scales and featuring tightly integrated vector and raster data.
https://www.naturalearthdata.com/
Other
1.77k stars 368 forks source link

North Carolina geometry in `admin_1_states_provinces` at 110m resolution is invalid #917

Open asinghvi17 opened 3 months ago

asinghvi17 commented 3 months ago

This is the North Carolina geometry (index 37). GEOS claims the geometry is invalid, and having GEOS fix it results in a geometry collection with a linestring and a polygon (see below).

After correction via GEOSMakeValid_r download-3

GEOMETRYCOLLECTION (POLYGON ((-84.32096862792969 34.986961364746094, -84.29875183105469 35.19862747192383, -84.08708190917969 35.2615966796875, -84.01776123046875 35.36900329589844, -83.87596130371094 35.490211486816406, -83.67328643798828 35.51667022705078, -83.43833923339844 35.562686920166016, -83.20972442626953 35.64896011352539, -83.11078643798828 35.737327575683594, -82.92028045654297 35.81721878051758, -82.92557525634766 35.88972091674805, -82.67422485351562 36.02519226074219, -82.59324645996094 35.93734359741211, -82.22389221191406 36.125728607177734, -82.0513916015625 36.106143951416016, -81.89739990234375 36.27391052246094, -81.69366455078125 36.317291259765625, -81.70477294921875 36.46015167236328, -81.67937469482422 36.5855712890625, -79.99239349365234 36.54219055175781, -77.99954986572266 36.537437438964844, -76.94121551513672 36.54588317871094, -75.99324798583984 36.55056381225586, -75.86808013916016 36.55118179321289, -75.72731018066406 35.55051803588867, -76.36337280273438 34.808624267578125, -77.39763641357422 34.51200866699219, -78.05496215820312 33.92546844482422, -78.55411529541016 33.86142349243164, -79.67278289794922 34.80756759643555, -80.78351593017578 34.81764221191406, -80.78085327148438 34.934043884277344, -80.93748474121094 35.10338592529297, -81.03801727294922 35.0372428894043, -81.04597473144531 35.125606536865234, -81.51426696777344 35.171653747558594, -82.43661499023438 35.18009948730469, -82.97637939453125 35.008663177490234, -83.07637023925781 34.979026794433594, -84.32096862792969 34.986961364746094)), LINESTRING (-81.67937469482422 36.5855712890625, -82.06990051269531 36.57048416137695))

Original download-4

POLYGON ((-83.07637023925781 34.979026794433594, -84.32096862792969 34.986961364746094, -84.29875183105469 35.19862747192383, -84.08708190917969 35.2615966796875, -84.01776123046875 35.36900329589844, -83.87596130371094 35.490211486816406, -83.67328643798828 35.51667022705078, -83.43833923339844 35.562686920166016, -83.20972442626953 35.64896011352539, -83.11078643798828 35.737327575683594, -82.92028045654297 35.81721878051758, -82.92557525634766 35.88972091674805, -82.67422485351562 36.02519226074219, -82.59324645996094 35.93734359741211, -82.22389221191406 36.125728607177734, -82.0513916015625 36.106143951416016, -81.89739990234375 36.27391052246094, -81.69366455078125 36.317291259765625, -81.70477294921875 36.46015167236328, -81.67937469482422 36.5855712890625, -82.06990051269531 36.57048416137695, -81.67937469482422 36.5855712890625, -79.99239349365234 36.54219055175781, -77.99954986572266 36.537437438964844, -76.94121551513672 36.54588317871094, -75.99324798583984 36.55056381225586, -75.86808013916016 36.55118179321289, -75.86808013916016 36.55118179321289, -75.72731018066406 35.55051803588867, -76.36337280273438 34.808624267578125, -77.39763641357422 34.51200866699219, -78.05496215820312 33.92546844482422, -78.55411529541016 33.86142349243164, -79.67278289794922 34.80756759643555, -80.78351593017578 34.81764221191406, -80.78085327148438 34.934043884277344, -80.93748474121094 35.10338592529297, -81.03801727294922 35.0372428894043, -81.04597473144531 35.125606536865234, -81.51426696777344 35.171653747558594, -82.43661499023438 35.18009948730469, -82.97637939453125 35.008663177490234, -83.07637023925781 34.979026794433594))

I've included WKT versions of each geometry for convenience, hope it helps.

What's the best way to proceed from here?