Change image resolution in mapfile

Flavio Hendry flavio at TYDAC.CH
Thu Jan 26 01:55:30 EST 2006


Hi Steve

> have to make a custom mapfile for each resolution you want to support
> and change the thickness of all line widths, font sizes, symbol
> sizes, etc, etc. Fonts are a particularly difficult problem because 
> you need to render them fatter also with increased DPI.

No, this is not necessary, you should use SIZEUNITS in real world units 
such as feet, meters etc. and not pixels (default). So you can control 
the size of text, line thickness etc. far better and the maps look fine 
in every scale/resolution. Be aware that SIZEUNITS only accepts 
integers, so you might have to use feet instead of meters to control 
digits.

Example:

LAYER
	NAME "Street Names"
	TYPE LINE
	MINSCALE 0
	MAXSCALE 5000
	STATUS ON
	DATA "Shape/StreetLabels"
	LABELITEM "STRASSE"
	SIZEUNITS feet
		CLASS
			NAME "StreetLabels"
			COLOR -1 -1 -1
			LABEL
				ANTIALIAS TRUE
				TYPE TRUETYPE
				FONT arial
				SIZE 15
				COLOR 0 0 0
				ANGLE AUTO
				POSITION cc
			END
		END
	PROJECTION
	 "init=world:CH1903"
	END
END

Mit freundlichem Gruss / Best Regards
Flavio Hendry

----------------------------------------------------------------
TYDAC NEWS http://www.tydac.ch/german/index.php?menu=News_actual
----------------------------------------------------------------
############      Mit freundlichen Gruessen / Kind Regards
############             mailto:flavio at tydac.ch
############         TYDAC AG - http://www.tydac.ch
####    ####        Geographic Information Solutions
####    ####         Luternauweg 12 -- CH-3006 Bern
############   Tel +41 (0)31 368 0180 - Fax +41 (0)31 368 1860
----------------------------------------------------------------



More information about the mapserver-users mailing list