[gdal-dev] How to read GML/GeoRSS directly from XML string?

Even Rouault even.rouault at mines-paris.org
Thu Jul 5 11:47:39 PDT 2012


Le jeudi 05 juillet 2012 20:44:58, Yingqi Tang a écrit :
> Hi Chaitanya,
> 
> GeoJSON does seem to be an exception, although the ogr driver can directly
> read the GeoJSON string, the generic virtual memory file doesn't seem to
> work:
> 
>     inputDataStr = "{geojson_string}";
>     gdal.FileFromMemBuffer('/vsimem/temp', inputDataStr);
>     inputDriver.Open('/vsimem/temp', 0);
> 
> Is that expected?

Yes, the geojson driver only recognizes filenames ending with .json or 
.geojson, so use "/vsitem/temp.json" as a filename.


More information about the gdal-dev mailing list