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.78k stars 368 forks source link

Ring self-intersection geometry error for `Goiás` (ne_id=1159309897) #682

Open missinglink opened 2 years ago

missinglink commented 2 years ago
spatialite -silent natural_earth_vector.sqlite <<SQL
  SELECT ST_IsValid(GeometryFromWKB(GEOMETRY))
  FROM ne_50m_admin_1_states_provinces
  WHERE ne_id = 1159309897;
SQL

GEOS warning: Ring Self-intersection at or near point -47.301971256231354 -16.039181749021921
0

[edit] might also pay to check 1159320575 in 10m accuracy

missinglink commented 2 years ago

file downloaded today from http://naciscdn.org/naturalearth/packages/natural_earth_vector.sqlite.zip

shasum natural_earth_vector.sqlite
135d22926b1b2ccd9e3fe5a35a96dfd2809dcc60

md5sum natural_earth_vector.sqlite
ca3cf8a1f4d087ef3efe432ad4a04ee6
GEOS version ........: 3.8.1-CAPI-1.13.3
nvkelso commented 2 years ago

Hey Peter. Do you see the problem when you independently import the source shapefile into SQLite? My guess is there is config I'm not setting. The geoms are generated by mapshaper so I'd be surprised there was a problem in the shape.

nvkelso commented 2 years ago

Also why are you using the 50m file not 10m?

missinglink commented 2 years ago

good question, it was some old code I revived, the same issue exists for the 10m table:

spatialite -silent natural_earth_vector.sqlite.db <<SQL
  SELECT ST_IsValid(GeometryFromWKB(GEOMETRY))
  FROM ne_10m_admin_1_states_provinces
  WHERE ne_id = 1159309897;
SQL

GEOS warning: Ring Self-intersection at or near point -47.302481858850683 -16.040054212431983
0
missinglink commented 2 years ago

I loaded ne_10m_admin_1_states_provinces.shp in QGIS and it also detected the error, it seems to be this shared point:

Screenshot 2022-02-10 at 17 47 41