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.

What is multiline string in gis? I have found when I use pgrouting certain edges have this geometric property mentioned as multiline string.

I am not sure what's the purpose of this geometry and how it actually defines an edge. Any insights?

share|improve this question

1 Answer 1

up vote 6 down vote accepted

A LINESTRING object consists of one and only one line with n vertices.

A MULTILINESTRING object consists of 1 to m LINESTRINGs.

In case of a routing network, it's not obvious to me why MULTILINESTRINGs would be used. If you plan to use pgRouting's shortest path function, the geometries are irrelevant anyway since it only needs source and target vertex ids for every edge.

share|improve this answer
1  
One example where I've seen multilinestrings in routing networks is where they allow the string to be segmented based on speed limit, like a road network. –  SaultDon May 2 '12 at 17:15
    
NVM, got mixed up again with multipart vs singlepart geometries =) –  SaultDon May 2 '12 at 17:18
    
I think you often have MULTILINESTRING geometries in a PostgreSQL geometry table when you import data from a Shape file. It doesn't hurt if you only have LINESTRING objects in a table with a MULTILINESTRING geometry column. –  dkastl May 3 '12 at 0:28

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.