[MetaCRS] Using CS-Map to retrieve WKT for EPSG CRS codes: Help?

Norm Olsen norm.olsen at autodesk.com
Tue Dec 16 20:55:39 EST 2008


Hello Christopher . . .

Your code is not insane.

>> Not working projected reference systems: 2000

There is no equivalent for this EPSG code in the dictionaries and thus there is no entry in the name mapping table.

>> Not working geographic reference systems: 4327

There is an entry in the mapping table for this EPSG code, but no definition in the dictionary with the name  this EPSG code maps to.

There are several thousand definitions of both varieties which do work.  These discrepancies are evident as the dictionaries have been maintained manually for several years and, as ugly as it might sound, by two different individuals working independently.  In the Open Source effort, these independent efforts were merged; obviously imperfectly.  Work is underway to produce an audit program which will locate and report these types of issues.

CS-MAP does not support every EPSG system and supports many systems which EPSG does not support.  These conditions exist in response to the business cases involved in maintaining the product.  The aforementioned audit program is intended to bring the dictionary compatibility up to EPSG 6.17, and provide the ability to keep it up to date relatively easily as new EPSG versions are released.

The test program provided is a good indication if the library has been built correctly.  There are some known failures, mostly with the WKT feature which has always been a pain.  These issues need to be dealt with, but the Test program was not degraded to eliminate the failure reports.   Rather, it represents a good indication of the strengths, and weaknesses, of the library.  Actually, I get nervous when a test program always produces no errors.  The repetition in the test sequence is indeed intentional.  The earlier tests are repeated to verify that a later test did not corrupt something tested by the earlier tests.

There exists substantial documentation for the library in a form unsuitable for open source publishing.  Getting this into the appropriate form for Open Source publication is also on my list of things to do.  I will try to get something useful posted in the very near future.

Thanks for locating the Linux 64 issues.  I do not have access to a 64 bit Linux machine; your help in this area is greatly appreciated.  I'll try to get these corrections in pronto.  Do you know what word size the Linux 64 bit compiler uses for the "long" type?

Norm

-----Original Message-----
From: metacrs-bounces at lists.osgeo.org [mailto:metacrs-bounces at lists.osgeo.org] On Behalf Of Christopher Schmidt
Sent: Tuesday, December 16, 2008 3:24 PM
To: metacrs at lists.osgeo.org
Subject: [MetaCRS] Using CS-Map to retrieve WKT for EPSG CRS codes: Help?

Hi,

This afternoon, I built CS-Map. I've been trying to understand if I'm
using it correctly, and I'm beginning to think that I'm not.

I put together a small binary, which I attached as a ticket in trac.

http://trac.osgeo.org/csmap/attachment/ticket/23/bin.2.patch

If you look at line 49 of the EPSG_Export.c file, you can see my
'printEPSG' function. The goal of this is to take in an object type (or
NULL) and an EPSG ID, and spit out the WKT.

Right now, it just switches between geographic references and projected
CRSes -- I'm sure this is incomplete, but that aspect of it isn't really
what I'm concerned with.

What I am concerned with is that even for relatively simple CRSes, it
seems that this isn't working.

Working Geographic reference systems: 4326
Working projected reference systems: 2805
Not working projected reference systems: 2000
Not working geographic reference systems: 4327

I don't know if this problem is in my usage, in my expectations, or
somewhere else. Here is the output I get:

crschmidt at helios:~/csmap/Bin$ ./EPSG_Export -d../Dictionaries/  4326
EPSG:4326:
  GEOGCS["WGS 84",DATUM["World Geodetic System 1984",SPHEROID["WGS 84",6378137.000,298.25722293]],PRIMEM["Greenwich",0],UNIT["degree of angle",0.01745329251994]]
crschmidt at helios:~/csmap/Bin$ ./EPSG_Export -d../Dictionaries/  2805
EPSG:2805:
  PROJCS["NAD83(HARN) / Massachusetts
Mainland",GEOGCS["NAD83(HARN)",DATUM["NAD83 (High Accuracy Regional Network)",SPHEROID["GRS 1980",6378137.000,298.25722210]],PRIMEM["Greenwich",0],UNIT["degree of angle",0.017453292519943295]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["false_easting",200000.000],PARAMETER["false_northing",750000.000],PARAMETER["central_meridian",-71.50000000000000],PARAMETER["latitude_of_origin",41.00000000000000],PARAMETER["standard_parallel1",42.68333333333333],PARAMETER["standard_parallel2",41.71666666666666],UNIT["metre",1.00000000000000]]
crschmidt at helios:~/csmap/Bin$ ./EPSG_Export -d../Dictionaries/  2000
No CS-Map definition for 2000
crschmidt at helios:~/csmap/Bin$ ./EPSG_Export -d../Dictionaries/  4327
No CS-Map definition for 4327

Is my code insane? Have I messed something up here? I'm not sure if this
is me violating some expectation of the library, or if this is not
supposed to work, or what. Unfortunately, the library  doesn't provide a
lot of documentation/examples of usage, so I'm not sure if I'm violating
a core principle accidentally.

I'll also add that I am very much *not* a C programmer, so if there's
some problems on that level, I'll gladly accept the responsibility.

Regards,
--
Christopher Schmidt
MetaCarta
_______________________________________________
MetaCRS mailing list
MetaCRS at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/metacrs


More information about the MetaCRS mailing list