[mapserver-users] Angle Follow will accept only simple linestring don't MultiLinestring ?

thomas bonfort thomas.bonfort at gmail.com
Wed Aug 14 00:40:06 PDT 2013


Andrea, can you confirm if you are having the error when you remove
the label offset ?

On 14 August 2013 09:37, Andrea Peri <aperi2007 at gmail.com> wrote:
> Hi,
>
> My theory is not true.
>
> I was able to create a  featureset that like my image that will work when
> the visible box clip it creating a multilinestring..
>
> sorry for noise,
>
> My quest still go on.
>
> Regards,
>
>
>
>
> 2013/8/13 Andrea Peri <aperi2007 at gmail.com>
>>
>> Hi,
>> Perhaps I found the explanation.
>>
>> The "angle follow" with OGR is using the
>> BufferBuilder::bufferLineSingleSided
>> That function seem don't work with a MultiLinestring . It necessary need a
>> simple linestring.
>>
>> The question is that sometime the simple linestirng when is clipped from
>> the visible bbox of the map to render, is transformed in a MultiLinestring.
>> As showed in attached image.
>>
>> So a linestring geometry clipped by the visible bbox will become a
>> multilinestring geometry and the bufferLineSingleSided will give error to
>> put a "follow angle".
>>
>> Andrea.
>>
>> 2013/8/13 Andrea Peri <aperi2007 at gmail.com>
>>>
>>> ok, thx.
>>> I change to multiple scale.
>>>
>>> However I do a rapid check removing a label component, but the problem is
>>> still here.
>>>
>>> Now I rewrite a more exact mapfile using two classes.
>>>
>>> Andrea.
>>>
>>>
>>>
>>>
>>> 2013/8/13 thomas bonfort <thomas.bonfort at gmail.com>
>>>>
>>>> yes, that's incompatible. use multiple scale-dependant classes for now
>>>>
>>>> On 13 August 2013 18:26, Andrea Peri <aperi2007 at gmail.com> wrote:
>>>> > The two label are at different max/min scaledenominator.
>>>> > The goal is to have little label size at low scales and bigger font
>>>> > size at
>>>> > bigger scales.
>>>> >
>>>> > However only one lable is active at one scale level.
>>>> >
>>>> > Is this incompatible with "follow" ?
>>>> >
>>>> >
>>>> >
>>>> > 2013/8/13 thomas bonfort <thomas.bonfort at gmail.com>
>>>> >>
>>>> >> why the double label? they seem to be the same, but in any case
>>>> >> multiple labels are not supported for FOLLOW.
>>>> >>
>>>> >> On 13 August 2013 18:08, Andrea Peri <aperi2007 at gmail.com> wrote:
>>>> >> > I'm using spatialite 4.1.1,
>>>> >> > so use ogr to access the db.
>>>> >> >
>>>> >> >   LAYER
>>>> >> >     NAME "rt_topogr.50k.etichette.topon_idro_50k"
>>>> >> >     STATUS OFF
>>>> >> >     EXTENT 1554750.74 4678325.52 1771722.76 4924791.90
>>>> >> >     TYPE LINE
>>>> >> >     CONNECTIONTYPE OGR
>>>> >> >     CONNECTION "/path-to-spatialite/zz_topografica.sqlite"
>>>> >> >     DATA "select PK_UID_2, TOPO_OK, GEOMETRY from topon_idro_50k"
>>>> >> >     PROJECTION
>>>> >> >       "+init=epsg:3003 +towgs84=0,0,0,0,0,0,0"
>>>> >> >     END
>>>> >> >     METADATA
>>>> >> >       "wms_title" "topon_idro_50k"
>>>> >> >       "wms_extent" "1554750.74 4678325.52 1771722.76 4924791.90"
>>>> >> >     END
>>>> >> >     LABELCACHE ON
>>>> >> >     MAXSCALEDENOM 60100
>>>> >> >     MINSCALEDENOM 1
>>>> >> >     CLASS
>>>> >> >       NAME ''
>>>> >> >       MAXSCALEDENOM 60100
>>>> >> >       MINSCALEDENOM 1
>>>> >> >       LABEL
>>>> >> >         TEXT '[TOPO_OK]'
>>>> >> >         COLOR 0 85 255
>>>> >> >         OUTLINECOLOR 212 255 255
>>>> >> >         OUTLINEWIDTH 1
>>>> >> >         MAXSCALEDENOM 60100
>>>> >> >         MINSCALEDENOM 40100
>>>> >> >         FONT "LiberationSans-Regular"
>>>> >> >         TYPE truetype
>>>> >> >         SIZE 7
>>>> >> >         ANGLE FOLLOW
>>>> >> >         OFFSET 15 99
>>>> >> >         POSITION auto
>>>> >> >         PRIORITY 10
>>>> >> >         MAXOVERLAPANGLE 180.0
>>>> >> >         BUFFER 1
>>>> >> >         FORCE OFF
>>>> >> >         PARTIALS FALSE
>>>> >> >         MINDISTANCE 200
>>>> >> >       END
>>>> >> >       LABEL
>>>> >> >         TEXT '[TOPO_OK]'
>>>> >> >         COLOR 0 85 255
>>>> >> >         OUTLINECOLOR 212 255 255
>>>> >> >         OUTLINEWIDTH 1
>>>> >> >         MAXSCALEDENOM 40100
>>>> >> >         MINSCALEDENOM 1
>>>> >> >         FONT "LiberationSans-Regular"
>>>> >> >         TYPE truetype
>>>> >> >         SIZE 9
>>>> >> >         ANGLE FOLLOW
>>>> >> >         OFFSET 15 99
>>>> >> >         POSITION auto
>>>> >> >         PRIORITY 10
>>>> >> >         MAXOVERLAPANGLE 180.0
>>>> >> >         BUFFER 1
>>>> >> >         FORCE OFF
>>>> >> >         PARTIALS FALSE
>>>> >> >         MINDISTANCE 200
>>>> >> >       END
>>>> >> >     END
>>>> >> >   END
>>>> >> >
>>>> >> >
>>>> >> >
>>>> >> >
>>>> >> > 2013/8/13 thomas bonfort <thomas.bonfort at gmail.com>
>>>> >> >>
>>>> >> >> there's something strange in your error message... the
>>>> >> >> singleSidedBuffer stuff is in GEOS, and should have nothing to do
>>>> >> >> in
>>>> >> >> msOGRFileNextShape. post your whole mapfile layer.
>>>> >> >>
>>>> >> >> On 13 August 2013 17:42, Andrea Peri <aperi2007 at gmail.com> wrote:
>>>> >> >> > Hi,
>>>> >> >> >
>>>> >> >> > I tested trasforming the multilinestring dataset in a linestring
>>>> >> >> > dataset
>>>> >> >> > but
>>>> >> >> > the error is still here.
>>>> >> >> >
>>>> >> >> > msDrawMap(): Image handling error. Failed to draw layer named
>>>> >> >> > 'rt_topogr.50k.etichette.topon_idro_50k'.
>>>> >> >> >
>>>> >> >> > msOGRFileNextShape(): OGR error. IllegalArgumentException:
>>>> >> >> > BufferBuilder::bufferLineSingleSided only accept linestrings
>>>> >> >> >
>>>> >> >> > So it is not really due to a multilinestring vs linestring
>>>> >> >> > question.
>>>> >> >> >
>>>> >> >> > The quest carry on.
>>>> >> >> >
>>>> >> >> >
>>>> >> >> >
>>>> >> >> > 2013/8/13 Andrea Peri <aperi2007 at gmail.com>
>>>> >> >> >>
>>>> >> >> >> Hi,
>>>> >> >> >>
>>>> >> >> >> Try.ing to set a label on a MULTILINESTRING dataset.
>>>> >> >> >>
>>>> >> >> >> I set a label with Follow capability.
>>>> >> >> >>
>>>> >> >> >>         ANGLE FOLLOW
>>>> >> >> >>
>>>> >> >> >> But I'm having this error:
>>>> >> >> >>
>>>> >> >> >>  msOGRFileNextShape(): OGR error. IllegalArgumentException:
>>>> >> >> >> BufferBuilder::bufferLineSingleSided only accept linestrings
>>>> >> >> >>
>>>> >> >> >> Is the Follow compatible with a MultiLinestring dataset or need
>>>> >> >> >> only
>>>> >> >> >> simple linestrings ?
>>>> >> >> >>
>>>> >> >> >> Thx,
>>>> >> >> >>
>>>> >> >> >> --
>>>> >> >> >> -----------------
>>>> >> >> >> Andrea Peri
>>>> >> >> >> . . . . . . . . .
>>>> >> >> >> qwerty àèìòù
>>>> >> >> >> -----------------
>>>> >> >> >
>>>> >> >> >
>>>> >> >> >
>>>> >> >> >
>>>> >> >> > --
>>>> >> >> > -----------------
>>>> >> >> > Andrea Peri
>>>> >> >> > . . . . . . . . .
>>>> >> >> > qwerty àèìòù
>>>> >> >> > -----------------
>>>> >> >> >
>>>> >> >> > _______________________________________________
>>>> >> >> > mapserver-users mailing list
>>>> >> >> > mapserver-users at lists.osgeo.org
>>>> >> >> > http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>> >> >> >
>>>> >> >
>>>> >> >
>>>> >> >
>>>> >> >
>>>> >> > --
>>>> >> > -----------------
>>>> >> > Andrea Peri
>>>> >> > . . . . . . . . .
>>>> >> > qwerty àèìòù
>>>> >> > -----------------
>>>> >
>>>> >
>>>> >
>>>> >
>>>> > --
>>>> > -----------------
>>>> > Andrea Peri
>>>> > . . . . . . . . .
>>>> > qwerty àèìòù
>>>> > -----------------
>>>
>>>
>>>
>>>
>>> --
>>> -----------------
>>> Andrea Peri
>>> . . . . . . . . .
>>> qwerty àèìòù
>>> -----------------
>>
>>
>>
>>
>> --
>> -----------------
>> Andrea Peri
>> . . . . . . . . .
>> qwerty àèìòù
>> -----------------
>
>
>
>
> --
> -----------------
> Andrea Peri
> . . . . . . . . .
> qwerty àèìòù
> -----------------


More information about the mapserver-users mailing list