#4548 closed defect (fixed)
BAG Tiled Images Broken
Reported by: | warmerdam | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.9.2 |
Component: | GDAL_Raster | Version: | svn-trunk |
Severity: | normal | Keywords: | BAG |
Cc: | schwehr |
Description
It seems there are some serious flaws in the tiled handling in the BAG driver.
One problem is that the windowing logic is such that some windows will be off the dataset resulting in HDF5 library errors like:
HDF5-DIAG: Error detected in HDF5 (1.8.4) thread 139969020036928: #000: ../../../src/H5Dio.c line 153 in H5Dread(): selection+offset not within extent major: Dataspace minor: Out of range
It also appears that the blocks are not properly "Y flipped" which is required for bag datasets.
I am not sure if my test dataset is public.
Change History (6)
comment:1 by , 12 years ago
comment:3 by , 12 years ago
What H11553_A_2m.bag about in http://vislab-ccom.unh.edu/~schwehr/data/BAGs/sample-bags-ngdc-2010-05.tar.bz2 ? It's just under 1MB. Send a request for other small files to nav_surf_dev@…. Can't seem to find a public archive to link to.
gdalinfo H11553_A_2m.bag Driver: BAG/Bathymetry Attributed Grid Files: H11553_A_2m.bag Size is 333, 317 Coordinate System is: PROJCS["UTM Zone 10, Northern Hemisphere", GEOGCS["NAD83", DATUM["North_American_Datum_1983", SPHEROID["GRS 1980",6378137,298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6269"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9108"]], AUTHORITY["EPSG","4269"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-123], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["Meter",1]] Origin = (535504.540000000037253,5391128.200000000186265) Pixel Size = (2.000000000000000,-2.000000000000000) Metadata: BagVersion=1.0.0 Corner Coordinates: Upper Left ( 535504.540, 5391128.200) (122d31' 3.87"W, 48d40'19.89"N) Lower Left ( 535504.540, 5390494.200) (122d31' 4.06"W, 48d39'59.36"N) Upper Right ( 536170.540, 5391128.200) (122d30'31.30"W, 48d40'19.75"N) Lower Right ( 536170.540, 5390494.200) (122d30'31.50"W, 48d39'59.22"N) Center ( 535837.540, 5390811.200) (122d30'47.68"W, 48d40' 9.56"N) Band 1 Block=333x1 Type=Float32, ColorInterp=Undefined Description = elevation Min=-33.810 Max=-29.001 NoData Value=1000000 Band 2 Block=333x1 Type=Float32, ColorInterp=Undefined Description = uncertainty Min=0.206 Max=1.036 NoData Value=0
comment:4 by , 11 years ago
I just wanted to report that the BAG file reader is working a lot better in the latest GDAL trunk build. I used GDAL to read the archive of BAGs at NOAA/NGDC in order to generate the color hillshade visualizations, which is available as an ArcGIS map service (see http://maps.ngdc.noaa.gov/rest/services/web_mercator/bag_hillshades/MapServer). So far GDAL is working as expected. Previously, there was a problem reading the newer BAGs that use compression.
Here are a few examples of BAGs that previously failed to convert in GDAL 1.9.1, but are working OK for me now using the trunk build. I used a command like 'gdal_translate -b 1 input.bag output.tif'. http://surveys.ngdc.noaa.gov/mgg/NOS/coast/H12001-H14000/H12368/BAG/H12368_MB_16m_MLLW_Combined.bag.gz http://surveys.ngdc.noaa.gov/mgg/NOS/coast/H12001-H14000/H12348/BAG/H12348_MB_1m_MLLW_1of1.bag.gz http://surveys.ngdc.noaa.gov/mgg/NOS/coast/H12001-H14000/H12349/BAG/H12349_MB_1m_MLLW_1of1.bag.gz
-Jesse
comment:5 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
The above samples are not small when unpacked unfortunately, but based on the positive report by jdvarner, I've backported the patch into 1.9 (r24974).
comment:6 by , 11 years ago
Milestone: | 1.9.1 → 1.9.2 |
---|
I have migrated the tile handling logic from the HDF5 driver with a few adjustments for the upsidedownness of BAG data in trunk (r24083).
Kurt - are there any public samples with this issue that aren't so large?
Once a bit better tested, I'd like to back port this to at least the 1.9 branch.