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

Yingqi Tang anakintang at gmail.com
Thu Jul 5 11:55:45 PDT 2012


It looks like CSV driver follows the same pattern. You need to add ".csv"
for the temp memory virtual file. It's good to know.

Thanks,

On Thu, Jul 5, 2012 at 11:52 AM, Yingqi Tang <anakintang at gmail.com> wrote:

> Cool, adding ".json" doesn't solve the problem.
>
>
> On Thu, Jul 5, 2012 at 11:47 AM, Even Rouault <
> even.rouault at mines-paris.org> wrote:
>
>> 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.
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20120705/4f63d726/attachment.html>


More information about the gdal-dev mailing list