Hi Jukka,
Interesting point of view!
I still think that outline are drawn outside polygons. I tried uDig to view my data. In this application, I can easily switch my outline on and off (that is, set width to 0px). The thickness of mapserver polygons is equivalent to those drawn in uDig with a 1px outline. Without this outline, the smaller river are almost invisible in uDig at large scale. Since mapserver doesn't support an outline width lesser than 1px, I assume that it's just not possible to completely "turn off" outlines. I still wonder why the OUTLINECOLOR -1 -1 -1 didn't work on my computer. I also try to change IMAGECOLOR settings but it's still the same crappy rendering. Anyway, I finally gave up and created a second CLASS in order to draw only bigger rivers when the scale is large. It's not as nice as uDig rendering but it's still readable.
Thanks !
Gilles


Rahkonen Jukka wrote:
Hi,
The question might be actually in how the polygons and outlines actually are rendered. Gilles seems to suppose that polygon in first rendered with COLOR and after that outline is rendered outside the polygon with OUTLINECOLOR, resulting to a shape that widened from the original by the line width. But perhaps Mapserver is rendering the outline just inside (effectively, above) the coloured polygon that is on the bottom, or maybe half and half? I suppose that would lead to similar results in cases 2) and 3). Who knows? -Jukka Rahkonen-

________________________________

Lähettäjä: UMN MapServer Users List puolesta: Gilles Bassière
Lähetetty: ma 30.7.2007 19:08
Vastaanottaja: [email protected]
Aihe: Re: [UMN_MAPSERVER-USERS] Polygon outline width



Hi Bart

I don't get you. I tried with the OUTLINECOLOR property set to a valid
color, to -1 0 0 and without any OUTLINECOLOR property, is that what you
mean ?

Let me describe my results :

1) COLOR set to 153 179 204, OUTLINECOLOR is set to 0 0 0
=> My shape appear in blue with a 1 pixel black border.

2) COLOR set to 153 179 204, OUTLINECOLOR is not set (default value)
=> My shape appear in blue, there is no black border but polygon is as
thick as the previous one. I assume that Mapserver draw a 1 pixel border
using the filling color.

3) COLOR set to 153 179 204, OUTLINECOLOR is set to -1 0 0 (or to -1 -1 -1)
=> The result is the same as case no 2.

Attached are some map excerpts illustrating these 3 cases.

If I understand, the value -1 0 0 is a way to say to Mapserver: "Draw
this transparent", right ? So, every pixel that appear black in the
first case shouldn't appear in blue in the 3rd case, isn't it ? As you
can see on the third map (case3.png), it's not. :(

Flavio, thanks for checking my mapfile. I tried with and without
antialias and it looks better with it. I don't know how to check whether
my polygons are valid (closed polygon), could you give me a way to check
that ?

Regards



Bart van den Eijnden (OSGIS) wrote:
Try and leave out the OUTLINECOLOR altogether.

Best regards,
Bart

--
Bart van den Eijnden
OSGIS, Open Source GIS
http://www.osgis.nl <http://www.osgis.nl/>

--------- Oorspronkelijk bericht --------
Van: Gilles Bassi�re <[EMAIL PROTECTED]>
Naar: [email protected] <[email protected]>
Onderwerp: Re: [UMN_MAPSERVER-USERS] Polygon outline width
Datum: 30/07/07 10:58

Here is my mapfile. The complete Mapfile has 8 other layers but I
removed them in order to make it easy to read, anyway all layers have
the same properties (only the color change).
I also tried to set the OUTLINECOLOR property at the CLASS level and to
use the value -1 0 0 but the outline is still not transparent.

