<div dir="ltr">I am trying to fix some "small area" polygons that have gaps and overlaps in between them. The data is available <a href=" ftp://geoftp.ibge.gov.br/malhas_digitais/censo_2010/setores_censitarios/ac/ac_setores_censitarios.zip">here</a> (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. <div><br></div><div>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?</div><div><br></div><div>How does Postgis handdles the cases where the coordinates of the  intersection (of the polygon borders) can´t be represented with double precision?</div><div><br></div><div><br></div><div>The closest to a solution I could was <a href="http://gis.stackexchange.com/questions/83/separate-polygons-based-on-intersection-using-postgis">this tread</a>, 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. </div><div><br></div><div><br></div><div><br></div><div><br><div><br></div><div><br><div><br></div><div><br></div><div><br><div><br></div><div><br><div><br></div><div><br></div></div></div></div></div></div>