<html>
  <head>

  </head>
  <body style="font-family: Comic Sans MS; margin-bottom: 1px; font-size: 12pt; margin-left: 4px; font-variant: normal; font-weight: normal; line-height: normal; margin-top: 4px; font-style: normal; margin-right: 4px">
    <p style="margin-top: 0; margin-bottom: 0">
      <font size="3" face="Comic Sans MS">All&#44;</font>    </p>
<br>      
    <p style="margin-top: 0; margin-bottom: 0">
      <font size="3" face="Comic Sans MS">I&#39;ve been following this thread with interest.</font>    </p>
<br>      
    <p style="margin-top: 0; margin-bottom: 0">
      <font size="3" face="Comic Sans MS">Was wondering&#44; does it make any sense to consider building out an entirely new geometry set that is based on the original geometry. &nbsp;On the surface this seems like overkill&#44; but I wonder if treating this situation as an indexing sort of problem might not help. &nbsp;The buffered result geometries could easily become more complex than the original geometries for example&#44; and having them as a separated group may be beneficial to performance tuning&#44; etc.</font>    </p>
<br>      
    <p style="margin-top: 0; margin-bottom: 0">
      <font size="3" face="Comic Sans MS">Might this be a new commandline tool for building these extras into a dataset &#40;similar to making IDX files&#63;&#41;. &nbsp;I could think of a few uses of this type of thing for highlighting&#44; etc. &nbsp;Although&#44; now that I&#39;ve thought about it even more&#44; the idea of being able to change these things on the fly makes the whole conversation go round back to the beginning again. &nbsp;:c&#41;. &nbsp;Making the buffering dynamic has it&#39;s advantages as well for example.</font>    </p>
<br>      
    <p style="margin-top: 0; margin-bottom: 0">
      <font size="3" face="Comic Sans MS">bobb</font>    </p>
