[mapserver-dev] Support for "AUTO:42xxx" projection codes in MapServer

Daniel Morissette morissette at dmsolutions.ca
Mon Jan 13 23:36:46 EST 2003


I committed initial support for AUTO projections in MapServer to the 3.7
CVS a few minutes ago.  I based my implementation on the information
found in the WMS 1.1.1 spec (annex E) and at
http://www.digitalearth.gov/wmt/auto.html and converted the WKT
definitions to PROJ4 format using the MapScript setWKTProjection()
function which in turn uses OGR projection conversion code.

The few tests that I made with AUTO:42001 seem to work fine, but I
noticed that the 42004 definition has lost its standard_parallel_1
value when it was converted by setWKTProjection(), so I'm not convinced
that the definition that is implemented for AUTO:42004 will work. 
Frank, could you please have a look in _msProcessAutoProjection() in
mapfile.c, there is a comment in the code explaining the problem, could
you please comment on whether you think the definition that I have there
is correct?  Also, what would you think of moving the code in this
function to the OGR level at some point in the future?  This would allow
us to support all EPSG unit types in MapServer (since OGR supports
them), and would add support for AUTO projections in the OGR projection

Finally, AUTO projections don't work the same way as EPSG, i.e. you
don't use "init=auto:xxxx" to define an auto projection, instead, you
pass "AUTO:42xxx,unit_id,lon0,lat0" as the projection definition.  This
is the way OGC defined the AUTO projection format.  The current
implementation supports only units code 9001 which is meters but EPSG
defines a long list of units.  lon0 and lat0 should be the center of the
view for which you want the projection to apply in degrees.

e.g. the following definition corresponds to UTM zone 19:


This hasn't been fully tested yet and will be tested more in the next
few days.  If you notice any problems then please file them in bugzilla.
(For sure there are still some issues with the way AUTO projections will
be advertized in WMS capabilities)


Daniel Morissette wrote:
> Folks,
> We need support for AUTO projection codes in the range 42001-42004 in
> MapServer. I found the definition for those AUTO projections at the end
> of the following page: http://www.digitalearth.gov/wmt/auto.html
> The simplest option seems to be to hardcode the definitions in
> mapproject.c.  But before I go ahead and do that, does anyone know of a
> better way to handle this directly with PROJ4 config files?  Frank?
> Thanks
> Daniel
> --
> ------------------------------------------------------------
>  Daniel Morissette               morissette at dmsolutions.ca
>  DM Solutions Group              http://www.dmsolutions.ca/
> ------------------------------------------------------------

More information about the mapserver-dev mailing list