[postgis-users] ogr2ogr and kml format

christophe triquet nethou at aliceadsl.fr
Wed Jan 7 04:53:43 PST 2009

Hi everybody,

I'm trying to translate kml file into another format (postgresql or
shp) with ogr2ogr. I'm working with kml files generated with google
earth or google maps. When I use a kml file as input for ogrinfo or
ogr2ogr, I get an error saying :

Unable to open datasource `my_file.kml' with the following drivers.

and then the list of availables drivers displays.

When I enter : ogrinfo --formats
I get : -> "KML" (read/write)
so it seems that this is well configured.

I've tried to validate my kml with www.kmlvalidator.com and the result
is that there is differences between a file generated by google earth
and the ogr kml format. After correcting the errors found by
kmlvalidator, the validation is successfull but ogr2ogr still doesn't
work (with the same error message).

Does someone have any suggestion to solve my problem ?

More information about the postgis-users mailing list