There are two problems with the solution you propose:
- if you offset the geometry in postgis, the distance of the offset
will be in geographical units, i.e. it will not give correct results
at all scales when rendered with mapserver (what you basically want is
to offset the line by a number of pixels roughly equal to the size of
the font used for labelling)
- angle follow on offset line should probably be done on a
simplified/smoothed geometry. see
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.24.6970 .
Ideally someone will want the feature badly enough to fund it :)

--
thomas



On Mon, Jun 6, 2011 at 16:02, Stephen Woodbridge
<wood...@swoodbridge.com> wrote:
> There was some recent discussion on the dev list about potentially using the
> GEOMTRANSFORM to do something like a single sided offset then using that to
> apply the label to. BUT I do not think that has been implemented yet in
> mapserver.
>
> Google for "mapserver geomtransform" also look at "geoprocessing" for some
> other ideas.
>
> Anyway, you might be able to do what you want if you:
>
> 1. import your data into PostGIS
> 2. create offset geometry in another table
> 3. export that table to a shapefile
> 4. then label that as an annotation layer so you do not draw the geometry
> only the label and use the original data to draw the grometry ie: two
> layers.
>
> I have not tried this, but it might solve your problem.
>
> -Steve W
>
> On 6/6/2011 9:48 AM, uvg wrote:
>>
>> Thank you, Thomas.
>> Are there any workarounds for this problem?
>> Is there 'best practices' for the problem?
>> Maybe unvisible layer or other?
>> 06.06.2011, 17:35, "thomas bonfort [via OSGeo.org]" <[hidden email]
>> </user/SendEmail.jtp?type=node&node=6445194&i=0>>:
>>
>>    The status has not changed: label follow with offset is not supported.
>>
>>    regards,
>>    thomas
>>
>>    On Mon, Jun 6, 2011 at 15:33, uvg <[hidden email]> wrote:
>>
>>     > Hi all!
>>     > Sorry for my bad English.
>>     >
>>     > I am trying to achieve is a label that follows the rivers that is
>>    also
>>     > OFFSET so that
>>     > the label does not 'above' on the line for the river.
>>     >
>>     > Sample code of mapfile:
>>     >
>>     > LABEL
>>     > COLOR 0 40 255
>>     > FONT "arial-italic"
>>     > TYPE truetype
>>     > SIZE 7
>>     > OFFSET 5 0
>>     > ANGLE FOLLOW
>>     > POSITION LC
>>     > FORCE true
>>     > PARTIALS FALSE
>>     >
>>     > END
>>     >
>>     > "OFFSET" does not work.
>>     > How can I offset a label?
>>     >
>>     > I found a message posted for a long time:
>>     > click here.
>>
>>
>> View this message in context: Re: ANGLE FOLLOW and Label Offset (v.
>> 5.6.6)
>>
>> <http://osgeo-org.1803224.n2.nabble.com/ANGLE-FOLLOW-and-Label-Offset-v-5-6-6-tp6445138p6445194.html>
>> Sent from the Mapserver - User mailing list archive
>> <http://osgeo-org.1803224.n2.nabble.com/Mapserver-User-f1969211.html> at
>> Nabble.com.
>>
>>
>>
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to