Hi,
I’m trying to load shapefiles onto a database by using pg_srgtool. The problem is that for some shapefiles there are lots of notices that say “Ring Self-intersection at or near point …”. I was wondering how I can fix this issue?
Attached is the screenshot of the notice.
We haven’t encountered this issue with that shapefile, although have seen it with some others. It is usually not an issue worth fixing: the surrogate tool will run through and you will get good results. There are ways to use GIS tools (Arc, QGIS, ogr/gdal, etc.) to attempt to correct these types of issues if you find that the results are not good – but this is probably in localized areas. The most common methods are st_makevalid (in SQL) or applying a small negative buffer.
Are the desired surrogates being generated or is the software failing?
1 Like
When loading shapefiles, the SurrogateToolsDB scripts automatically call the PostGIS function ST_MakeValid which checks and fixes geometry problems. This step causes the NOTICEs seen in the logs.
1 Like