I'm looking to convert Park polygons from OSM into points.
The QGIS fTools Extract Nodes tool will convert a polygon to points at the vertices.
What is the equivalent function or work-flow in PostGIS?
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.
Sign up to join this communityI'm looking to convert Park polygons from OSM into points.
The QGIS fTools Extract Nodes tool will convert a polygon to points at the vertices.
What is the equivalent function or work-flow in PostGIS?
Yo can use ST_DumpPoints(geom) to get the points listed.
Look at the example how to use it.
The result contains both the geometry and a path telling where in the polygon the point belongs. So to just get the geometry (points) do like this:
SELECT (ST_DumpPoints(the_geom)).geom
SELECT (g).path[1], (g).geom FROM (SELECT ST_DumpPoints(geom) As g FROM sometable) As f;
Feb 24, 2015 at 6:41