[mapserver-dev] Derive units from a layer projection... Possible?

Even Rouault even.rouault at spatialys.com
Thu Aug 14 10:19:08 PDT 2014


Steve,

With OGR, you can get the units with :
- OSRGetAngularUnits() if OSRIsGeographic()
- OSRGetLinearUnits() if OSRIsProjected()

Even

> 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.
>
> Steve
>


-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the mapserver-dev mailing list