[gdal-dev] opening an S-57 dataset directory
Frank Warmerdam
warmerdam at pobox.com
Sat Oct 17 22:49:23 EDT 2009
Yilmaz Arslanoglu wrote:
> Hello everybody;
>
> I was just wondering whether there is a specific directory structure
> that needs to be followed
> in order to open an S-57 file collection by giving a single directory
> path, instead of a file with a .000 extension.
>
> I'm asking because, according to the following statement from OGR IHO
> S-57 (ENC) Driver
> documentation, we would be able to pass a directory name.
>
>>> An S-57 dataset can be a directory (in which case all S-57 files in the directory are selected),
>>> an S-57 catalog file (in which case all files referred to from the catalog are selected) or an individual S-57 data file.
Yilmaz,
On review of the code it appears the documentation is wrong and
multiple file access was never fully implemented. I have updated
the documentation accordingly.
> However, when I try to open with a directory name using
> "OGRSFDriverRegistrar::Open", I get an error.
>
> As another question:
>
>>> S-57 update files contain information on how to update a distributed S-57 base data file.
>>> The base files normally have the extension .000 while the update files have extensions like .001, .002 and so on.
>>> The S-57 reader will normally read and apply all updates files to the in memory version of the base file on the fly.
>>> The feature data provided to the application therefore includes all the updates.
>
> So how OGR decides to look for the extension files? Because as far as
> I can see, ENC catalogues may come
> with different directory structures, where in some of them all update
> files accompany the original one in the same directory,
> however they may also come in another directory in some others.
The driver will only find update files if they are in the same directory
as the .000 file, have names like .001, etc and a shared basename.
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