Opened 7 years ago
Closed 5 years ago
#7008 closed enhancement (wontfix)
Let's make ArcGIS geodatabases rasters a thing!
Reported by: | rbarnes | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | closed_because_of_github_migration |
Component: | default | Version: | unspecified |
Severity: | normal | Keywords: | esri, arcgis, geodatabase |
Cc: | Even Rouault, Robert Coup |
Description
I'd like to be able to read ArcGIS Raster Geodatabases from within GDAL.
Based on some previous work by Even Roualt and James Ramm, I have a working program to extract data and projections into GeoTIFFs available here: https://github.com/r-barnes/ArcRasterRescue
There are still a few things to figure out, but this is functional enough that it may be useful to people and, since I don't have access to a large set of geodatabases, it's difficult to for me to get ahold of the exotic examples which would help flesh it out. There are also some things we may never know about the format because they are not used in the wild, so perhaps everything is already working! For this reason, I think it would be useful to build this into GDAL, and I'm willing to give it a shot.
However, I'm not entirely sure how to proceed.
Since there are commonalities with the OGR OpenFileGDB plug-in, I could copy that code wholesale and make the necessary modifications, though this seems wasteful.
I could also modify the existing code, but then the plugin would be for both GDAL and OGR, which seems to break the separation between the two that I see in the source.
If you have thoughts about what is best, let's talk about it.
Change History (7)
comment:1 by , 7 years ago
comment:2 by , 7 years ago
Even,
Are alterations needed to convert a driver from OGR-only (the existing OpenFileGDB driver) into raster+vector (e.g. GeoPackage)?
I'll look at filegdbtable.cpp
sometime in the next day or so and see if I can figure out how to modify it to recognize rasters.
comment:3 by , 7 years ago
Cc: | added |
---|
Are alterations needed to convert a driver from OGR-only (the existing OpenFileGDB driver) into raster+vector (e.g. GeoPackage)?
Nothing fundamental in the structure. You need to add poDriver->SetMetadataItem( GDAL_DCAP_RASTER, "YES" ); and then set/implement raster related methods.
On particular aspect of drivers with both raster&vector capabilities is to take into account poOpenInfo->nOpenFlags. If GDAL_OF_RASTER is set and not GDAL_OF_VECTOR (typically the case of opening with gdalinfo/gdal_translate), then you must return a NULL dataset at open time if there's no raster. And if there are raster table, you must not expose vectors. And the reverse situation (when opening with ogrinfo/ogr2ogr). If both are defined, you can return a valid dataset as soon as there's at least one vector or one raster table.
comment:4 by , 7 years ago
Good to know.
Are the "raster related methods" obvious if I look at the source of, e.g., GeoPackage or AAIGrid? Are they listed anywhere?
comment:5 by , 7 years ago
You may want to study http://gdal.org/gdal_drivertut.html . The GeoPackage driver is quite complex. The AAIGRID one will be easier to follow
Here's a random example of how to expose subdatasets : https://github.com/OSGeo/gdal/blob/ddbf6d39aa4b005a77ca4f27c2d61a3214f336f8/gdal/ogr/ogrsf_frmts/plscenes/ogrplscenesdatav1dataset.cpp#L482
comment:6 by , 7 years ago
Cc: | added |
---|
comment:7 by , 5 years ago
Milestone: | → closed_because_of_github_migration |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.
This was originally posted to gdal-dev, where Even Rouault replied: