Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#2580 closed enhancement (fixed)

Read EHdr file(s) directly from a zip archive

Reported by: apetkov Owned by: Even Rouault
Priority: normal Milestone: 1.6.0
Component: GDAL_Raster Version: svn-trunk
Severity: normal Keywords: ehdr large file api
Cc:

Description

I am interested in using the functionality to read rasters directly from compressed archives (see http://www.nabble.com/Support-for-reading-GDAL-datasets-in-compressed-archives-(.gz-and-.zip)-td19152179.html).

The EHdr driver, however, is not among those that support the "large file API".

The attached patch adds support for reading via the "large file API", and advertisement for the GDAL_DCAP_VIRTUALIO capability, so EHdr files can be read directly from compressed archives.

Example:

gdalinfo /vsizip/nd050707.zip/nd050707.bil

NOTE: The "large file API" changes apply only to the reading portions of the driver. I kept the write portion of the driver unchanged.

Attachments (1)

ehdr_read_from_compressed_archives.patch (9.2 KB ) - added by apetkov 16 years ago.
Updated patch with complete large file API support

Download all attachments as: .zip

Change History (7)

by apetkov, 16 years ago

Updated patch with complete large file API support

in reply to:  description comment:1 by apetkov, 16 years ago

Summary: Read EHdr file(s) directly from a zip archiveRead EHdr file(s) directly from a zip or a gz archive

Replying to apetkov:

NOTE: The "large file API" changes apply only to the reading portions of the driver. I kept the write portion of the driver unchanged.

I changed the EHdr driver to use the large file API and updated the patch.

comment:2 by apetkov, 16 years ago

Summary: Read EHdr file(s) directly from a zip or a gz archiveRead EHdr file(s) directly from a zip archive

comment:3 by Even Rouault, 16 years ago

Component: defaultGDAL_Raster
Keywords: ehdr large file api added
Owner: changed from warmerdam to Even Rouault
Status: newassigned

I'll review that

comment:4 by Even Rouault, 16 years ago

Resolution: fixed
Status: assignedclosed

Patch applied in r15425. Test added in r15426. I've also changed CPLFormCIFilename in r15424 to use large file API.

Thanks

comment:5 by apetkov, 16 years ago

Just a quick note that might help someone--using absolute path to the zip archive works also, but one needs 2 slashes (ie '') after the vsizip keyword. This is on linux, not sure how that applies to Windows.

comment:6 by Even Rouault, 16 years ago

It was explained in the wiki (but only for /vsigzip) : http://trac.osgeo.org/gdal/wiki/UserDocs/ReadInZip

So I added a note for /vsizip too.

Feel free to contribute to the wiki.

Note: See TracTickets for help on using tickets.