Ticket #4687 (closed defect: fixed)

Opened 13 months ago

Last modified 13 months ago

Partial Cell Indicator not saved in DTED file

Reported by: bugbuster Owned by: warmerdam
Priority: normal Milestone: 1.9.2
Component: GDAL_Raster Version:
Severity: normal Keywords: DTED
Cc:

Description

When converting an SRTM cell to DTED format, the "Partial Cell Indicator" is not saved in DSI header. The correct value is indeed computed after elevation nodes reading / writing step. Curiously enough, this particular field is not treated like all other fields in UHL, DSI and ACC headers. Although the structure psDTED->pachDSIRecord is correctly updated, headers are never rewritten onto hard drive (see DTEDCreateCopy() in dteddataset.cpp).

A solution may be :
1) add a new value to DTEDMetaDataCode enumerate in dted_api.h (DTEDMD_PARTIALCELL_DSI)
2) deal with this new value in DTEDGetMetadataLocation() (see dted_api.c)
3) call DTEDSetMetadata() after Partial Cell Indicator computation (see DTEDCreateCopy() in dteddataset.cpp)

Attached :
proposed patchs for dted_api.h and .c, dteddataset.cpp
an SRTM cell with unknown elevation values

Attachments

dted_api.h.patch Download (425 bytes) - added by bugbuster 13 months ago.
Patch for dted_api.h
dted_api.c.patch Download (472 bytes) - added by bugbuster 13 months ago.
patch for dted_api.c
dteddataset.cpp.patch Download (0.9 KB) - added by bugbuster 13 months ago.
patch for dteddataset.cpp
N05E000.zip Download (194.0 KB) - added by bugbuster 13 months ago.
SRTM file to illustrate defect

Change History

Changed 13 months ago by bugbuster

Patch for dted_api.h

Changed 13 months ago by bugbuster

patch for dted_api.c

Changed 13 months ago by bugbuster

patch for dteddataset.cpp

Changed 13 months ago by bugbuster

SRTM file to illustrate defect

Changed 13 months ago by rouault

  • status changed from new to closed
  • resolution set to fixed
  • version 1.8.0 deleted
  • component changed from default to GDAL_Raster
  • milestone set to 1.9.2

Fixed in trunk (r24517) (with a little improvement to avoid rewritting the headers to the file each time), and in branches/1.9 with your raw patch (r24518).

Thanks.

Note: See TracTickets for help on using tickets.