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?

enter image description here

  • I will confess that the other question goes a step further to get coordinates, and not just using st_dump to get the points, so my flag of duplicate may have been a bit hasty. I apologize if you consider this to be significantly different to not warrant marking as a duplicate.
    – Chris W
    Feb 22, 2015 at 21:08

1 Answer 1


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
  • I'm struggling with visualizing this result - any thoughts? Is that what 'i' is? Feb 24, 2015 at 4:54
  • mapBaker -- what are you using for visualizing. Not sure what Nicklas meant by i. There is a path property which is an array of integers defining depth in geometry. You should be able to visualize this in QGIS DbManager with - SELECT (g).path[1], (g).geom FROM (SELECT ST_DumpPoints(geom) As g FROM sometable) As f;
    – Regina Obe
    Feb 24, 2015 at 6:41
  • Just a typo. It should have been "it" :-) Feb 24, 2015 at 6:51
  • @LR1234567 I can only get PATH values of '1' for that query. I am getting back the correct number of nodes, so for now, I'll say I need to work on my workflow for how to use these points... Thank you both! Feb 24, 2015 at 17:12
  • If you have polygons/multipolygs path[1] is the index of the polygon the point belongs to. Not interesting unless you have a multipolygon. path[2] would be the ring . path[3] would be the index position of the point in the ring. So I'm guessing maybe what you want is path[3]
    – Regina Obe
    Feb 24, 2015 at 21:06

Not the answer you're looking for? Browse other questions tagged or ask your own question.