[MetaCRS] The WKT of Babel

Christopher Schmidt crschmidt at metacarta.com
Wed Dec 17 01:45:59 EST 2008


Hi,

So, after a bit of playing about, I was able to get CS-Map to compile as
a shared library. Once I did that, it was reasonably trivial to get it
loaded into ctypes in Python, so I could interact with it from my
language of choice. 

Once I did, I figured I could put together what has become my standard
"interacting with a new projection library" script: take in an ID, spit
out WKT for the projection.

CS-Map makes this rather more interesting than most libraries, because
it has some support for so many *different* WKT flavours :)

So, for EPSG:2805:

 http://crschmidt.net/mapping/csmap/2805.wkt

We have the following PROJECTION types:  

  "Lambert Conformal Conic, Two Standard Parallels",
  "CT_LambertConfConic_2SP", "Lambert_Conformal_Conic_2SP"

  "Lambert Conformal Conic" and "Lambert_Conformal_Conic"

We have the following possibilities for the 1st standard parallel:

"Standard_Parallel_1", "standard_parallel_1", "Northern Standard
Parallel", "StdParallel1", "Latitude of 1st standard parallel",
"standard_parallel1"

And that's only two components of the whole.

And this is only one projection method.

Hooray for standards!

My ctypes + csmap.so Python script is available from: 
     http://crschmidt.net/mapping/csmap/epsg.py

It's not really worth a whole lot, but it does demonstrate the usage of
ctypes to bind to csmap and get some data out, which is a nice-to-have.

Norm,

I'm hoping that in that documentation you're working on, there's some
API docs for the various methods in the library. :) If there's not, I'd
say that getting something set up to provide that should be a high
priority for the project, and something that a beginner might be able to
take on to some extent. (Certainly, I can imaging starting to toss a few
docs on functions I've used so far.) 

I really like putting  API docs right inside code -- GDAL/OGR uses
doxygen with this to some effect, I believe, and it would be nice to have
something similar for CS-Map; if ther'es docs coming already, however,
seems like it may be best to wait and see what exists before duplicating
it...

Anyway, just more experiments into the depths of hell that is Spatial
Reference Systems.

Regards,
-- 
Christopher Schmidt
MetaCarta


More information about the MetaCRS mailing list