We noticed that the pprepair output file with the triangulation contains invalid polygons. Upon inspection, the triangulation contains some elements that are actually points or lines. You can reproduce this error with any of the Brasil, Enumeration District files.
We ran:
pprepair -i file.shp -v --outtr triang.shp
(pprepair-new version, from maybe a week ago)
Then imported triang.shp in Postgis, and tested the Validity of the polygons ( ST_IsValid). A small fraction of the polygons are invalid. After fixing them in POSTGIS (ST_MakeValid) the invalid polygons all became either points or lines (I'll post a follow up comment with frequency of such problems).
Visual inspection seemed to indicate that these invalid polygons were "redundant" (i.e. for every point/line (invalid polygon) there were two valid triangles for which borders coincide with the point/line. So I just deleted the invalid polygons. However, after deleting the triangulation is no longer is a planar partition. I tried running ST_Union on the "cleaned" triangulation and got "non noded intersection" error messages.
PS: we finally gave up installing pprepair on Linux and installed it on a MAC-OS (in fact VirtualBox inside another machine). So now we think we have an environment similar to what the developers use.
We noticed that the pprepair output file with the triangulation contains invalid polygons. Upon inspection, the triangulation contains some elements that are actually points or lines. You can reproduce this error with any of the Brasil, Enumeration District files.
We ran: pprepair -i file.shp -v --outtr triang.shp (pprepair-new version, from maybe a week ago)
Then imported triang.shp in Postgis, and tested the Validity of the polygons ( ST_IsValid). A small fraction of the polygons are invalid. After fixing them in POSTGIS (ST_MakeValid) the invalid polygons all became either points or lines (I'll post a follow up comment with frequency of such problems).
Visual inspection seemed to indicate that these invalid polygons were "redundant" (i.e. for every point/line (invalid polygon) there were two valid triangles for which borders coincide with the point/line. So I just deleted the invalid polygons. However, after deleting the triangulation is no longer is a planar partition. I tried running ST_Union on the "cleaned" triangulation and got "non noded intersection" error messages.
PS: we finally gave up installing pprepair on Linux and installed it on a MAC-OS (in fact VirtualBox inside another machine). So now we think we have an environment similar to what the developers use.