Opened 18 years ago

Closed 18 years ago

#1911 closed defect (fixed)

Vectory symbols with angleitem are cut-off at certain angles when the vector has negative point values

Reported by: gdavis@… Owned by: sdlime
Priority: high Milestone:
Component: MapServer C Library Version: unspecified
Severity: normal Keywords:
Cc:

Description

My map file is connecting to a PostgreSQL database to draw position points on a
map through a WMS request.  These points have a heading value.  I am using a
vector symbol to display for each point, with an ANGLEITEM set to the heading to
rotate it at the proper value.  The following is the CLASS definition from the
map file:

CLASSITEM "id"
LABELITEM "heading"
FILTER "id=44538"

CLASS
	EXPRESSION "44538"
	STYLE
		OUTLINECOLOR 0 0 0
        	COLOR 251 6 23
        	SYMBOL triangle_arrow
        	SIZE 20
        	ANGLEITEM "heading"
      	END #STYLE

      	LABEL
        	FONT verdana-bold
        	TYPE truetype
        	ANTIALIAS true
        	SIZE 9
        	COLOR 0 0 0
        	POSITION AUTO
        	PARTIALS FALSE
        	ANGLE AUTO
      	END #LABEL
END #CLASS

Most of the time it appears correctly.  However, when the angle is less than 1
degree (ie: 0 or 0.3) and sometimes other values (not sure exactly what other
values cause the problem), the vector will be cut in half.  I know it is not a
problem with my label interfering, because I've tested with everything else in
the layer turned off.  The vector is cut exactly in half, right where the 0
value is for x.

My vector symbol is a custom triangle shape, defined as follows:
SYMBOL
	NAME "triangle_arrow"
	TYPE vector
	FILLED true
	POINTS
	0 -3
	3 6
	0 4
	-3 6
	0 -3
	END
END

The middle point of the triangle is at x=0 so that the symbol centers exactly on
the position point, and there are negative values for x.  When the vector gets
cut off, it is cut off right on the x=0 line (the outline of the vector actually
draws down the center of the symbol where it is cut off).  So the left side of
the vector, which lives in the negative x land, is cut off and the right side is
displayed.

If I change my vector symbol to be defined with all postiive or 0 values for x,
it seems to draw fine for all angles.  However, this means the triangle is not
exactly centered on the position point in my map, and isn't as accurate.

If you'd like more info, like the full map file or example images of what the
cut-off looks like, email me at gdavis@refractions.net.  Thanks

Graham Davis
Analyst
Refractions Research
gdavis@refractions.net

Change History (5)

comment:1 by sdlime, 18 years ago

Cc: steve.lime@… added
What version are we talking about?

Steve

comment:2 by gdavis@…, 18 years ago

We are using mapserver version 4.8.4, thanks.

comment:3 by sdlime, 18 years ago

Do you have the ability to check 4.10? Some improvements to the rotation code 
were made in that version.

Steve

comment:4 by dmorissette, 18 years ago

Cc: dmorissette@… added
Component: WMS ServerMapServer C Library
Owner: changed from mapserverbugs to sdlime
This is not a WMS-specific issue, moving to MapServer C Library component

comment:5 by gdavis@…, 18 years ago

Resolution: fixed
Status: newclosed
It look like 4.10 beta 3 fixes this issue.  Thanks guys.

Graham.
Note: See TracTickets for help on using tickets.