addadd-thickarrow-downaxebreadcrumb dividercameracc-compulsarychatclosecontactdata-usersdebugdevelopersdismissdocumentserrorglossaryinfolinkpublisherssearchselect-dropdownsuccesstableswarning

Publishers

Everything you need to know to publish and share data.

  1. Home
  2. Publishers
  3. File Formats & Data Types
  4. Converting KML files

Converting KML files

At this stage, Koordinates does not support import of KML files. In order to import KML data you will need to convert it to a data type we support.

This is a relatively technical process, and the following guide is aimed at people with some experience in GIS.

1

Access ogr2ogr

To convert KML data, we recommend you use the command line tool ogr2ogr, part of the open source GDAL software package.

GDAL executables are available from this page: Downloading GDAL Binaries

2

Convert to Shapefile

KML files can be converted to Shapefile with the following command:

ogr2ogr -where "OGR_GEOMETRY='POLYGON'" /output_path/output_shapefile_polygons.shp /input_path/input_kml_file.kml

ogr2ogr -where "OGR_GEOMETRY='POINT'" /output_path/output_shapefile_points.shp /input_path/input_kml_file.kml

3

Compress and upload

The resulting files can then be compressed to a single zip file and uploaded to Koordinates.

Additional note on KML files

If your KML contains multiple types of geometries (for example, placemarks as well as polygons), you will need to add a ‘where’ expression to produce separate output files for each geometry type.

Also, note that there are some limitations to the conversion process, including:

  • Regionated or complex network links might be lost.
  • Non-trivial folder structures will not be transferred.
  • Symbology will not be preserved, including placemark icons.
  • Some attribute data might not be copied identically.