[mapserver-dev] RFC 89 Layer Geomtransform: Call for vote
Daniel Morissette
dmorissette at mapgears.com
Wed Feb 20 19:11:29 PST 2013
On 13-02-20 1:36 PM, Alan Boudreault wrote:
> Initially, that's what I wanted to avoid: adding new GEOMTRANSFORMUNITS.
> We already have UNITS, TOLERANCEUNITS and SIZEUNITS. I would tend to
> force the user to use UNITS with GEOMTRANSFORM. I'm not necessary right
> though.
>
Thinking about this some more and out loud:
- unless I'm mistaken, the UNITS value will matter in this context only
if you use the [map_cellsize] variable in your GEOMTRANSFORM expression.
In this case the UNITS setting is used to convert the map->cellsize from
the map output units to the units of the source data
- if you don't use the [map_cellsize] variable then the args (e.g. the
simplify or buffer tolerance)) are passed directly to the corresponding
function (GEOS or other), so the arg value is assumed to be in the same
units as the source data (whatever it is) and the UNITS setting has no
impact in this case
- there is currently no way in MapServer to set UNITS to a null/unset
value, so we have no way to know if UNITS was explicitly set in the
mapfile or not (the default units setting is meters)
- adding a GEOMTRANSFORMUNITS param (presumably to add the ability to
pass the tolerance args in arbitrary units instead of in the data
source's units) will just complicate the issue and not solve the core
issue which is to determine in which units the original data source
coordinates are in order to convert the map>cellsize from map output
units to layer data source units for use in the [map_cellsize] variable
If the above are true, then a simple solution would be to always use the
layer->units value and never try to lookup of the projection units. We
should document the requirement to set UNITS together with the
[map_cellsize] variable docs (at the same place). If one chooses to use
[map_cellsize] in their GEOMTRANSFORM expression then they MUST also
explicitly set UNITS in the layer to the correct value (corresponding to
the UNITS of the raw vector data source).
--
Daniel Morissette
http://www.mapgears.com/
Provider of Professional MapServer Support since 2000
More information about the mapserver-dev
mailing list