[Gdal-dev] Creating files, File I/O, and VRT

Matt Hanson mhanson at photon.com
Fri Dec 15 15:48:22 EST 2006


Frank-
SyncToDisk() doesn't seem to be a valid member function of GDALDataset().   Has it been recently added?  I'm still using a 1.3 snapshot build from the end of September.
 
m

________________________________

From: fwarmerdam at gmail.com on behalf of Frank Warmerdam
Sent: Thu 12/14/2006 9:33 PM
To: Matt Hanson
Cc: gdal-dev at lists.maptools.org
Subject: Re: [Gdal-dev] Creating files, File I/O, and VRT



On 12/14/06, Matt Hanson <mhanson at photon.com> wrote:
> I'm wondering about what the expected behavior is when Creating files and when the files are actually written from memory to disk.   I've encountered some strangeness in a file not existing when I think it should.
>
> First, when writing other file formats the file on disk gets created right away, even before I've written any data to it.
>
> With VRT files they don't seem to get written to disk right away.   Do I have to
> delete dataset;
>
> in order for it to actually get written ?   It seems like it but I wanted to know what the behavior is supposed to be for regular files as well as VRT files.


Matt,

It is guaranteed that files will be fully written to disk
by the time the dataset has been fully closed/deleted.

Other than that behavior is driver dependent.

There is a SyncToDisk() method on the dataset that is
intended to cause the file to be flushed to disk and left
in a valid to access state.  For a VRT I think this will
cause it to be flushed to disk.

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






More information about the Gdal-dev mailing list