#2264 closed defect (fixed)
STYLEITEM auto MapInfo TAB and AGG
Reported by: | flavio | Owned by: | dmorissette |
---|---|---|---|
Priority: | high | Milestone: | 5.0 release |
Component: | OGR Support | Version: | 5.0 |
Severity: | normal | Keywords: | STYLEITEM auto AGG |
Cc: | tbonfort |
Description (last modified by )
STYLEITEM auto: not all polygons in correct color using AGG:
IMAGETYPE AGG_JPEG OUTPUTFORMAT NAME 'AGG_JPEG' DRIVER AGG/JPEG IMAGEMODE RGB FORMATOPTION "QUANTIZE_FORCE=ON" FORMATOPTION "QUANTIZE_DITHER=OFF" FORMATOPTION "QUANTIZE_COLORS=256" END LAYER NAME "Bodenbedeckung" TYPE POLYGON MINSCALE 0 MAXSCALE 32000 STATUS ON CONNECTIONTYPE OGR CONNECTION "av/test.TAB" STYLEITEM "auto" TRANSPARENCY alpha HEADER "Art" CLASS NAME "GP_BB_Flaechen_f" TEMPLATE ttt.html END PROJECTION "init=world:CH1903" END END
Attachments (5)
Change History (16)
by , 17 years ago
Attachment: | building.gif added |
---|
by , 17 years ago
comment:1 by , 17 years ago
Cc: | removed |
---|---|
Description: | modified (diff) |
Milestone: | → 5.0 release |
Owner: | changed from | to
follow-up: 4 comment:2 by , 17 years ago
cannot reproduce here. attachment test.jpg shows the output I get.
comment:3 by , 17 years ago
Cc: | added |
---|
comment:4 by , 17 years ago
Replying to tbonfort:
cannot reproduce here. attachment test.jpg shows the output I get.
see http://test.mapserver.ch/waedenswil/frame.php?site=waedenswil&lang=en&group=public&resol=2
zoom = 600m = OK zoom = 250m = NOT OK
by , 17 years ago
Attachment: | bug2264_agg.map added |
---|
Mapfile to reproduce the issue with 'shp2img -m bug2264_agg.map -o test.jpg'
comment:5 by , 17 years ago
I have been able to reproduce with attached bug2264_agg.map. It seems to be a AGG vs GD issue where the smaller polygons don't get drawn on top of the larger building outline in the AGG case, See attached agg_vs_gd.jpg.
I have to leave now. Will get back at this later.
follow-up: 8 comment:6 by , 17 years ago
I've committed a fix in r6705. flavio can you please confirm? I think this didn't always show up depending on the order polygons were drawn. the problem in the present case was polygons with holes being drawn over previous ones.
by the way flavio, your outlines are showing up aliased because they are drawn twice: once along with the fill, and a second time alone. I don't know if this is coming from the styling in the shapefile, or if it's a bug in the stylitem auto code in mapserver. do you have a way to check this ?
comment:7 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Thanks Thomas, I confirmed that your fix solves the issue for me so let's mark this ticket closed.
Flavio can reopen with more details if the issue persists for him when he gets a new build.
follow-up: 9 comment:8 by , 17 years ago
Thanks as well Thomas. If Daniel confirms it, is fine for me. We cannot test as we work on special windows builds ... Have to wait for one.
Styling: I suppose it is coming from the STYLEITEM auto which does not use antialising on the borders. We will continue testing, will have to adopt our mapping files quite a bit for AGG, as far as I see (such as lines tend to show quite a bit thicker).
follow-up: 10 comment:9 by , 17 years ago
Replying to flavio:
Styling: I suppose it is coming from the STYLEITEM auto which does not use antialising on the borders. We will continue testing, will have to adopt our mapping files quite a bit for AGG, as far as I see (such as lines tend to show quite a bit thicker).
this is not the case, antialiasing is always on. what happens is that your outline is drawn twice, and therefore appears thicker (i.e. the alpha values of the antilaliased pixels are more or less twice what they should be, therefore making the whole line appear aliased)
ogrinfo gives this for your table
BRUSH(fc:#cdff80,bc:#000000,id:"mapinfo-brush-2.ogr-brush-0");PEN(w:1px,c:#000000,id:"mapinfo-pen-2.ogr-pen-0")
which confirms that the outline is drawn twice (once with the brush's bc, once with the pen's c)
comment:10 by , 17 years ago
this is not the case, antialiasing is always on.
ok. as said, the mapfiles are not optimized for AGG yet ... we just started testing. In any case it looks very promising.
comment:11 by , 17 years ago
Since the main issue (the color of the polygons) is fixed, I have created new ticket #2271 about the polygon outline being drawn twice with styleitem auto. Let's move that discussion there.
Screen Shot: Buildings not colored correctly