[MetaCRS] Using CS-Map to retrieve WKT for EPSG CRS codes: Help?
crschmidt at metacarta.com
Tue Dec 16 17:24:21 EST 2008
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.
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
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
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.
More information about the MetaCRS