Created
August 11, 2013 16:11
-
-
Save mojodna/6205513 to your computer and use it in GitHub Desktop.
Break a LINESTRING or MULTILINESTRING into its constituent points with PostGIS.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT ST_AsText( | |
ST_PointN( | |
way, | |
generate_series(1, ST_NPoints(way)) | |
) | |
) | |
FROM ( | |
SELECT (ST_Dump(way)).geom AS way | |
FROM planet_osm_line WHERE osm_id=25813470) AS dumped; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment