Opened 16 years ago

Last modified 16 years ago

#255 closed defect (fixed)

GDAL WKT sometimes does not match BNF ordering of tags.

Reported by: warmerdam Owned by: warmerdam
Priority: high Milestone:
Component: default Version: unspecified
Severity: normal Keywords:
Cc: martin.daly@…



I've upgraded to GDAL 1.1.8, with multiple instances (i.e. multiple folders,
each with their own nmake.opt-s), and it all seems to build OK, and link with my
client code OK.

However, and there is always a "however", I've got a problem with your WKT.  The
following came from a GeoTIFF file (actually a DOQ):


Our WKT parser chokes on the "AUTHORITY["EPSG","26918"]" node.  This is nothing
wrong with the node itself, but our parser is expecting it at the end, i.e. in
the order specified in the EBNF definition in the CTS specification:

<projected cs> = PROJCS["<name>", <geographic cs>, <projection>, {<parameter>,}*
<linear unit> {,<twin axes>}{,<authority>}]

I'm no EBNF expert, so I'm open to persuasion.


Change History (1)

comment:1 Changed 16 years ago by warmerdam

I have added a FixupOrdering() method on the OGRSpatialReference class.  The
importFromEPSG() method and GTIFFGetOGISDefn() function have been explicitly
modified to use this to correct WKT ordering before returning.

Applications requiring "correct" WKT are encouraged to use the method to cleanup
what the various drivers return.  As problems are encountered I will correct
the drivers. 

Note: See TracTickets for help on using tickets.