[gdal-dev] RE: FW: Annotations from S-57 Files

Michael Childs mike at globalmapper.com
Fri Oct 9 01:46:44 EDT 2009


Frank,

While I wasn't able to find the OBJL=22001 and OBJL=22010 objects formally
defined anywhere, I was able to back out their meaning using SeeMyEnc and
some debugging in GDAL. Basically I found that 22001 is an "Annotation"
point and 22010 is a "Traffic Line". 

I added the following 2 lines at the end of the gpapszS57Classes definition
in s57tables.h. I wasn't sure of the attributes to use, is this correct
(note that it seems to work fine)?

"22001,Annotation,ANNOTA,ALTNAM;NOBJNM;OBJNAM;STATUS;,INFORM;NINFOM;NTXTDS;P
ICREP;SCAMAX;SCAMIN;TXTDSC;,RECDAT;RECIND;SORDAT;SORIND;,G,Point;Area;",
"22010,Traffic
Line,TRFLNE,CATTSS;DATEND;DATSTA;STATUS;,INFORM;NINFOM;NTXTDS;SCAMAX;SCAMIN;
TXTDSC;,RECDAT;RECIND;SORDAT;SORIND;,G,Line;",

Likewise I added one new attribute (22076) which is an alternate name
(ALTNAM). There were several other unrecognized attributes, but they seemed
to carry some application-specific z-level detail. Perhaps these are custom
attributes? Anyway I added the following line to gpapszS57attributes for the
useful attribute carrying the names:

"22076,Alternate Name,ALTNAM,S,F",

Are these changes ok? I don't use the CSV files directly, but I'm guessing
that perhaps the s57tables.h file is auto-generated from those or something,
right?

Thanks,

Mike
Global Mapper Support
support at globalmapper.com

-----Original Message-----
From: Frank Warmerdam [mailto:warmerdam at pobox.com] 
Sent: Tuesday, October 06, 2009 8:41 PM
To: Michael Childs
Cc: gdal-dev
Subject: Re: FW: Annotations from S-57 Files

Michael Childs wrote:
  > I am using the S57Reader class to read in S-57 data files and a user has
> reported that while applications like SeeMyEnc show annotation points 
> with text, I cannot seem to find any returned features that include 
> those annotations. There is a sample data file at 
> http://www.globalmapper.com/Incoming/1I5LQQJ4.zip which has an 
> annotation that is not coming in as a point feature (see screenshot at 
> http://www.globalmapper.com/Incoming/SeeMyENC_DuckLake.jpg).

Mike,

I have inspected the file, and if I run ogrinfo on it with debug I see:

  S57: Unable to find definition for OBJL=22001
  S57: Unable to find definition for OBJL=22010

It appears it has two S-57 object classes that don't appear in the
specification (or at least the older specification I worked from).

I see there is a layer called "Generic" which seems to have these objects
but without extended object attributes like the text.  I assume these
include
your annotation objects.

I would suggest you dig into the S-57/ENC specifications and look for
updated
object catalogs and use them to extend gdal/data/s57objectclasses.csv to
include these new classes.  If you can feed these back into GDAL as a ticket
and patch that would be fantastic.

Best regards,
-- 
---------------------------------------+------------------------------------
--
I set the clouds in motion - turn up   | Frank Warmerdam,
warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the gdal-dev mailing list