[MAPSERVER-USERS] agg and line widths

thomas bonfort thomas.bonfort at gmail.com
Wed Apr 2 17:03:32 EDT 2008


hi,
it's one of the drawbacks of antialiasing in general, not a mapserver
specific issue. an analogy could be found when drawing on paper with a
felt-tip pen: if you pass twice on the same line the resulting effect
is that the paper is twice as saturated in ink and the line appears
thicker. this doesn't happen when drawing aliased bresenham lines as
with the gd renderer, as multiple passes on a given line produces the
same result as a single pass.
hth,
thomas

On Wed, Apr 2, 2008 at 9:51 PM, DNC <dncarreira at gmail.com> wrote:
>
>  Thomas,
>
>  I'm drawing administrative boundaries like counties. The data came from a
>  polygon shapefile and converted to PostGIS. The boundaries are topologically
>  correct in that shared boundaries are completely coincident and not
>  adjacent. I have never seen these polygons being drawn like you describe. It
>  didn't even occurred to me that MapServer would have any difficulties
>  drawing this kind of data... How do you publish for instance the US states?
>
>  Thanks,
>  Duarte
>
>
>
>
>  tbonfort wrote:
>  >
>  > hi,
>  > you're probably drawing polygons with adjacent borders right?
>  > in this case, each line except the outer ones is drawn twice, and thus
>  > its final width is larger than what is requested.
>  > I don't think there's much you can do about it except preprocess your
>  > data to transform it into a line layer with no duplicates.
>  >
>  > cheers,
>  > --
>  > Thomas Bonfort
>  >
>  > Camptocamp France SAS
>  > Tel : +33 (0)4 79 26 57 97
>  > thomas dot bonfort at camptocamp dot com
>  > http://www.camptocamp.com
>  >
>  > On Sat, Mar 29, 2008 at 1:22 PM, DNC <dncarreira at gmail.com> wrote:
>  >>
>  >>  Hi.
>  >>
>  >>  I'm having trouble getting thin lines to draw. The thinnest line I get
>  >> seems
>  >>  to be 2 pixels wide at least. Using GD the lines are indeed 1 pixel.
>  >> Anyone
>  >>  can point out why this happens?
>  >>
>  >>  Some sections from the map file:
>  >>  OUTPUTFORMAT
>  >>   NAME 'AGG_Q'
>  >>   DRIVER AGG/PNG
>  >>   MIMETYPE "image/png"
>  >>   IMAGEMODE RGB
>  >>   FORMATOPTION "QUANTIZE_FORCE=ON"
>  >>   FORMATOPTION "QUANTIZE_DITHER=OFF"
>  >>   FORMATOPTION "QUANTIZE_COLORS=256"
>  >>  END
>  >>   LAYER
>  >>     NAME 'test'
>  >>     GROUP "test group"
>  >>     TYPE POLYGON
>  >>     #MINSCALE 250000
>  >>     CONNECTIONTYPE postgis
>  >>     CONNECTION 'bla'
>  >>     PROCESSING "CLOSE_CONNECTION=DEFER"
>  >>     DATA 'the_geom from table using unique gid'
>  >>     #FILTER ''
>  >>     METADATA
>  >>       'wms_title'           'some layer'
>  >>       "ows_abstract"    "some text"
>  >>       'wms_srs'             'EPSG:27492'
>  >>       "wms_opaque"    "0"
>  >>       "wms_group_title" "group title"
>  >>       "wms_group_abstract" "group text"
>  >>     END
>  >>     STATUS ON
>  >>     TRANSPARENCY 100
>  >>     PROJECTION
>  >>     'init=epsg:27492'
>  >>     END
>  >>     EXTENT -23893.143277 -173568.018533 62541.864515 -70038.622014
>  >>     MINSCALE 1
>  >>  #    MAXSCALE 100000
>  >>     # data is queryable
>  >>     DUMP TRUE
>  >>     HEADER   /ms_ogc_workshop/templates/rivers_query_header.html
>  >>     TEMPLATE /ms_ogc_workshop/templates/rivers_query_body.html
>  >>     # fuzziness for querying
>  >>     TOLERANCE 5
>  >>     CLASS
>  >>        NAME 'outlines'
>  >>        STYLE
>  >>          WIDTH 1
>  >>          OUTLINECOLOR 232 232 232
>  >>        END
>  >>     END
>  >>   END
>  >>
>  >>  Regards,
>  >>  Duarte
>  >>  --
>  >>  View this message in context:
>  >> http://www.nabble.com/agg-and-line-widths-tp16369480p16369480.html
>  >>  Sent from the Mapserver - User mailing list archive at Nabble.com.
>  >>
>  >>  _______________________________________________
>  >>  mapserver-users mailing list
>  >>  mapserver-users at lists.osgeo.org
>  >>  http://lists.osgeo.org/mailman/listinfo/mapserver-users
>  >>
>  > _______________________________________________
>  > mapserver-users mailing list
>  > mapserver-users at lists.osgeo.org
>  > http://lists.osgeo.org/mailman/listinfo/mapserver-users
>  >
>  >
>
>  --
>  View this message in context: http://www.nabble.com/agg-and-line-widths-tp16369480p16450017.html
>
>
> Sent from the Mapserver - User mailing list archive at Nabble.com.
>
>  _______________________________________________
>  mapserver-users mailing list
>  mapserver-users at lists.osgeo.org
>  http://lists.osgeo.org/mailman/listinfo/mapserver-users
>


More information about the mapserver-users mailing list