symbols - inprecise rendering

Steve Lime Steve.Lime at DNR.STATE.MN.US
Tue Apr 24 10:23:36 EDT 2007


I wonder if this is due to a rounding bug introduced in 4.6 (I think). I
can't see how
GDAL would affect things. Any chance you could try 4.10 as a test with
your mapfile?

Steve

>>> "R. Müller" <r.mueller at UNICOMP-BERLIN.DE> 04/24/07 3:38 AM >>>
Hi,

i've got a question concerning rendering symbols in mapserver. I'm 
working with mapserver 4.6 mostly on linux-based maschines and noticed 
that under certain circumstances the rendering of point symbols is quit 
inexactly.

in the following test-case i wanted to draw gray-filled circles with a 
black border. in this case i didn't used the newer style-syntax but the 
result is quit the same. in the rendered image the two cirlces (inner 
circle and border are not located in the same origin, one circle is 
shifted for some pixels)

symbol-definition :

    SYMBOL
      NAME 'kreis'
      TYPE ELLIPSE
      FILLED TRUE
      POINTS 1 1 END
    END

inside the layer definition :

     CLASS
	SYMBOL 'kreis'
          EXPRESSION "gray"
          COLOR 0 0 0
          SIZE 50
          OVERLAYSYMBOL 'kreis'
          OVERLAYCOLOR 200 200 200
          OVERLAYSIZE 35
          OVERLAYMAXSIZE 35
          MAXSIZE 50
      END

the data comes from a postgis-database backend, but it doesn't matter. i

worked out the following standalone test-case (complete map-file) and 
the behaviour is the same :

MAP
   NAME 'testy'
   EXTENT 0 0 800 600
   SIZE 501 521

   IMAGETYPE PNG

   SYMBOL
     NAME 'circle'
     TYPE ELLIPSE
     POINTS 1 1 END
     FILLED TRUE
   END


   LAYER
     NAME 'kreis'
     STATUS DEFAULT
     TYPE POINT
     FEATURE
       POINTS 450 150 120 111 450 301  END
       #POINTS 350 350 END
     END
     CLASS
       STYLE
         SYMBOL 'circle'
         SIZE 101
         COLOR 0 0 0
       END
       STYLE
         SYMBOL 'circle'
         SIZE 94
         COLOR 121 121 121
       END
       TEXT 'K0025'
     END
   END


   LAYER
     NAME 'kreis1'
     STATUS DEFAULT
     TRANSPARENCY 50
     TYPE POINT
     FEATURE
       POINTS 100 450 750 320 131 310  END
       #POINTS 350 350 END
     END
     CLASS
       STYLE
         SYMBOL 'circle'
         SIZE 51
         COLOR 0 0 0
       END
       STYLE
         SYMBOL 'circle'
         SIZE 35
         COLOR 211 121 121
       END
       TEXT 'K0025'
     END
   END
END


i discovered some correlation to the version of used GDAL-library :
in one case i used Version 1.3.1 and its rendered correctly (see 3rd 
pic), in another case i used 1.2.6 and renders incorrectly (see 2nd 
pic). Can someone confirm this behaviour ?

thanks a lot in advance.

regards

ronald

attachments :

1. first example with incorrect rendering
2. standalone mapfile with incorrect rendering (GDAl 1.2.6)
2. standalone mapfile with correct rendering (GDAl 1.3.1)

----



More information about the mapserver-users mailing list