# WGS 84 (epsg:4326)
MAP
   NAME                &quot;Test&quot;
   IMAGETYPE           &quot;png&quot;
   EXTENT              3.3 50.75 7.25 53.6
   IMAGECOLOR          255 255 255
   FONTSET             &quot;/home/gba/public_html/fonts.txt&quot;
   SYMBOLSET           &quot;/home/gba/public_html/symbols.sym&quot;
   UNITS               dd

   PROJECTION
      &quot;init=epsg:4326&quot;
   END

   WEB
      IMAGEPATH        &quot;/home/gba/public_html/img/&quot;
      IMAGEURL         &quot;/img/&quot;
      METADATA
         &quot;wms_title&quot;            &quot;Road map&quot;
&quot;wms_onlineresource&quot;
&quot;http://localhost/~gba/cgi-bin/test.cgi?"; <http://localhost/~gba/cgi-bin/test.cgi?>
         &quot;wms_srs&quot;              &quot;epsg:4326&quot;
      END
   END

   # Legend
   LEGEND
      KEYSIZE          10 5
      LABEL
         TYPE          bitmap
         SIZE          medium
         COLOR         0 0 0
         PARTIALS      false
      END
      STATUS           on
   END

   # Scale bar
   SCALEBAR
      IMAGECOLOR       255 255 255
      LABEL
         COLOR         0 0 0
         SIZE          tiny
      END
      STYLE            1
      SIZE             50 2
      COLOR            0 0 0
      UNITS            meters
      INTERVALS        2
      STATUS           on
   END

   OUTPUTFORMAT
      NAME             &quot;png&quot;
      DRIVER           &quot;GD/PNG&quot;
      MIMETYPE         &quot;image/png&quot;
      IMAGEMODE        &quot;rgba&quot;
      EXTENSION        &quot;png&quot;
      FORMATOPTION     &quot;transparent=on&quot;
      FORMATOPTION     &quot;interlace=on&quot;
   END

##########################################################################
   # Start of LAYER Definitions
---------------------------------------------
##########################################################################

   # LAYER 9 : water -------------------------------------
   LAYER
      NAME             &quot;water&quot;
      GROUP            &quot;background&quot;
      CONNECTIONTYPE   postgis
      CONNECTION       &quot;host=localhost dbname=test user=test
password=xxxxx port=5432&quot;
      DATA             &quot;wkb_geometry FROM water&quot;
      STATUS           on
      TYPE             polygon
      TRANSPARENCY     alpha

      PROJECTION
         &quot;init=epsg:4326&quot;
      END
CLASS
         STYLE
            COLOR         153 179 204
            OUTLINECOLOR  -1 -1 -1
            ANTIALIAS     true
         END
      END

      METADATA
         &quot;wms_title&quot;   &quot;Water bodies&quot;
         &quot;wms_srs&quot;     &quot;EPSG:4326&quot;
         &quot;wms_extent&quot;  &quot;3.3 50.75 7.25 53.6&quot;
      END
   END
END

# test URL (GetMap) :

