[mapserver-users] RE: Rendering Challenges - GEOMTRANSFORM

Lime, Steve D (DNR) steve.lime at state.mn.us
Fri May 13 08:30:31 EDT 2011


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. ;-)

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.

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?

-- 
Best Regards,
Brent Fraser






More information about the mapserver-users mailing list