Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I need a function that gets the Nth LineString from a MultiLineString in PostGIS, somthing like ST_PointN that gets the Nth point from a LineString.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

you can use ST_GeometryN(geometry,int). similar to ST_PointN(geometry,int) the index is 1-based.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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