[R] Reading location info from kml files

fbielejec fbielejec at gmail.com
Sat Nov 13 13:40:57 CET 2010


Dear,
I have a bunch of kml files in the general form: 

    <Folder>
      <name>discrete rates with bayes factor larger than 3.0</name>
      <Placemark>
        <name>rate1_part1</name>
        <styleUrl>#rate1_style</styleUrl>
        <LineString>
          <altitudeMode>relativeToGround</altitudeMode>
          <tessellate>1</tessellate>
          <coordinates>-17.3333,14.75,0.0
    -17.3257204,14.737026,1024.9356539689436</coordinates> </LineString>
      </Placemark>
      
      ...
      
        </Folder>
  </Document>
</kml>

I would like to parse the coordinates and names from them to eventually
have sth of the form: 

-17.3333,    	14.75,		0.0,
rate1_part1, -17.3257204, 	14.737026,
1024.9356539689436,     rate1_part1,

So far I have only found function getKMLcoordinates (maptools), which
does parse the Latitude an dLongitude but not the location names. What
else can I use here?



More information about the R-help mailing list