Opened 22 years ago
Last modified 22 years ago
#214 closed defect (invalid)
gdalinfo: potential path confusion: HDF4
Reported by: | Markus Neteler | Owned by: | warmerdam |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | default | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
Hi, today I found probably a bug: When using gdalinfo on a HDF4 image, it reports the path in an undesired position (IMHO): gdalinfo sample_image_hdfeos/pg-PR1A0000-2001030601_001_015 ^^^^^^^^^^^^^^^^^^^^^^--> path specified here leads to: [...] SUBDATASET_14_DESC=[700x700] ImageData (16-bit unsigned integer) SUBDATASET_15_NAME=HDF4_SDS:ASTER_L1A:sample_image_hdfeos/pg-PR1A0000-2001030601_001_015:186 SUBDATASET_15_DESC=[700x700] ImageData (16-bit unsigned integer) [...] The path is included the in output which may be wrong as gdalinfo sample_image_hdfeos/HDF4_SDS:ASTER_L1A:sample_image_hdfeos/pg-PR1A0000-2001030601_001_015:186 ERROR 4: `sample_image_hdfeos/HDF4_SDS:ASTER_L1A:sample_image_hdfeos/pg-PR1A0000-2001030601_001_015:186' does not exist in the file system, and is not recognised as a supported dataset name. does not work. Perhaps it could be eliminated in the output by some 'basename' function. Thanks, Markus Neteler
Change History (3)
comment:2 by , 22 years ago
Frank, well, as posted it does not work (for me). Result is: 'does not exist in the file system' although I simply copy-pasted things without manually modifying the path. Aha!! Now I get it: gdalinfo 0300099944KNLPwA/pg-PR1A0000-2000121903_005_055.hdf [...] SUBDATASET_15_NAME=HDF4_SDS:ASTER_L1A:0300099944KNLPwA/pg-PR1A0000-2000121903_005_055.hdf:186 [...] Then: gdalinfo HDF4_SDS:ASTER_L1A:0300099944KNLPwA/pg-PR1A0000-2000121903_005_055.hdf:186 ... works. A bit tricky, but finally I understood it. Sorry, you may close the report. Markus
comment:3 by , 22 years ago
Markus, Frank right, the full path to the HDF file reported in the third element of the SUBDATASET_n_NAME field. So you don't need specify it separately, the _only_ thing you need to open subdatset is to give the full value of the corresponding SUBDATASET_n_NAME to the GDAL. I will describe this issue in more details in the documentation to avoid future confusing.
Note:
See TracTickets
for help on using tickets.