[postgis-users] Splitting/merging linework into equal interval linestrings
Dane Blakely Springmeyer
blake at hailmail.net
Wed Jul 9 20:24:35 PDT 2008
PostGIS users,
I have 1:24k hydrographic linework that I need process in several
successive steps using a postgis workflow.
I'm stuck at step 2 of this overall workflow:
1) separate all linestrings into distinct Strahler Order groups (done)
2) split all linework into linestrings of 500 ft (while avoiding any
linestring fragments smaller than 500 ft)
3) perform an elevation lookup to raster data to calculate the gradient
of each 500 ft segment
and..
4) combine all adjacent linestrings which fall into similar gradient
classes.
For step 2 I'm investigating using ST_Segmentize() and/or
ST_Line_substring(), but I'd really appreciate some help with how to
best approach the problem.
ST_Segmentize seems to only insert more nodes/points into already very
high resolution linework (ie nodes already exist at intervals much more
frequent than 500ft), thus extracting linestrings from the result of
ST_Segmentize clearly isn't as simple as using MakeLine() between each
segment.
ST_Line_Substring works on percentages which is smart, but I have yet to
wrap my mind around how to measure each individual line such that I can
translate percentage distance along a linestring into equal distance
intervals.
Anyone have examples or guidance?
Thanks,
Dane
More information about the postgis-users
mailing list