2

I need to use the function ST_OffsetCurve for a multilinestring, but PostgreSQL gives me the error that the function is only for Linestrings. Is there a way arround?

I want to use the function beceause I need to check if 2 lines (multilinestrings actually) are located at contrary sided of another multilinestring. For example, I need to find 2 lines, 1 on the right and 1 on the left side of the road (and the road is located by a line). I wanted to do this check by performing the ST_OffsetCurve function and the ST_Distance function. (if a line is on the right side of the road an you perform an offset to the right, the distance between the lines gets bigger).

I hope this was understandable, so;

  • Is there a way to use ST_OffsetCurce for Multilinestrings ?
  • Is there maybe another way to achieve what I want ?

Thanks!

3

Your question probably requires a much more complex answer than this, but I'm just going to say that you may be able to use the following query to get the data you are looking for, to use the ST_OffsetCurve method:

SELECT  ST_OffsetCurve(theGeom, 2, 'quad_segs=4 join=round') AS theOffset
FROM    (
          SELECT (ST_Dump("Shape")).geom AS theGeom
          FROM tiger."MultiLine_DT_0"
        ) AS subQuery;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.