[gdal-dev] Regarding using VRT to open a raw file

Dan Greve grevedan at hotmail.com
Thu Jun 11 13:06:29 EDT 2009


Excellent Frank, thanks for the tips.  I thought there might be a problem with the /vsimem/ since only the VRT XML would be passed as an in-mem buffer, the actual image data is in a disk file.  I'll just pass the entire VRT XML for simplicity.

-- Dan

> Date: Thu, 11 Jun 2009 12:54:30 -0400
> From: warmerdam at pobox.com
> To: grevedan at hotmail.com
> CC: gdal-dev at lists.osgeo.org
> Subject: Re: [gdal-dev] Regarding using VRT to open a raw file
> 
> Dan Greve wrote:
> > I'm using the VRT schema to open a raw binary image file.  I can 
> > successfully access the image data by creating a VRT file with the 
> > necessary metadata, and then perform GDALOpen using the filename of the 
> > VRT file.  Is there a clean way to just create the VRT metadata file in 
> > memory, instead of having to create a VRT file on disk?
> 
> Dan,
> 
> I believe the VRT driver is unusual in that it allows passing the entire
> VRT XML contents as the filename to GDALOpen() instead of it being a file
> on disk.
> 
> If the driver did not have this specific capacity, you could also use the
> /vsimem/ pseudo-filesystem handling to create the file in memory but have
> it appear to be on disk to most of the GDAL software.
> 
> Best regards,
> -- 
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | Geospatial Programmer for Rent
> 

_________________________________________________________________
Windows Live™: Keep your life in sync. 
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_BR_life_in_synch_062009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20090611/a7c5c678/attachment.html


More information about the gdal-dev mailing list