Ticket #3881 (closed enhancement: fixed)

Opened 2 years ago

Last modified 2 years ago

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 hogendrr) (diff)

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

Change History

Changed 2 years ago by hogendrr

Changed 2 years ago by hogendrr

  • description modified (diff)

Changed 2 years ago by rouault

  • status changed from new to closed
  • resolution set to fixed
  • component changed from default to OGR_SF
  • milestone set to 1.9.0

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)

Changed 2 years ago by rouault

r22459 /trunk/autotest/ogr/ogr_s57.py: Test decoding of Dutch inland ENCs (#3881)

Changed 2 years ago by rouault

r22465 /trunk/gdal/ogr/ogrsf_frmts/s57/s57.h: S57: revert change for MAX_ATTRIBUTES done in r22458. It is not correct since iAttr and panAttrIndex are GInt16 ( #3881 )

Changed 2 years ago by warmerdam

  • status changed from closed to reopened
  • resolution fixed deleted

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

Changed 2 years ago by warmerdam

  • status changed from reopened to closed
  • resolution set to fixed

I have adjusted things to use GUInt16 and a limit of 65536 attributes in trunk (r22469).

Note: See TracTickets for help on using tickets.