[mapserver-dev] Derive units from a layer projection... Possible?
dmorissette at mapgears.com
Thu Aug 14 10:50:44 PDT 2014
Have a look at GetMapserverUnitUsingProj() in mapprojhack.c, It is used
for WMS, SOS and MapContext, and also by PHP MapScript.
On 14-08-14 1:19 PM, Even Rouault wrote:
> With OGR, you can get the units with :
> - OSRGetAngularUnits() if OSRIsGeographic()
> - OSRGetLinearUnits() if OSRIsProjected()
>> Do we have any code to derive a layer's unit based on it's projection? The
>> units can be explicitly set but that's not often the case. I'm reworking the
>> WFS dwithin/beyond code and need a reliable way to derive units to convert
>> the user supplied distance to layer units. Maybe its enough just to use
>> layer->units, and then defer to map->units if not set.
T: +1 418-696-5056 #201
Provider of Professional MapServer Support since 2000
More information about the mapserver-dev