[gdal-dev] .NET and OGR writing to stream
Maksim Sestic
max at geoinova.com
Wed Aug 3 09:25:45 EDT 2011
Hi Even,
That's exactly what I was looking for. Yes, Gdal.VSIF* managed bindings are
there. Alas, I've been looking for them under Ogr methods :-)
Regards,
Maksim Sestic
-----Original Message-----
From: Even Rouault [mailto:even.rouault at mines-paris.org]
Sent: Wednesday, August 03, 2011 14:38
To: Maksim Sestic
Cc: 'Tamas Szekeres'; gdal-dev at lists.osgeo.org
Subject: RE: [gdal-dev] .NET and OGR writing to stream
Selon Maksim Sestic <max at geoinova.com>:
> Hi Tamas,
>
>
>
> I don't know how to apply the same principle onto OGR drivers (not GDAL).
> I'm trying to create GML structure in memory using OGR driver, then handle
> resulting XML string further. Don't want to write dataset to a file, then
> read the file back to a string.
With the OGR GML driver, you can write to /vsimem/some.gml for example. And
then
you should be able to read that in-memory file with gdal.VSIFOpenL() and
read
its content with gdal.VSIFReadL(). However I'm not sure that the C# bindings
have been updated to support those VSIF*L functions.
There are examples of you to use those API in Python there :
http://trac.osgeo.org/gdal/browser/trunk/autotest/gcore/rfc30.py .
The C# version should be close (provided that the bindings exist for it of
course)
>
>
>
> Regards,
>
> Maksim Sestic
>
>
>
> _____
>
> From: Tamas Szekeres [mailto:szekerest at gmail.com]
> Sent: Monday, August 01, 2011 13:05
> To: Maksim Sestic
> Cc: gdal-dev at lists.osgeo.org
> Subject: Re: [gdal-dev] .NET and OGR writing to stream
>
>
>
> Maksim,
>
> You can refer to the example
> http://trac.osgeo.org/gdal/browser/trunk/gdal/swig/csharp/apps/GDALRead.cs
> to see how to read data into a byte array and then you can write this
array
> directly to the memory stream.
>
> Best regards,
>
> Tamas
>
>
>
>
> 2011/7/31 Maksim Sestic <max at geoinova.com>
>
> Hi all,
>
>
>
> Is there any example of OGR driver writing to memory stream (instead of
file
> stream), in .NET?
>
>
>
> Regards,
>
> Maksim Sestic
>
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus
signature
> database 6338 (20110731) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>
>
>
__________ Information from ESET NOD32 Antivirus, version of virus signature
database 6346 (20110803) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
__________ Information from ESET NOD32 Antivirus, version of virus signature
database 6347 (20110803) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
More information about the gdal-dev
mailing list