GenericGEkml2csv.bash

From Open Foris Wiki

Jump to: navigation, search

This script performs conversion from a set of generic .kml format polygons created in Google Earth (GE) into one combined textfile. This textfile can then be converted into a shapefile using script genericCsvToPolygon.py

The procedure is:

1. Put the kml's into one folder

2. Launch genericGEkml2csv.bash in that kml-folder. This creates a csv file "output.csv"

genericGEkml2csv.bash

3. Launch genericCsvToPolygon.py in the same folder, with parameters as follows:

genericCsvToPolygon.py output.csv output.shp 

The shapefile name can be as you wish (e.g. settlements168063.shp).

The shapefile is in geographic WGS84, but does not carry that information. You can transform it e.g. into UTM 36S WGS84 with the following command - Input: output.shp; Output: proj_output.shp:

ogr2ogr -s_srs EPSG:4326 -t_srs EPSG:32736 proj_output.shp output.shp 

Where EPSG:4326 stands for WGS84 (source system) and EPSG:32736 for UTM 36S WGS84 (target system). You can select any target system and find the EPSG code, see http://spatialreference.org/ref/epsg/



Back to Open Foris Toolkit Main Page

Back to Tools & Exercises



Personal tools