http://localhost/~gba/cgi-bin/test.cgi?service=wms&version=1.1.1&request=getmap&layers=background&styles=&srs=epsg:4326&width=800&height=600&format=image/png&bbox=3.358400,50.750400,7.227600,53.555000
&gt; Hi Gilles
&gt;
&gt; How does sour map-file look? OUTLINECOLOR -1 0 0 definitely should
work.
&gt;
&gt; Mit freundlichem Gruss / Best Regards
&gt; Flavio Hendry
&gt;
&gt; ----------------------------------------------------------------
&gt; TYDAC Web-Site: http://www.tydac.ch <http://www.tydac.ch/> &gt; TYDAC MapServer: http://www.mapserver.ch <http://www.mapserver.ch/> &gt; ----------------------------------------------------------------
&gt; ############      Mit freundlichen Gruessen / Kind Regards
&gt; ############             mailto:[EMAIL PROTECTED]
&gt; ############ TYDAC AG - http://www.tydac.ch <http://www.tydac.ch/> &gt; #### #### Geographic Information Solutions
&gt; ####    ####         Luternauweg 12 -- CH-3006 Bern
&gt; ############   Tel +41 (0)31 368 0180 - Fax +41 (0)31 368 1860
&gt; ----------------------------------------------------------------
&gt;
&gt;
&gt; -----Original Message-----
&gt; From: Gilles Bassi�re &lt;[EMAIL PROTECTED]&gt;
&gt; To: Flavio Hendry &lt;[EMAIL PROTECTED]&gt;
&gt; Cc: [email protected]
&gt; Date: Mon, 30 Jul 2007 11:58:00 +0200
&gt; Subject: Re: [UMN_MAPSERVER-USERS] Polygon outline width
&gt;
&gt; &gt;&gt; Hi Flavio
&gt;&gt;
&gt;&gt; Thanks for your help. Unfortunately, it has no effect on my map.
I
&gt;&gt; tried
&gt;&gt; to set this value for OUTLINE in the CLASS element, then in the
STYLE
&gt;&gt; element but rivers still appear very thick on my map when the
scale
&gt;&gt; in
&gt;&gt; large... Actually, the same map is produced with OUTLINE -1 0 0
or
&gt;&gt; without. =(
&gt;&gt;
&gt;&gt; As explained in the FAQ, I tried to set up a circle symbol but it
&gt;&gt; seems
&gt;&gt; to work only for true lines, not for polygon outlines.
&gt;&gt;
&gt;&gt; Any other idea ?
&gt;&gt;
&gt;&gt; Gilles
&gt;&gt; &gt;&gt;&gt; Hi Gilles
&gt;&gt;&gt;
&gt;&gt;&gt; just set the OUTLINECOLOR to -1 0 0.
&gt;&gt;&gt;
&gt;&gt;&gt; Mit freundlichem Gruss / Best Regards
&gt;&gt;&gt; Flavio Hendry
&gt;&gt;&gt;
&gt;&gt;&gt;
----------------------------------------------------------------
&gt;&gt;&gt; TYDAC Web-Site: http://www.tydac.ch <http://www.tydac.ch/> &gt;&gt;&gt; TYDAC MapServer: http://www.mapserver.ch <http://www.mapserver.ch/> &gt;&gt;&gt;
----------------------------------------------------------------
&gt;&gt;&gt; ############      Mit freundlichen Gruessen / Kind Regards
&gt;&gt;&gt; ############             mailto:[EMAIL PROTECTED]
&gt;&gt;&gt; ############ TYDAC AG - http://www.tydac.ch <http://www.tydac.ch/> &gt;&gt;&gt; #### #### Geographic Information Solutions
&gt;&gt;&gt; ####    ####         Luternauweg 12 -- CH-3006 Bern
&gt;&gt;&gt; ############   Tel +41 (0)31 368 0180 - Fax +41 (0)31 368
1860
&gt;&gt;&gt;
----------------------------------------------------------------
&gt;&gt;&gt;
&gt;&gt;&gt;
&gt;&gt;&gt; -----Original Message-----
&gt;&gt;&gt; From: Gilles Bassi�re
&lt;[EMAIL PROTECTED]&gt;
&gt;&gt;&gt; To: [email protected]
&gt;&gt;&gt; Date: Fri, 27 Jul 2007 15:09:22 +0200
&gt;&gt;&gt; Subject: [UMN_MAPSERVER-USERS] Polygon outline width
&gt;&gt;&gt;
&gt;&gt;&gt; &gt;&gt;&gt; &gt;&gt;&gt;&gt; Hi there,
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; I wonder whether it's possible to have no outline for a
polygon.


--
Gilles Bassiere
MAKINA CORPUS
30 rue des Jeuneurs
FR-75011 PARIS
http://www.makina-corpus.com <http://www.makina-corpus.com/>




--
Gilles Bassiere
MAKINA CORPUS
30 rue des Jeuneurs
FR-75011 PARIS
http://www.makina-corpus.com

Reply via email to