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

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


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

Spatialys - Geospatial professional services

More information about the mapserver-dev mailing list