andrea antonello ha scritto:
> Hi, I am trying to get offset for points inside the style editor for udig.
> The only way to do offset I found around is here:
> 
> http://docs.geoserver.org/stable/en/user/styling/sld-extensions/geometry-transformations.html#drop-shadow
> 
> The problem is that the offset like that is in map units, which is not
> exactly what I hoped for, since the preview window is in pixels and
> also in the case I would want to create a composed mark, I would need
> to define offsets in pixels.
> 
> Is there any other way to do offset of points?

I can't think of a quick and sane way that actually works in all cases.

One way could be to set the scale denominator into the env function,
and compute an offset in real world units given the scale. But that
would not work nicely if the rendering is reprojecting the
data from a geographic srs to a projected one (as the scale would
say something only about the projected to screen transform).

Another way would be to add a unit of measure onto the geometry
element, or use the symbolizer unit of measure, but that would have even
less sense.
Not using <geometry>...</geometry> in a symbolizer, and assuming
you have a shapefile, so that we konw the geometry attribute name,
it 100% equivalent to stating:

<geometry><PropertyName>the_geom</PropertyName></geometry>

Now, if we add a unit of measure attribute on that what do we mean,
that we want to consider the geometry coordinates, expressed in lon/lat,
as pixels directly?

A sane way would be to introduce a transformation that explicitly
works against the geometry past the reprojection and on screen
transformation:

<renderingTransform><function name="offset">
   <PropertyName>the_rendered_geometry</PropertyName>
</function></renderingTransform>

where "the_rendered_geometry" is a conventional name to
gather the geometry as transformed from its native srs
into the rendering one, and from there on screen (so,
a geometry whose unit of measure is pixels, a "screen geometry").

Now, finding the time to do that and dealing with the
require API changes required in the Symbolizers... hmmm...
not sure when that is going to happen

Cheers
Andrea

-- 
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to