Opened 12 years ago
Closed 12 years ago
#4367 closed enhancement (fixed)
[PATCH] Add support for the GTA file format via libgta.
Reported by: | marlam | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.9.0 |
Component: | GDAL_Raster | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
This patch adds support for the GTA file format via the libgta library.
The GTA file format allows very good compression ratios even for floating point data. It supports all GDAL metadata and data types. Having support for this format is useful because GTA files can be easily manipulated in a number of ways using gtatool. See http://gta.nongnu.org/.
The patch can be applied with 'patch -p1 < PATCHFILE' in the top source directory. Please let me know if you prefer a different patch format.
Best regards, Martin
Attachments (2)
Change History (8)
by , 12 years ago
Attachment: | 0001-Add-support-for-the-GTA-file-format-via-libgta.patch added |
---|
by , 12 years ago
Attachment: | gta_with_msvc_fixes.patch added |
---|
comment:1 by , 12 years ago
Component: | default → GDAL_Raster |
---|---|
Milestone: | → 1.9.0 |
I've committed your driver with MSVC build support and just a few fixes in gtadataset.cpp :
- adding #include "cpl_port.h" for snprintf for MSVC
- replacing FILE* by VSILFILE*
- adding explicit oGTAIO.close(); at the end of ::Open(), before reopening the dataset
I've also added a new test for the driver in the Python autotest suite.
r23473 /trunk/ (13 files in 5 dirs): Add new GDAL driver for GTA / Generic Tagged Arrays (contributed by Martin Lambers, #4367)
One nice improvement to this driver, and which is rare in other drivers, could be its capability to address >2 dimensionnal arrays.
comment:2 by , 12 years ago
r23475 /trunk/ (autotest/gdrivers/gta.py gdal/frmts/gta/gtadataset.cpp): GTA: add support for signed byte data type
comment:3 by , 12 years ago
Thank you for improving and comitting the patch.
Regarding MSVC support: the *.dll.a files from the libgta packages for Windows should be usable as DLL import libs. For some reason libtool names them *.dll.a instead of *.lib by default. Maybe a rename is necessary.
Regarding support for arrays with >2 dimensions: that would be very interesting, but is this currently possible with the GDAL data model? All operations seem to be 2D.
comment:4 by , 12 years ago
Thanks for the info for *.dll.a. I didn't realize up to here that they were also usable by the MSVC linker (I guess because there are only C symbols in them. Might not be true for C++ ones) !
--> r23479: Windows build with libgta : one can use libgta.dll.a directly as the MSVC import lib (#4367)
Yes the GDAL data model is fundamentally 2D, but there are a few drivers, like netCDF, HDF4, HDF5 that support 3D, by exposing the 3rd dimension as GDAL SUBDATASETS.
comment:5 by , 12 years ago
The libgta C++ interface is just the header file; there are not C++ symbols. All functions are only thin inlined wrappers around the C functions.
About SUBDATASETS: I did not yet know about this, it looks interesting. SUBDATASETS with GTA could also be implemented by managing multiple GTAs per file. This might be a more direct representation than using additional array dimensions inside a single GTA. On the other hand, the gta tool can be used to split multi-GTA files into separate files, or to extract dimensions (e.g. 2D slices of a 3D volume), so in this way it is already possible to handle multi-dataset files (though not directly from within GDAL).
comment:6 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Closing this ticket. Any further patches might go to new specific tickets.
Updated patch with MSVC compile support