Opened 13 years ago
Closed 13 years ago
#3881 closed enhancement (fixed)
S57 driver: add support for Dutch inland ENCs
Reported by: | hogendrr | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.9.0 |
Component: | OGR_SF | Version: | 1.7.3 |
Severity: | normal | Keywords: | S57 |
Cc: |
Description (last modified by )
Dutch inland ENCs are encoded in a slightly different way than most (maritime) ENCs. They are, however, compliant with the IHO S57 3.1 specification. The difference is that in a vector record (section 7.7 of the S57 spec), a line or polygon feature can be encoded in more than one way: one SG2D record with repeating rows of coordinates or a repeating series of SG2D records with one row of coordinates (or even a combination thereof). The current (1.7.3) driver only supports the former encoding. This patch adds support for both encodings. Tested against inland ENCs at ftp://sdg.ivs90.nl/ENC/ and several maritime ENCs
Attachments (1)
Change History (7)
by , 13 years ago
Attachment: | gdal-1.7.3-s57-reader_support_multiple_fields.patch added |
---|
comment:1 by , 13 years ago
Description: | modified (diff) |
---|
comment:2 by , 13 years ago
Component: | default → OGR_SF |
---|---|
Milestone: | → 1.9.0 |
Resolution: | → fixed |
Status: | new → closed |
comment:3 by , 13 years ago
comment:4 by , 13 years ago
comment:5 by , 13 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Dear Frank,
In commit #21684 s57classregistrar.cpp was changed: warmerdam: avoid a variety of warnings for MSVC In particular, the types of iAttr and panAttrIndex[] were changed from int to GInt16. The corresponding types in s57reader.cpp were not touched though. Some manufacturers and some administrations use attributes with an index, above the present MAX_ATTRIBUTES 25000, even up to 65535. This could be accommodated by using a type of GUInt16, rather than the GInt16, since indexes are usually >=0. Is there any objection to changing the type to unsigned (I am thinking of MSVC, which I do not have)? Regards,
Rene Hogendoorn
comment:6 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
I have adjusted things to use GUInt16 and a limit of 65536 attributes in trunk (r22469).
Patch applied. A bit substantial, but I've checked that it doesn't change the output of ogrinfo against various S57 ENC charts : all the US region charts, an australian sample, samples from http://www.iho-ohi.net/iho_pubs/standard/S-64_Edition_1-1/ECDIS_Test_Data_Sets.htm and it actually fixes the decoding of some of the charts available on the FTP site, such as that one : ftp://sdg.ivs90.nl/ENC/1R5MK050.000
r22458 /trunk/gdal/ogr/ogrsf_frmts/s57/ (s57.h s57reader.cpp): OGR S57: add support for Dutch inland ENCs (#3881)