[mapserver-dev] FW: [MapServer] #3519: map UNITS AUTO from PROJECTION units

Frank Warmerdam warmerdam at pobox.com
Thu Aug 19 12:15:28 EDT 2010


Lime, Steve D (DNR) wrote:
> Is it possible to easily derive units from a projection definition in Proj?

Steve,

There are a few challenges to doing so.

First, units can be defined parametrically.  So we
could say +to_meter=1000 to represent kilometers.   I don't
know that many of the exotic units, or parametric units would
have a mapserver analog.

Second, when we use +init=epsg:27700 we can't immediately
see the underlying definition.  One approach is to look
instead the PJ structure though that introduces an unfortunate
dependence on the private PROJ.4 include files.  The other is
to ask PROJ.4 to expand the definition using the pj_get_def()
function.

I see Assefa has already implemented projectionObj to units
handling in mapprojhack.c so we could just use that, though
it really is somewhat of a hack.

Best regards,

> -----Original Message-----
> From: mapserver-dev-bounces at lists.osgeo.org [mailto:mapserver-dev-bounces at lists.osgeo.org] On Behalf Of Daniel Morissette
> Sent: Wednesday, August 18, 2010 10:21 AM
> To: mapserver-dev
> Subject: Re: [mapserver-dev] FW: [MapServer] #3519: map UNITS AUTO from PROJECTION units
> 
> Lime, Steve D (DNR) wrote:
>> Seems like a reasonable idea but also one that I would think has been discussed 
>> before. Thoughts?
>>
> 
> FYI:
> 
> PHP MapScript's mapObj.setProjection() already has a second (optional)
> argument that can be used to automatically adjust the units and extents
> to match the new projection.
> 
> The projectionObj also has a getUnits() method in PHP. Not sure if it's
> there in the other languages.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev


-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the mapserver-dev mailing list