[gdal-dev] Can GDAL read a GTiff from a memory buffer?

Robert Nix robert at urban4m.com
Thu May 1 12:53:54 PDT 2014


Sorry, Even. :)


On Thu, May 1, 2014 at 3:53 PM, Robert Nix <robert at urban4m.com> wrote:

> Great, Evan! And I found your blog post about it<http://erouault.blogspot.com/2012/05/new-gdal-virtual-file-system-to-read.html> with
> some good, helpful links too. Thank you!
>
>
> On Thu, May 1, 2014 at 2:54 PM, Even Rouault <even.rouault at mines-paris.org
> > wrote:
>
>> Le jeudi 01 mai 2014 20:34:51, Robert Nix a écrit :
>> > Hi,
>> >
>> > I have a situation where i get a geotiff across the network. I don't
>> want
>> > to have to save it to a file and reopen it to load it into numpy. Is
>> this
>> > possible with GDAL? Doesn't have to be supported in Python. I can call
>> into
>> > C/C++ if needed.
>>
>> Several possible ways :
>>
>> - This will download the whole file in memory before opening it :
>> gdalinfo http://path/to/the.tif
>>
>> - This will download parts of the file when needed (if the server supports
>> range downloading) :
>> gdalinfo /vsicurl/http://path/to/the.tif
>>
>> - Download the data with the way you prefer in the_buffer
>>   Use gdal.FileFromMemBuffer("/vsimem/tmp.tif", the_buffer)
>>   gdal.Open("/vsimem/tmp.tif")
>>   gdal.Unlink("/vsimem/tmp.tif")
>>
>>
>> >
>> > Thanks
>>
>> --
>> Geospatial professional services
>> http://even.rouault.free.fr/services.html
>>
>
>
>
> --
> .nix
>



-- 
.nix
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20140501/449cf800/attachment.html>


More information about the gdal-dev mailing list