1

I have a Street network stored in a Postgis database. All streets are represented by Linestrings. For a further Intersection with a DEM height raster, I would like to split the linestrings in smaller parts.

In a first step, I have segmented all linestring with ST_DumpSegments(). Some parts are still too long and I would like to divide them further. Preferably, all segments larger than 10 meters should be split in half (thirds) again. I have already tried ST_LineInterpolatePoints() with ST_splitlines(), but have not yet found a workable solution.

3
  • 2
    Have you found ST_Segmentize postgis.net/docs/ST_Segmentize.html?
    – user30184
    Nov 29, 2022 at 10:32
  • 1
    Here's a set of functions to extract segments based on maximum segment length or segment count.
    – geozelot
    Nov 29, 2022 at 12:28
  • Thank you for the answers. I have tried ST_Segmentize() and it works fine. Thanks also for the set of functions. But somehow I can't get them to work. Somehow I get only two rows with the correct length returned. Is there something in particular I need to consider?
    – denali11
    Dec 1, 2022 at 13:39

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.