tags:

views:

188

answers:

2

I know this is a total newbie question, but I happen to be a total newbie when it comes to KML. I am working on a GIS project using KML and I keep running into this multiple geometry issue. I want to programmatically determine when I need to encapsulate my <LineString /> points in a <MultiGeometry /> tag and when I don't. Is it when a line string crosses itself on the same layer? When two points are at the same location on the same layer?

+2  A: 

As far as I can see, kml is not that strict. Self crossing is allowed in a linestring:

<Placemark>
    <name>Naamloos Pad</name>
    <styleUrl>#msn_ylw-pushpin</styleUrl>
    <LineString>
     <tessellate>1</tessellate>
     <coordinates>
5.019464180902406,52.10505844756909,0 5.069557791548087,52.0007202857575,0 4.962895009539523,51.98018815537707,0 4.962744723288588,52.01668088418433,0 5.09205958631246,52.0401464921085,0 </coordinates>
    </LineString>
</Placemark>

So that will form no limitation. Use the MultiGeometry only if you want to combine different sources into one kml geometry object.

milovanderlinden
Thanks, I found where the issue was. You put me onto the right track!
Heat Miser
Glad I could be of help! You are welcome!
milovanderlinden
A: 

i have two points on map which is attached by a line in short showing a path from one city to another city. now i want the name of all cities coming on that line.....

i.e i want the name of all cities coming between that two cities plz can anubody help me.....

palak