[postgis-users] Node Polygon Intersections

Lucas Ferreira Mation lucasmation at gmail.com
Wed Jan 6 10:55:59 PST 2016


I am trying to fix some "small area" polygons that have gaps and overlaps
in between them. The data is available here
<ftp://geoftp.ibge.gov.br/malhas_digitais/censo_2010/setores_censitarios/ac/ac_setores_censitarios.zip>
(this
is for a small state for "prototyping", I'll also need to replicate to the
remaining 26 states in Brasil). I've already tryed pprepair and to create a
postgis topology, and always get errors (the topology problems I'll report
in a different question). So I figured I would try a more step by step
approach.

The first step is node all polygon intersections. Is there a simple way to
do this in Postgis, making sure that all polygons involved in an
intersection have "nodes" at the intersection point?

How does Postgis handdles the cases where the coordinates of the
 intersection (of the polygon borders) canĀ“t be represented with double
precision?


The closest to a solution I could was this tread
<http://gis.stackexchange.com/questions/83/separate-polygons-based-on-intersection-using-postgis>,
suggesting this aproach: ST_ExteriorRing(geom) > ST_Union()
>  ST_Polygonize() > ST_Dump() > new_geom. The problem I find with this
aproach is that the ST_Union() step looses the IDs of the original
polygons, and , thus, we would need to intersect back the "new_geom" to the
original polygons to recover the ids, and then reconstruct the original
polygons. The second problem is that, because of the gaps between polygons,
ST_Union() generally does not work  in this data.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20160106/cb825ffe/attachment.html>


More information about the postgis-users mailing list