<br>      <br><br>
    <p style="margin-top: 0; margin-bottom: 0">
      <br>
      <br>
      &gt;&gt;&gt; Brent Fraser &lt;bfraser@geoanalytic.com&gt; wrote:<br>    </p>
    <table style="margin-bottom: 0; font-size: 1em; margin-left: 15px; margin-top: 0; margin-right: 0" border="0" bgcolor="#f3f3f3">
      <tr>
        <td>
          <div style="border-left: solid 1px #050505; padding-left: 7px">
            <p style="margin-top: 0; margin-bottom: 0">
              Thomas&#44;<br><br>&#160;&#160;&#32;Yes&#44; I&#39;ve been trying to come up with good map file syntax to<br>indicate labeling of the transformed geometry.&#160;&#32;Currently mapserver allows:<br>- transformed original geometry &#40;buffer&#44; difference&#41;<br>- augmented original geometry &#40;bbox&#44; start/end&#44; vertices&#41;<br>- rendered label geometry &#40;labelpoint&#44; labelpoly&#41;<br><br>but it doesn&#39;t label transformed geometry&#44; only original geometry.&#160;&#32;The<br>main problem &#40;from a user interface perspective&#41; is how to relate<br>transformed geometry to the label specification.<br><br>One solution is to allow a LABEL object within a STYLE object:<br><br>&#160;&#160;&#160;&#160;&#32;CLASS<br>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#32;NAME &#39;Streams&#39;<br>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#32;STYLE<br>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#32;GEOMTRANSFORM &#40;buffer&#40;&#91;shape&#93;&#44; 5&#41;&#41;<br><br>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#32;LABEL<br>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#32;usual label settings<br>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#32;END &#35; Label<br>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#32;END &#35; Style<br><br>but that&#39;s a little strange as STYLE objects are currently allowed<br>within LABEL objects.<br><br>Another solution is to have &quot;named&quot; geometry and reference it in the<br>LABEL object &#40;and keep the existing CLASS/STYLE/LABEL structure&#41;:<br><br>&#160;&#160;&#160;&#160;&#32;CLASS<br>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#32;NAME &#39;Streams&#39;<br>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#32;STYLE<br>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#32;GEOMTRANSFORM my_label_shape &#61; &#40;buffer&#40;&#91;shape&#93;&#44; 5&#41;&#41;<br>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#32;END &#35; Style<br><br>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#32;LABEL<br>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#32;usual label settings<br>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#32;GEOMETRY my_label_shape<br>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#32;END &#35; Label<br><br>And I&#39;m sure there are other &#40;and hopefully better&#41; solutions.<br><br>Best Regards&#44;<br>Brent Fraser<br><br><br>On 6/6/2011 11:02 AM&#44; thomas bonfort wrote:<br>&gt; Yes&#44; the resulting shape seems like a nice candidate for offseting<br>&gt; labels&#44; but the problem with buffer is you will have more difficulty<br>&gt; in deciding what is to the left from what is to the right of the line.<br>&gt; We&#39;d also have to make sure that the buffer operation is not too<br>&gt; costly on cpu cycles.<br>&gt; Anyways&#44; until geomtransform is not applied at the layer level&#44; there<br>&gt; is no way to use this method as the label does not operate on the<br>&gt; transformed geometry.<br>&gt;<br>&gt; On Mon&#44; Jun 6&#44; 2011 at 17:30&#44; Brent Fraser&lt;bfraser@geoanalytic.com&gt;&#160;&#32;wrote:<br>&gt;&gt; Steve&#44;<br>&gt;&gt;<br>&gt;&gt;&#160;&#160;&#32;I think just buffering the line would apply a type of smoothing &#40;see<br>&gt;&gt; attached image&#41;.&#160;&#32;Using the resulting buffer line &#40;or perhaps doing some<br>&gt;&gt; simple line smoothing on it&#41; for labeling would be good enough.<br>&gt;&gt;<br>&gt;&gt; Best Regards&#44;<br>&gt;&gt; Brent Fraser<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; On 6/6/2011 9:04 AM&#44; Stephen Woodbridge wrote:<br>&gt;&gt;&gt; Duh&#33; you are correct&#44; I always forget this point until I after my second<br>&gt;&gt;&gt; cup of coffee has kicked in :&#41;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; That article looks very interesting&#44; I have to read up on that.<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; In a past career in computer aided design and manufacturing&#44; we used the<br>&gt;&gt;&gt; idea of a rolling ball offset because it modeled a milling machine. The<br>&gt;&gt;&gt; rolling ball offset is defined as the curve traced by the center of a ball<br>&gt;&gt;&gt; of a given radius as you roll it along a curve. The circumference of the<br>&gt;&gt;&gt; ball can not cross over the original curve so for tight &quot;S&quot; curves if the<br>&gt;&gt;&gt; diameter of the ball is larger than the gap in the &quot;S&quot; then the ball does<br>&gt;&gt;&gt; not enter the gap but floats over it. This same concept would make for well<br>&gt;&gt;&gt; behaved and good looking labels along tight twisty paths like rivers and<br>&gt;&gt;&gt; roads.<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; Another idea for smoothing out curves for labeling might be to apply an N<br>&gt;&gt;&gt; point moving average and allow that to be the label path. I don&#39;t think this<br>&gt;&gt;&gt; has been mentioned as an option in the past.<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; -Steve W<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; On 6/6/2011 10:20 AM&#44; thomas bonfort wrote:<br>&gt;&gt;&gt;&gt; There are two problems with the solution you propose:<br>&gt;&gt;&gt;&gt; - if you offset the geometry in postgis&#44; the distance of the offset<br>&gt;&gt;&gt;&gt; will be in geographical units&#44; i.e. it will not give correct results<br>&gt;&gt;&gt;&gt; at all scales when rendered with mapserver &#40;what you basically want is<br>&gt;&gt;&gt;&gt; to offset the line by a number of pixels roughly equal to the size of<br>&gt;&gt;&gt;&gt; the font used for labelling&#41;<br>&gt;&gt;&gt;&gt; - angle follow on offset line should probably be done on a<br>&gt;&gt;&gt;&gt; simplified/smoothed geometry. see<br>&gt;&gt;&gt;&gt; <a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.24.6970">http://citeseerx.ist.psu.edu/viewdoc/summary&#63;doi&#61;10.1.1.24.6970</a>&nbsp;.<br>&gt;&gt;&gt;&gt; Ideally someone will want the feature badly enough to fund it :&#41;<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; --<br>&gt;&gt;&gt;&gt; thomas<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt; On Mon&#44; Jun 6&#44; 2011 at 16:02&#44; Stephen Woodbridge<br>&gt;&gt;&gt;&gt; &lt;woodbri@swoodbridge.com&gt;&#160;&#160;&#160;&#32;wrote:<br>&gt;&gt;&gt;&gt;&gt; There was some recent discussion on the dev list about potentially using<br>&gt;&gt;&gt;&gt;&gt; the<br>&gt;&gt;&gt;&gt;&gt; GEOMTRANSFORM to do something like a single sided offset then using that<br>&gt;&gt;&gt;&gt;&gt; to<br>&gt;&gt;&gt;&gt;&gt; apply the label to. BUT I do not think that has been implemented yet in<br>&gt;&gt;&gt;&gt;&gt; mapserver.<br>&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt; Google for &quot;mapserver geomtransform&quot; also look at &quot;geoprocessing&quot; for<br>&gt;&gt;&gt;&gt;&gt; some<br>&gt;&gt;&gt;&gt;&gt; other ideas.<br>&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt; Anyway&#44; you might be able to do what you want if you:<br>&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt; 1. import your data into PostGIS<br>&gt;&gt;&gt;&gt;&gt; 2. create offset geometry in another table<br>&gt;&gt;&gt;&gt;&gt; 3. export that table to a shapefile<br>&gt;&gt;&gt;&gt;&gt; 4. then label that as an annotation layer so you do not draw the<br>&gt;&gt;&gt;&gt;&gt; geometry<br>&gt;&gt;&gt;&gt;&gt; only the label and use the original data to draw the grometry ie: two<br>&gt;&gt;&gt;&gt;&gt; layers.<br>&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt; I have not tried this&#44; but it might solve your problem.<br>&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt; -Steve W<br>&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt; On 6/6/2011 9:48 AM&#44; uvg wrote:<br>&gt;&gt;&gt;&gt;&gt;&gt; Thank you&#44; Thomas.<br>&gt;&gt;&gt;&gt;&gt;&gt; Are there any workarounds for this problem&#63;<br>&gt;&gt;&gt;&gt;&gt;&gt; Is there &#39;best practices&#39; for the problem&#63;<br>&gt;&gt;&gt;&gt;&gt;&gt; Maybe unvisible layer or other&#63;<br>&gt;&gt;&gt;&gt;&gt;&gt; 06.06.2011&#44; 17:35&#44; &quot;thomas bonfort &#91;via OSGeo.org&#93;&quot;&lt;&#91;hidden email&#93;<br>&gt;&gt;&gt;&gt;&gt;&gt; &lt;/user/SendEmail.jtp&#63;type&#61;node&amp;node&#61;6445194&amp;i&#61;0&gt;&gt;:<br>&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt;&#160;&#160;&#160;&#160;&#32;The status has not changed: label follow with offset is not<br>&gt;&gt;&gt;&gt;&gt;&gt; supported.<br>&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt;&#160;&#160;&#160;&#160;&#32;regards&#44;<br>&gt;&gt;&gt;&gt;&gt;&gt;&#160;&#160;&#160;&#160;&#32;thomas<br>&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt;&#160;&#160;&#160;&#160;&#32;On Mon&#44; Jun 6&#44; 2011 at 15:33&#44; uvg&lt;&#91;hidden email&#93;&gt;&#160;&#160;&#160;&#32;wrote:<br>&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#160;&#160;&#32;Hi all&#33;<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#160;&#160;&#32;Sorry for my bad English.<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#160;&#160;&#32;I am trying to achieve is a label that follows the rivers that is<br>&gt;&gt;&gt;&gt;&gt;&gt;&#160;&#160;&#160;&#160;&#32;also<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#160;&#160;&#32;OFFSET so that<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#160;&#160;&#32;the label does not &#39;above&#39; on the line for the river.<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#160;&#160;&#32;Sample code of mapfile:<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#160;&#160;&#32;LABEL<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#160;&#160;&#32;COLOR 0 40 255<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#160;&#160;&#32;FONT &quot;arial-italic&quot;<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#160;&#160;&#32;TYPE truetype<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#160;&#160;&#32;SIZE 7<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#160;&#160;&#32;OFFSET 5 0<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#160;&#160;&#32;ANGLE FOLLOW<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#160;&#160;&#32;POSITION LC<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#160;&#160;&#32;FORCE true<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#160;&#160;&#32;PARTIALS FALSE<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#160;&#160;&#32;END<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#160;&#160;&#32;&quot;OFFSET&quot; does not work.<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#160;&#160;&#32;How can I offset a label&#63;<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#160;&#160;&#32;I found a message posted for a long time:<br>&gt;&gt;&gt;&gt;&gt;&gt;&gt;&#160;&#160;&#32;click here.<br>&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt; View this message in context: Re: ANGLE FOLLOW and Label Offset &#40;v.<br>&gt;&gt;&gt;&gt;&gt;&gt; 5.6.6&#41;<br>&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt; &lt;<a href="http://osgeo-org.1803224.n2.nabble.com/ANGLE-FOLLOW-and-Label-Offset-v-5-6-6-tp6445138p6445194.html">http://osgeo-org.1803224.n2.nabble.com/ANGLE-FOLLOW-and-Label-Offset-v-5-6-6-tp6445138p6445194.html</a>&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt; Sent from the Mapserver - User mailing list archive<br>&gt;&gt;&gt;&gt;&gt;&gt; &lt;<a href="http://osgeo-org.1803224.n2.nabble.com/Mapserver-User-f1969211.html">http://osgeo-org.1803224.n2.nabble.com/Mapserver-User-f1969211.html</a>&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt;&#160;&#160;&#32;at<br>&gt;&gt;&gt;&gt;&gt;&gt; Nabble.com.<br>&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt;&gt;&gt;&gt; _______________________________________________<br>&gt;&gt;&gt;&gt;&gt;&gt; mapserver-users mailing list<br>&gt;&gt;&gt;&gt;&gt;&gt; mapserver-users@lists.osgeo.org<br>&gt;&gt;&gt;&gt;&gt;&gt; <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>&gt;&gt;&gt;&gt;&gt; _______________________________________________<br>&gt;&gt;&gt;&gt;&gt; mapserver-users mailing list<br>&gt;&gt;&gt;&gt;&gt; mapserver-users@lists.osgeo.org<br>&gt;&gt;&gt;&gt;&gt; <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>&gt;&gt;&gt;&gt;&gt;<br>&gt;&gt;&gt; _______________________________________________<br>&gt;&gt;&gt; mapserver-users mailing list<br>&gt;&gt;&gt; mapserver-users@lists.osgeo.org<br>&gt;&gt;&gt; <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>&gt;&gt;&gt;<br>&gt;&gt; _______________________________________________<br>&gt;&gt; mapserver-users mailing list<br>&gt;&gt; mapserver-users@lists.osgeo.org<br>&gt;&gt; <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>&gt;&gt;<br>&gt;&gt;<br><br>_______________________________________________<br>mapserver-users mailing list<br>mapserver-users@lists.osgeo.org<br><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
            </p>
          </div>
        </td>
      </tr>
    </table>
  </body>
</html>