Thank you very much everyone. And especially Thomas. That was indeed what I was looking for. You saved me a lot of work! <br><br>Much appreciated.<br><br><div class="gmail_quote">On 12 August 2010 17:50, Fawcett, David (MPCA) <span dir="ltr">&lt;<a href="mailto:David.Fawcett@state.mn.us">David.Fawcett@state.mn.us</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Thanks Thomas<br>
<br>
That looks nice in my test example.<br>
<font color="#888888"><br>
David.<br>
</font><div><div></div><div class="h5"><br>
-----Original Message-----<br>
From: thomas bonfort [mailto:<a href="mailto:thomas.bonfort@gmail.com">thomas.bonfort@gmail.com</a>]<br>
Sent: Thursday, August 12, 2010 10:45 AM<br>
To: Fawcett, David (MPCA)<br>
Cc: Wim Vanbelle; <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
Subject: Re: [mapserver-users] Offset values from database<br>
<br>
the -99 is a special offset value that shifts the line as you are looking for.<br>
<br>
style<br>
  color 255 0 0<br>
  offset -2 -99<br>
  width 2<br>
end<br>
style<br>
  color 0 255 0<br>
  offset 2 -99<br>
  width 2<br>
end<br>
<br>
<br>
not perfect as there are artifacts on sharp angles, but worth a try.<br>
<br>
regards,<br>
thomas<br>
<br>
On Thu, Aug 12, 2010 at 16:56, Fawcett, David (MPCA)<br>
&lt;<a href="mailto:David.Fawcett@state.mn.us">David.Fawcett@state.mn.us</a>&gt; wrote:<br>
&gt; Wim,<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; You can do these offsets in pixel values at a class level, just not a<br>
&gt; feature level.  This pretty much does what you are describing, although it<br>
&gt; gets a little funky when the lines are diagonal and not straight.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;     CLASS<br>
&gt;<br>
&gt;         STYLE<br>
&gt;<br>
&gt;             COLOR 0 0 0<br>
&gt;<br>
&gt;             WIDTH 2<br>
&gt;<br>
&gt;         END<br>
&gt;<br>
&gt;         STYLE<br>
&gt;<br>
&gt;             COLOR 255 0 0<br>
&gt;<br>
&gt;             WIDTH 2<br>
&gt;<br>
&gt;             OFFSET 10 10<br>
&gt;<br>
&gt;         END<br>
&gt;<br>
&gt;         STYLE<br>
&gt;<br>
&gt;             COLOR 0 255 0<br>
&gt;<br>
&gt;             WIDTH 2<br>
&gt;<br>
&gt;             OFFSET -10 -10<br>
&gt;<br>
&gt;         END<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;     END<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; David.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; From: <a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a><br>
&gt; [mailto:<a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>] On Behalf Of Wim Vanbelle<br>
&gt; Sent: Thursday, August 12, 2010 9:32 AM<br>
&gt; To: <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
&gt; Subject: Re: [mapserver-users] Offset values from database<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Maybe this pic helps elaborate on what i&#39;m trying to accomplish:<br>
&gt; <a href="http://fileshare.myroute.be/exchange/asymmetriclinedrawing.png" target="_blank">http://fileshare.myroute.be/exchange/asymmetriclinedrawing.png</a><br>
&gt; It should be noted that the distance between the 2 (new) lines, should be a<br>
&gt; fixed value over the zoomlevels. It must not be the case that at the<br>
&gt; furthest zoomlevel the lines are further apart.<br>
&gt;<br>
&gt; I&#39;ve looked all over for this, but never really found a proper solution. I<br>
&gt; tried cartographic symbol drawing, but it only draws on the same side every<br>
&gt; time. Maybe I&#39;m just doing it wrong :).<br>
&gt;<br>
&gt; On 12 August 2010 16:28, Wim Vanbelle &lt;<a href="mailto:wimvanbelle@gmail.com">wimvanbelle@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; Hello,<br>
&gt;<br>
&gt; thanks for your feedback.<br>
&gt;<br>
&gt; The issue with this, is that the underlying linestrings (the 2 that would<br>
&gt; lie on top of eachother), have different colors :(.<br>
&gt;<br>
&gt; So they have to be moved apart from one another. I have not found a way to<br>
&gt; do this with asymmetric line drawing either, as it will always offset to the<br>
&gt; same side.<br>
&gt;<br>
&gt; This is why i would need the offset value to be configurable in the<br>
&gt; database. I could select a different pixel offset for each line and they<br>
&gt; would always appear next to eachtoher (no matter what zoomlevel).<br>
&gt;<br>
&gt; I can elaborate on the problem more if I am a little too confusing !<br>
&gt;<br>
&gt; On 12 August 2010 16:20, Cristiano Sumariva &lt;<a href="mailto:sumariva@gmail.com">sumariva@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; If it is a display problem why not try create some special symbology to<br>
&gt; overlap one line with another using different symbol strokes. So the user<br>
&gt; will se that are 2 lines overlayed.<br>
&gt;<br>
&gt; 2010/8/12 Wim Vanbelle &lt;<a href="mailto:wimvanbelle@gmail.com">wimvanbelle@gmail.com</a>&gt;<br>
&gt;<br>
&gt; Hi David,<br>
&gt;<br>
&gt; I read that documentation before though. I was hoping it just hadn&#39;t been<br>
&gt; updated... Is this possibly a feature for 6.0 ?<br>
&gt;<br>
&gt; Are there any other ways how one could offset a feature in pixels, rather<br>
&gt; than in lat/long coords?<br>
&gt;<br>
&gt; Maybe I should elaborate on the original problem a little. Consider 2 line<br>
&gt; segments that lie above one another. The general idea is to &#39;offset&#39; them a<br>
&gt; given x , y value, so they will both display next to one another, rather<br>
&gt; than on top of eachother.<br>
&gt;<br>
&gt; If you would however perform this code simply on lat/long values, it would<br>
&gt; imply, that when scaling your map at the most detailed zoom level, the lines<br>
&gt; would lie very far apart, and when zoomed out, they would appear to lie on<br>
&gt; top of eachother.<br>
&gt;<br>
&gt; I find it hard to believe that I would need to pre calculate all the data in<br>
&gt; order to obtain geometry objects for each zoom level.<br>
&gt;<br>
&gt; Maybe some veterans have some good insight in this :).<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On 12 August 2010 15:26, Fawcett, David (MPCA) &lt;<a href="mailto:David.Fawcett@state.mn.us">David.Fawcett@state.mn.us</a>&gt;<br>
&gt; wrote:<br>
&gt;<br>
&gt; Wim,<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; If you don’t want me to tell you, you will likely want to look at the<br>
&gt; mapfile documentation at: <a href="http://mapserver.org/mapfile/style.html" target="_blank">http://mapserver.org/mapfile/style.html</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; [Spoiler Alert]<br>
&gt;<br>
&gt; You can’t use values from an attribute table to set the value of this<br>
&gt; property<br>
&gt;<br>
&gt; [/Spoiler Alert]<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; David.<br>
&gt;<br>
&gt; From: <a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a><br>
&gt; [mailto:<a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>] On Behalf Of Wim Vanbelle<br>
&gt; Sent: Thursday, August 12, 2010 5:48 AM<br>
&gt;<br>
&gt; To: <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
&gt;<br>
&gt; Subject: [mapserver-users] Offset values from database<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Hi,<br>
&gt;<br>
&gt; I&#39;m trying to load offset X, Y data from the postgis database.<br>
&gt;<br>
&gt; Each feature has an offset value defined there.<br>
&gt;<br>
&gt; My mapfile (relevant part) looks like this:<br>
&gt;<br>
&gt; In the layer:<br>
&gt;                 DATA                    &quot;geom_mercator from map_links using<br>
&gt; unique Id using SRID=900913&quot;<br>
&gt;<br>
&gt;                         STYLE<br>
&gt;                                 WIDTH 6<br>
&gt;                                 COLOR 0 255 0<br>
&gt;                                 ANTIALIAS TRUE<br>
&gt;                                 ANGLE AUTO<br>
&gt;                                 OFFSET [offsetX] [offsetY]<br>
&gt;                         END<br>
&gt;<br>
&gt; Please don&#39;t tell me the offsetX, Y values cannot be read from the database.<br>
&gt; That would be a huge issue for me.<br>
&gt;<br>
&gt; Thank you for your time.<br>
&gt;<br>
&gt; Best regards<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; mapserver-users mailing list<br>
&gt;<br>
&gt; <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
&gt;<br>
&gt; <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; mapserver-users mailing list<br>
&gt; <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
&gt; <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
&gt;<br>
&gt;<br>
<br>
</div></div></blockquote></div><br>