[gdal-dev] ogrinfo with remote KML-urls
mateusz at loskot.net
Tue Feb 23 14:34:04 EST 2010
Frank Warmerdam wrote:
> Mateusz Loskot wrote:
>>>> Is this a known issue that ogrinfo does not work with remote URLs?
>>> 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
>>> think the same thing exists in OGR.
>> 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.
> Ah, I did not realize such magic existed in the geojson driver. How does
> it decide whether it ought to initate an expensive http request?
If protocol type is any of the three  then it decides to read.
> It *seems* like a bad idea to embed such behavior in a
> particular driver.
Yes, I understand your point.
Perhaps I should narrow the test with check if URL consists of "geojson"
token, like http://server/path/geojson/1234 or
ftp://server/path/file.geojson and if not present, then no remote
reading would be performed. Should I?
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org
More information about the gdal-dev