[GRASS-user] How to import KML polygons in GRASS?

Nikos Alexandris nikos.alexandris at felis.uni-freiburg.de
Tue Mar 4 19:36:45 EST 2008


Just for the records:

a. kml2html

             1. Rename "Korinthia_estimate_2007.kml" to
                "Korinthia_estimate_2007.xml"  and save on the same
                directory with "kml2html.xsl." [1]
             2. Edit the xml file and replace 
                
                 <kml xmlns="http://earth.google.com/kml/2.2">
                
                with
                
                 <?xml-stylesheet type="text/xsl" href="kml2html.xsl" ?>
                 <kml>
                
             3. Save and open with a browser to read content

b. kml2gml

     1. (Same as above but this time save with kml2gml [2])
     2. (Same as above but this time replace with
        
         <?xml-stylesheet type="text/xsl" href="kml2gml.xsl" ?>
         <kml>
        
     3. Open xml with browser and save as gml file
     4. Open with... QGIS for example

c. Of course the easiest way is to get kml read/write support for OGR
and open directly kml files with OpenEV, QGIS    or    convert directly
with ogr2ogr in other formats.

[1] http://tilaphos.googlepages.com/kml2html.xsl

[2] http://spanring.name/blog/wp-content/files/kml2gml.xsl



More information about the grass-user mailing list