Hi,
this pull request contains the work to support a per property uom in SLD
1.1 (which already
has the concept, even if limited to px units) and SLD 1.0 as well:
https://github.com/geotools/geotools/pull/314
(we discussed this topic some time ago on this very list:
http://osgeo-org.1560.x6.nabble.com/Supporting-uom-per-property-in-SLD-td5082236.html
)
The patch revolves around a few concepts, and a solid refactor to avoid the
various style rescalers
to turn into a mess:
* each property representing a length can have a local uom, for example,
10px, 15m, 8ft
* different rescalers work in different way, the generic
RescaleStyleVisitor will multiply the number
and leave the unit be, the DPIRescaleStyleVisitor will only rescale pixel
values, UomRescaleStyleVisitor
will instead turn meters and feet in pixels (taking into account the
current scale) for display purposes
* a Measure package private class is added that parses the various measures
into a value, a unit, and
eventual default unit
* a RescaleMode enumeration handles the three different ways to apply
rescaling
* in case the unit cannot be known during style rescaling (because the
value is the result of a non literal
expression) then a custom filter function is invoked that will perform
the scaling once the specific value
is known, allowing us to support completely dynamic values and unit (yes,
the unit can change per property
if needs be)
This should brings us a bit closer to SE 1.1 compatibilty, and bridge the
gap with CSS where the only
way to specify a unit of measure is indeed per property
I plan to merge it tomorrow, but wanted to give others an occasion to
comment.
By the way, I've also added tests to make sure SLD 1.0 can round trip
properly with property local unit
of measures, and tried to do the same with SLD 1.1 xsd-sld module but...
discovered the module
in question works only in parsing mode, but not in encoding mode :-(
Cheers
Andrea
--
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.
==
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel