I've been reading a number of related threads about ST_Union, ST_SnapToGrid and ST_Dump but I haven't been able to solve my problem.
The problem is I am trying to merge Tiger/line census tracts that have been simplified but I get gaps where the tracts aren't flush. I simplified the tracts with ST_SimplifyPreserveTopology(geom, .0003) and I'm running ST_Union(ST_SnapToGrid(geom, .00001)) but I still get gaps. I've also tried using ST_SnapToGrid around of the initial simplification but I don't see a difference. I've also tried wrapping ST_Dump around the Union but I don't see a difference there either.
I thought ST_ExteriorRing was promising but my GROUP BY creates three concentric polygons (doughnuts) and ST_ExteriorRing seems to create three overlapping circles. Unless I'm doing something wrong.
I'm outputting my query as geojson and putting that on a leaflet map. Here is what those gaps look like at different zoom levels.
If anyone has any ideas on making a gapless polygon of census tracts under 80mb I'm all ears.
relation "topology" does not exist
error when trying to do topology.toTopoGeom() and my results shapefile has 0 rows. The other topology functions work, though. This is the starting shapefile www2.census.gov/geo/tiger/TIGER2010DP1/Tract_2010Census_DP1.zipCREATE EXTENSION postgis_topology;