[postgis-users] Create points along line

Paolo Corti pcorti at gmail.com
Wed Sep 12 07:55:33 PDT 2012


On Wed, Sep 12, 2012 at 3:56 PM, Martin Fafard
<martin.fafard at geoprojection.com> wrote:
> Hi
>
> How can I create points at every X "meters" along a line?
>

Use ST_Segmentize and then ST_DumpPoints, like this:

SELECT ST_AsText((dp).geom) As wkt_geom FROM (
	SELECT ST_DumpPoints(ST_Segmentize
	(ST_GeomFromText('MULTILINESTRING((-29 -27,-30 -29.7,-36 -31,-45
-33),(-45 -33,-46 -32))'),
	1)) AS dp
) AS foo

p

-- 
Paolo Corti
Geospatial software developer
web: http://www.paolocorti.net
twitter: @capooti
skype: capooti



More information about the postgis-users mailing list