Saturday, 17 March 2018

postgis - Merging multipolygon data into a polygon



I have a MultiPolygon representation of some shapes in POSTGIS, I am trying to convert them to Polygon data.


I tried, st_geometryn(r.geom, 1) but that didnt work because the way polygons are embedded I think. Just returns a partial.


Tried ST_ConcaveHull(ST_Collect(r.geom), 0.99), no luck returns nothing


Tried:


SELECT f.gid, ST_AsGeoJSON(ST_Union(f.geom)) as singlegeom FROM (SELECT gid, 
(ST_Dump(geom)).geom As geom FROM public.nyc_boroughs ) As f GROUP BY gid"

but getting back to Multi Polygon,


I feel like a little bit of direction could help me figure out.


Data is here http://www.sendspace.com/file/2savyw





No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...