[gdal-dev] Convert kml to Shapefile and conserve polygon's colors with Ogr2Ogr

Smith, Michael ERDC-CRREL-NH Michael.Smith at usace.army.mil
Mon Oct 22 03:16:07 PDT 2012


Wael,

First, make sure you are using the libkml driver and not the kml driver.
The libkml driver can read the style information. Then you can get that
information in your shapefile by specifically requesting the ogr_style
column.

Try adding 

-sql 'select *, ogr_style as style from Layer0'

Mike

-- 
Michael Smith

US Army Corps
Remote Sensing GIS/Center




From:  Wael Tarhouni <waelinsat at gmail.com>
Date:  Monday, October 22, 2012 4:55 AM
To:  "gdal-dev at lists.osgeo.org" <gdal-dev at lists.osgeo.org>
Subject:  [gdal-dev] Convert kml to Shapefile and conserve polygon's
colors	with Ogr2Ogr
Resent-From:  Michael Smith <michael.smith at usace.army.mil>


Hi All,

I'm using Ogr2Ogr to convert kml file to shapefile but the color of the
shape output file is unique, i 'm always loosing the colors of my polygons
 in the shapefile...

is there any way to solve this problem ?

Best regards;

-- 
Wael Tarhouni
Élève ingénieur en Réseaux informatiques et Télecommunication à l'INSAT





More information about the gdal-dev mailing list