Jeff DLB wrote asking if it would be possible to modify MapServer to support
arbitrary SRS codes in WMS, such as MOON:1.
Here is a summary of the email exchange:
Jeff de La Beaujardiere wrote:
>
> Daniel Morissette wrote:
>
>> Are you just looking for a way to pass an arbitrary WMS projection
>> code without any real PROJ definition? If you don't expect MapServer
>> to be able to "understand" the MOON:1 projection and reproject data
>> to/from it, then I'd have to check, but it might not be too hard to
>> modify the code to just do nothing if you pass it a SRS that is listed
>> in the "wms_srs" metadata for the server and that doesn't have a valid
>> PROJ definition.
>
>
> Short term, that would be okay. I thought I would modify mapwms.c to
> accept my custom CRS id without complaint. Perhaps I must also set
> map->units to an integer value of meters/degree on the moon?
>
> Longer term, that hack would not be good enough to fold back into the
> master source, and I would not wish to keep rehacking whenever mapserv
> is upgraded. A way to define a new CRS in the PROJECTION section of the
> map file would be nice. Something like this:
>
> PROJECTION
> "proj=moon:1"
> "shape=spheroid"
> "radius=1738000"
> "flattening=3234.93"
> END
>
Frank Warmerdam wrote:
> On Wed, 16 Feb 2005 10:26:43 -0500, Jeff de La Beaujardiere
> <xxxx> wrote:
>
>>>Short answer: no you won't be able to convince mapserver to accept
>>>MOON:1 without touching the source.
>>
>>That's what I suspected from my investigations yesterday.
>
>
> Jeff,
>
> I would add that it is pretty easy to make a "fake" CRS in the EPSG name space
> if you were willing to settle for that.
>
>
>>Longer term, that hack would not be good enough to fold back into the
>>master source, and I would not wish to keep rehacking whenever mapserv
>>is upgraded. A way to define a new CRS in the PROJECTION section of the
>>map file would be nice. Something like this:
>>
>>PROJECTION
>> "proj=moon:1"
>> "shape=spheroid"
>> "radius=1738000"
>> "flattening=3234.93"
>>END
>
>
> You can define a new projection using normal PROJ.4 parameters, including
> ones with unusual (aka non-earth) ellipsoids. However, the hole is still allow
> that to be related to the SRS in WMS requests. Currently there is an implicit
> special support for the EPSG name space, and for lookup it is mapped to the
> /usr/local/share/proj/epsg lookup file.
>
> I suspect what we need to do is allow a mapfile declaration of a list of
> "CRS lookup files" that would give the name of the file, and the proper name
> for the CRS namespace. Then these would be allowed through in the various
> appropriate places.
>
> This isn't a trivial change, but I think it may be helpful as we start looking
> at new required CRS namespaces. Of course, the AUTO projections would
> still have to be a programmatic hack.
>
> I would suggest that a bugzilla enhancement request be opened on this
> issue. Feel free to add me to the cc: list. If we had a good understanding
> of what needs to be done we could even implement it in time for 4.6.
>