[gdal-dev] ogrinfo with remote KML-urls

Mateusz Loskot mateusz at loskot.net
Tue Feb 23 14:03:52 EST 2010


Frank Warmerdam wrote:
> Stephan Holl wrote:
>> Hello,
>>
>> I am trying to use ogrinfo with a URL to a KML-file. I have compiled
>> gdal 1.7.1 with libcurl, so it _should_ do that.
>>
>> The Errormessage is the following:
>> ogrinfo 
>> "http://mw1.google.com/mw-earth-vectordb/haiti/Haiti-Earthquake-nl.kml"
>>
>> ERROR 1: GeoJSON parsing error: unexpected character (at offset 0)
>> ERROR 4: Failed to read GeoJSON data
>> ERROR 1: GeoJSON parsing error: unexpected character (at offset 0)
>> ERROR 4: Failed to read GeoJSON data
>> FAILURE:
>> Unable to open datasource
>> `http://mw1.google.com/mw-earth-vectordb/haiti/Haiti-Earthquake-nl.kml'
>> with the following drivers.
> ...
>> Is this a known issue that ogrinfo does not work with remote URLs?
> 
> Stephan,
> 
> I am not aware of any support in OGR for working on remote urls.  There is
> an http driver in GDAL that sort of supports this for rasters, but I don't
> think the same thing exists in OGR.

Frank,

GeoJSON driver can read GeoJSON stream from remote resource.
Obviously, Stephan's URL does not point to GeoJSON file,
but KML, thus it fails.
AFAIK, the KML driver can't read from URL.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org


More information about the gdal-dev mailing list