Ok Frank, thank you very much for the answer. Actually, under the "gdal/frmts/iso8211" directory, I found the class called "DDFModule" which can open both individual ENC files (*.000) and ENC catalogue files (*.031)
Now I use this class to open the catalogue file, get the paths of all relevant files that I need (according to their coverage, since catalogue file contains this information also), and only open these files as OGR datasets. However, if there is no catalogue file, I recursively search the given directory, and I need to open (load as OGR dataset) all ENC files that are found, in order to check their coverages. Is there a way to check the file coverage without loading the file? (since I'm dealing with around a hunred of them, this operation takes minutes) On Sun, Oct 18, 2009 at 4:49 AM, Frank Warmerdam <warmer...@pobox.com> wrote: > 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, > warmer...@pobox.com > light and sound - activate the windows | http://pobox.com/~warmerdam > and watch the world go round - Rush | Geospatial Programmer for Rent > > _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev