Opened 11 years ago

Closed 11 years ago

#4687 closed defect (fixed)

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 (4)

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

Download all attachments as: .zip

Change History (5)

by bugbuster, 11 years ago

Attachment: dted_api.h.patch added

Patch for dted_api.h

by bugbuster, 11 years ago

Attachment: dted_api.c.patch added

patch for dted_api.c

by bugbuster, 11 years ago

Attachment: dteddataset.cpp.patch added

patch for dteddataset.cpp

by bugbuster, 11 years ago

Attachment: N05E000.zip added

SRTM file to illustrate defect

comment:1 by Even Rouault, 11 years ago

Component: defaultGDAL_Raster
Milestone: 1.9.2
Resolution: fixed
Status: newclosed
Version: 1.8.0

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.