I need help splitting a linestring into smaller linestrings, using PostGIS
.
I need to route to closest point on the linestring, so I need to have more points on the line
Sample Linestring = LINESTRING(11.959813031048 55.3269904906477,11.9613429171704 55.3257458375313,11.9656473425314 55.325719907258,11.9675402524794 55.3251753715195)
I have no luck with the following
select st_astext(st_segmentize(st_linefromtext('LINESTRING(11.959813031048 55.3269904906477,11.9613429171704 55.3257458375313,11.9656473425314 55.325719907258,11.9675402524794 55.3251753715195)'
),2) ) as geom
But something is missing? I would like to have my line split into lines max 10 meters between points.
I hope somebody could get me back on track.
I then dump the line into points
select st_astext((st_dumpPoints(st_segmentize(st_linefromtext('LINESTRING(11.959813031048 55.3269904906477,11.9613429171704 55.3257458375313,11.9656473425314 55.325719907258,11.9675402524794 55.3251753715195)'
),10 ))).geom) as geom