[gdal-dev] Question about KML Lib

Even Rouault even.rouault at spatialys.com
Wed Jan 27 06:31:56 PST 2016


Le mercredi 27 janvier 2016 13:26:22, Leonan Carvalho a écrit :
> Dear All,
> 
> I'd asked a question on GIS Starkexchange
> <http://gis.stackexchange.com/questions/177545/convert-kml-to-geojson-with-
> ogr2ogr-and-remove-kml-special-attributes> (
> http://gis.stackexchange.com/questions/177545/convert-kml-to-geojson-with-o
> gr2ogr-and-remove-kml-special-attributes) about a issue with KML convertion
> to GEOJSON(or other formats) . There you can find more tecnical
> information about it.
> It was proposed that I make the same question here in this list, so, to
> summarize I have the following scenario:
> 
> - I'm using GDAL 1.11.3 on Windows 10, released 09/16/2015
> - I'm exporting a KML for GeoJSON
> - I do not know the name of layers, or which fields are available.
> - I have no any special attributes in the schema but always is created
> these attributes:* Name,
> description,timestamp,begin,end,altitudeMode,tessellate,extrude,visibility,
> drawOrder,icon.* - I must keep only attributes present on schema.
> 
> 

Those fixed fields come from the KML structure itself and are exposed as OGR 
fields because it is convenient in some contexts. AFAICS there's no easy way of 
not exposing them. So you will likely have to do some scripting to list the 
available fields, remove the ones you don't want too, and build a SQL statement 
or use -select to select just the ones you're interested into.

> 
> I really appreciate if someone  help to clearance.
> 
> 
> (Excuse me for my awful English, I’m French !)
> 
> Best wishes,
> 
> 
> * José Leonan S. Carvalho*
> *Software Engineer*
> +55 22 9 99811 1411
> j.leonancarvalho at gmail.com
> www.leonancarvalho.com
> *skype: jleonancarvalho*
> *“Procurem deixar este mundo um pouco melhor do que o encontraram, e,
> quando chegar a hora de morrer, poderão morrer felizes sentindo que pelo
> menos não desperdiçaram o tempo e que procuraram fazer o melhor possível.*
> *Deste modo estejam “bem preparados” para viver felizes e para morrer
> felizes.”*
> * - Lord Baden-Powell of Gilwell *

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list