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

Chaitanya kumar CH chaitanya.ch at gmail.com
Mon Oct 22 03:12:00 PDT 2012


Wael,

There is no support for style information in shapefile format. However, you
can store the style info as a regular attribute value. Using OGR's SQL you
can extract the style string from the kml data and then store it in the
shapefile. Please go through the OGR SQL page[1]. You can get the style
from the special field named "OGR_STYLE".

[1]: http://www.gdal.org/ogr/ogr_sql.html

On Mon, Oct 22, 2012 at 2:25 PM, Wael Tarhouni <waelinsat at gmail.com> wrote:

> 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
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20121022/12975812/attachment.html>


More information about the gdal-dev mailing list