[mapserver-users] Re: Rendering Challenges - GEOMTRANSFORM

Brent Fraser bfraser at geoanalytic.com
Mon May 16 11:52:21 EDT 2011


On 5/13/2011 6:30 AM, Lime, Steve D (DNR) wrote:
> Cool. I committed that patch in trunk in what will be 6.2 if folks are interested. I'll add a few other functions too (see ticket #3871).
>
> Regarding other uses, sure it's possible. We'd need to add the GEOMTRANSFORM processing to labels and execute it before computing a label point.
>
> I've also thought about defining a layer-level GEOMTRANSFORM that would alter the original geometry before any processing so all classes and styles would be affected and you could query it. ;-)
Sounds powerful for buffered queries,etc.  So would we have
     Layer-level GEOMTRANSFORM  (applies to rendered geometry, labels, 
queries)
     Style-level GEOMTRANSFORM  (applies to rendered geometry only)
     Label-level GEOMTRANSFORM  (applies to label placement only)

> Your last idea (8) is a bit different. Here's you're talking about a drawing effect so we're back into styles, but in this case a label's style. Issue here is that a label has two geometries - the point, and the bbox(es) so which are you referencing with [shape]? I'm thinking that in this context we'd always mean the bbox(es) so you could create a buffered convex hull easily and draw it under a label.
How about having [labelpointshape] and [labelbboxshape]?  And I'm not 
sure the label's convex hull would be the way to go (for my problem at 
least); it might erase too much in the case of a horseshoe shaped 
label.  Have a look at the example Daniel generated for the curved label 
enhancement: 
http://trac.osgeo.org/mapserver/attachment/ticket/3523/maxoverlapangle-2.png

A better polygon might be generated by  
simplify(union(characterbboxshape)) .

Thanks!
Brent

> Probably should create a couple of tickets...
>
> Steve
>
> -----Original Message-----
> From: Brent Fraser [mailto:bfraser at geoanalytic.com]
> Sent: Thursday, May 12, 2011 10:08 AM
> To: Lime, Steve D (DNR)
> Cc: mapserver-users at lists.osgeo.org
> Subject: Rendering Challenges - GEOMTRANSFORM
>
> Steve,
>
>     Thanks to your patch I was able to render thick lines inside polygons
> (http://i56.tinypic.com/1z347yq.jpg).
>
> The solution of using a STYLE with GEOMTRANSFORM got me thinking of
> using the technique to solve some of the labeling challenges:
>
> 2. Place polygon annotation on/inside boundary line
> (http://trac.osgeo.org/mapserver/ticket/1592 point 8.)
>       - label the line geometry resulting from  GEOMTRANSFORM
> (buffer([shape], -3)) of the original polygon
>
> 5. Place line anno above (or below) when using ANGLE FOLLOW
>       - label the line geometry resulting from GEOMTRANSFORM
> (buffer([shape], 5)) of the original line
>
> Currently the LABEL object uses the original geometry.  Do you think it
> would be possible to [optionally?] use the GEOMTRANSFORMed geometry?
>
>
>     Similarly, would it be possible to have the LABEL's convex hull (or a
> buffer the character boxes?) used as a clipping polygons of the layer's
> geometry to address:
>
> 8. Erase layer's geometry (but not other layers) under label
>      - possible syntax:  GEOMTRANSFORM ( clip( [labelpoly] ) )
>
> Your thoughts?
>



More information about the mapserver-users mailing list