[mapserver-users] using MINSIZE and MAXSIZE with ANCHORPOINT

Havard Tveite havard.tveite at nmbu.no
Thu Oct 6 05:08:33 PDT 2016


Hi,

I can't see any mistakes.

I tried to test this on with 6.4.2 and 7.0.1 (sorry I have not
installed 7.0.2 yet), and am not able to reproduce the behaviour
that you describe.  ANCHORPOINT seems to work as expected.
Which Mapserver version are you using?

I have run it using shp2img -m

I attach the resulting images (the last number in the file name
reflects the symbolscaledenominator that has been used).

Here is my complete mapfile:

MAP
   SIZE 100 100
   EXTENT 0 0 100 100
   SYMBOL
     NAME "arrowv"
     TYPE vector
     ANCHORPOINT 0.5 1
     POINTS
       0 2
       1 0
       2 2
       -99 -99
       1 0
       1 3
     END
   END
   SYMBOL
     NAME "circle"
     TYPE ellipse
     POINTS
       1 1
     END
     FILLED TRUE
   END
   LAYER
     NAME "arrows"
     TYPE POINT
     STATUS DEFAULT
     PROCESSING "Items=angle"
     #SYMBOLSCALEDENOM 20000
     #SYMBOLSCALEDENOM 10000
     SYMBOLSCALEDENOM 4000
     FEATURE
       POINTS
         50 20
       END # Points
       ITEMS "90"
     END # Feature
     FEATURE
       POINTS
         10 90
       END # Points
       ITEMS "-135"
     END # Feature
     CLASS
       NAME "vector"
       STYLE
         SYMBOL "arrowv"
         MINSIZE 5
         SIZE 10
         MAXSIZE 40
         MINWIDTH 1
         MAXWIDTH 1
         COLOR 0 0 255
         ANGLE [angle]
       END # STYLE
       STYLE
         SYMBOL "circle"
         COLOR 255 0 0
         MINSIZE 3
         SIZE 3
         MAXSIZE 3
       END # STYLE
     END #class
   END #layer
END # Map file

On 23. sep. 2016 19:20, Richard Greenwood wrote:
> It seems like my symbol's ANCHORPOINT is not being scaled when my style
> definition uses MINSIZE, MAXSIZE and MAXSCALEDENOM.
>
> Here's my symbol definition:
>
> SYMBOL
>   NAME "arrowv"
>   TYPE vector
>   ANCHORPOINT 0.5 1
>   POINTS
>     0 2
>     1 0
>     2 2
>     -99 -99
>     1 0
>     1 3
>   END
> END
>
> and my style definition:
>
>     STYLE
>       SYMBOL "arrowv"
>       SIZE 40
>       COLOR 0 0 255
>       ANGLE [angle]
>     END
>
> Which produces what I want:
>
> (​The red dot is the map x, y insertion point)
> but when I add SYMBOLSCALEDENOM and change my symbol definition to:
>
>     STYLE
>       SYMBOL "arrowv"
>       MINSIZE 15
>       MAXSIZE 40
>       COLOR 0 0 255
>       MINWIDTH 1
>       MAXWIDTH 1
>       ANGLE [angle]
>     END
>
> I get:
>
> The ANCHORPOINT is not scaled along with the symbol. A little hard to
> see in these two, but the ANCHORPOINT is being used, just not scaled:
>
> ANCHORPOINT 0 0
>
> ANCHORPOINT 1 1
>
>> ​Am I doing something wrong?
>
> Thanks,
> Rich
>
> --
> Richard W. Greenwood, PLS
> www.greenwoodmap.com <http://www.greenwoodmap.com>
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>

-- 
Håvard Tveite
Department of Mathematical Sciences and Technology, NMBU
Drøbakveien 31, POBox 5003, N-1432 Ås, NORWAY
Phone: +47 67231548 Fax: +47 64965401 http://www.nmbu.no/imt/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: anchorpointscale7_20000.png
Type: image/png
Size: 848 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20161006/6ece27a7/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: anchorpointscale6_20000.png
Type: image/png
Size: 848 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20161006/6ece27a7/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: anchorpointscale7_4000.png
Type: image/png
Size: 659 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20161006/6ece27a7/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: anchorpointscale6_4000.png
Type: image/png
Size: 659 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20161006/6ece27a7/attachment-0007.png>


More information about the mapserver-users mailing list