projection problems and coordinate systems

Trond Michelsen trondmm-mapserver at CRUSADERS.NO
Wed Dec 15 14:47:15 EST 2004


Hi.

Where I work, we have an in-house developed map generating software,
that I'm working on creating a WMS-frontend for. The frontend itself
is pretty much done, and I've confirmed that I get mapserver to fetch
images from it. But, projections are (as espected) making things
... interesting :)

Our system has been around for a while, and as far as I know, all
projection handling is done in Fortran libraries. It does not use
proj, and it's not likely to do so in the (near) future.

So, I'm pretty much stuck with the projections our system already
knows, which are: polar stereographic, mercator, geographic and
spherical_rot, with polar stereographic being our most commonly used
projection. So, I've been looking at proj, and trying to figure out
how to configure mapserver to use the same rotation we do, and I'm not
really sure where to begin.

Our polar stereographic projections has the latitude of true scale at
60 degrees north, central meridian is 0.

Is this the right set of parameters for a projection like this?

  PROJECTION
    "ellps=WGS84"
    "proj=stere"
    "lat_0=60"
    "lat_ts=60"
    "lon_0=0"
  END

Where should it go? Should I add this to every layer, or is it enough
to define this in the main section of the map file?

I've seen the proj documentation mention a parameter 'k' as the
scaling factor. I've assumed that this is 1, but I don't know.

What about the WMS-parameter SRS? I haven't found any definition in
/usr/local/share/proj/epsg that matches these parameters. Should I
just add one, and assign it whatever number I like, or is there a more
standardized way of doing that? At the moment, I just picked
EPSG:2175, as that's the closest I could found (not a good idea, I know).


Next obstacle is coordinate systems of course. I still don't know
what the numbers mapserver sends in the WMS-request means, so
converting to our internal system is a bit of a challenge :)
Our system is based on the distance from the north pole to equator. I
can decide how many units this should be, which will give me a grid
with 0,0 being the north pole. I can also decide exactly where I want
to position 0,0.

So - the big question, I suppose, is how much work will it be to
convert from one system to the other? Is it as simple as adding an
offset, and multiplying by some scale? (Assuming the projections are
identical, of course). Or is it considerably more complex?

Any information will be greatly appreciated. If I've left out
important information, just ask, it's probably because I don't know
exactly what I'm doing.

--
Trond Michelsen



More information about the mapserver-users mailing list