[Mapserver-users] Help with example error {Scanned}
Siki Zoltan
siki at agt.bme.hu
Mon Mar 1 12:07:29 PST 2004
Hello,
Did you check the fonts.list file? Are those fonts intalled on your
machine? For example arial-bold font is referenced in the map file,
there must be a line in the fonts.list file starting with this alias name,
and there must be a real font file in the same line. Probably you havn't
that font (ttf). You can change the fonts.list.
Cheers
Zoltan
On Mon, 1 Mar 2004, [iso-8859-1] TOH CZ wrote:
> When I try to run the tutorials that uses fonts with a
> Win32 pre-compiled binary, it always return the follow
> errors
>
> msGetLabelSize(): TrueType Font error. Could not
> find/open font
>
> MAP
> NAME EX2.1_
> IMAGETYPE png
> EXTENT 201621.496941 -294488.285333
> 1425518.020722 498254.511514 # LAEA
> #EXTENT -97.5 41.619778 -82.122902 49.38562
> # Geographic
> SIZE 400 300
> SHAPEPATH "data"
> SYMBOLSET "symbols/symbols35.sym"
> FONTSET "C:/Program Files/Apache
> Group/Apache2/htdocs/tutorial/fonts/fonts.list"
>
> WEB
> TEMPLATE 'example2-1.html'
> IMAGEPATH '/C:/Program Files/Apache
> Group/Apache2/htdocs/tmp/'
> IMAGEURL 'C:/Program Files/Apache
> Group/Apache2/htdocs/tmp/'
> END
>
> PROJECTION
> # This is Lambert Azimuthal Equal-Area projection
> for the
> # Continental U.S.
> # "proj=laea"
> # "ellps=clrk66"
> # "lat_0=45"
> # "lon_0=-100"
> #
> # Alternatively, you can specify an EPSG code.
> # This is the EPSG code for
> # Lambert Azimuthal Equal-Area projection for the
> U.S.
> "init=epsg:2163"
> #
> END
>
> # Start of LAYER DEFINITIONS
> ---------------------------------------------
> LAYER # States polygon layer begins here
> NAME states
> DATA states_ugl
> STATUS OFF
> TYPE POLYGON
>
> PROJECTION
> "init=epsg:4326"
> END
>
> CLASSITEM "CLASS"
> CLASS
> EXPRESSION 'land'
> SYMBOL 0
> COLOR 232 232 232
> END
> END # States polygon layer ends here
>
> LAYER # MODIS raster layer begins here
> NAME modis
> DATA
> "raster/mod09a12003161_ugl_ll_idxa.tif"
> STATUS DEFAULT
> TYPE RASTER
> OFFSITE 70 74 66
>
> PROJECTION
> "init=epsg:4326"
> END
> END # MODIS raster layer ends here
>
> LAYER # LandSat WMS map from JPL (or from USGS)
> NAME LandSat
> TYPE RASTER
> OFFSITE 0 0 0
> STATUS OFF
> CONNECTIONTYPE WMS
> CONNECTION
> "http://wms.jpl.nasa.gov/wms.cgi?REQUEST=map&LAYERS=us_landsat7&STYLES=&FORMAT=png&TRANSPARENT=true"
> #CONNECTION
> "http://gisdata.usgs.net/servlet/com.esri.wms.Esrimap?ServiceName=USGS_WMS_LANDSAT7&VERSION=1.0.0&REQUEST=map&Layers=LANDSAT7&SRS=EPSG:4326&REASPECT=false&Format=png&"
>
> METADATA
> "wms_title" "LandSat"
> "wms_name" "us_landsat7"
> "wms_server_version" "1.0.0"
> "wms_srs" "epsg:4326"
> "wms_format" "image/png"
> #"wms_title" "US_Landsat7"
> # "wms_srs" "epsg:4326"
> # "wms_connectiontimeout" "1000"
> END
>
> PROJECTION
> "init=epsg:4326"
> END
> END # LandSat WMS image ends here
>
> LAYER # Hydrography layer begins here
> NAME hydro
> TYPE POLYGON
> STATUS DEFAULT
> DATA hydrop_ugl
>
> PROJECTION
> "init=epsg:4326"
> END
>
> TOLERANCE 3
> CLASSITEM 'FEATURE'
> CLASS
> NAME 'Lakes'
> EXPRESSION /(^B|^C|^L|^R)./
> COLOR 72 64 254
> END # CLASS
> CLASS
> NAME 'Rivers'
> EXPRESSION 'Stream'
> COLOR 136 128 255
> END # CLASS
> CLASS
> NAME 'Wetlands'
> EXPRESSION 'Swamp or Marsh'
> COLOR 195 252 255
> OUTLINECOLOR 195 252 255
> SYMBOL 'circle'
> SIZE 0
> END # CLASS
> END # LAYER
>
> LAYER # ROADS LAYER
> NAME cty_roads
> GROUP roads
> TYPE LINE
> STATUS DEFAULT
> DATA roads_ugl
> MAXSCALE 750000
>
> PROJECTION
> "init=epsg:4326"
> END
>
> HEADER 'templates/roads_header.html'
> FOOTER 'templates/roads_footer.html'
> TOLERANCE 5
> CLASSITEM 'CLASS1'
> CLASS
> NAME 'Minor Arterial Roads'
> EXPRESSION '3'
> COLOR 165 165 165
> END # CLASS
> CLASS
> EXPRESSION '4'
> COLOR 210 210 210
> END # CLASS
> END # ROADS LAYER
>
> LAYER # state highways begin here
> NAME state_hwy
> GROUP roads
> MAXSCALE 1500000
> STATUS DEFAULT
> DATA roads_ugl
> TYPE LINE
> FILTERITEM 'CLASS1'
> FILTER '2'
>
> CLASS
> NAME 'Principal Arterial Roads'
> STYLE
> COLOR 255 0 0
> SIZE 1
> SYMBOL 'circle'
> END
> END
>
> PROJECTION
> "init=epsg:4326"
> END
> END # highways
>
> LAYER # interstate highways begin here
> NAME interstate
> GROUP roads
> # MAXSCALE 22500000
> STATUS DEFAULT
> DATA roads_ugl
> TYPE LINE
> FILTERITEM 'CLASS1'
> FILTER '1'
>
> CLASS
> NAME "Interstate Hwy."
> STYLE
> COLOR 128 0 0
> # SIZE 2
> # SYMBOL 'circle'
> END
> END
>
> PROJECTION
> "init=epsg:4326"
> END
> END # highways
>
> LAYER # States line layer begins here
> NAME states
> DATA states_ugl
> STATUS DEFAULT
> TYPE LINE
>
> PROJECTION
> "init=epsg:4326"
> END
>
> CLASSITEM "CLASS"
> CLASS
> EXPRESSION 'land'
> SYMBOL 'line5'
> COLOR 64 64 64
> SIZE 1
> END
> END # States line layer ends here
>
> LAYER
> NAME roads_anno
> GROUP roads
> MAXSCALE 750000
> STATUS DEFAULT
> DATA roads_ugl
> TYPE ANNOTATION
> LABELITEM "SIGN"
> CLASSITEM "CLASS1"
> CLASS
> EXPRESSION "3"
> STYLE
> COLOR 0 0 0 # dummy color
> SYMBOL 'symbols/sthwy.png'
> END
> LABEL
> MINFEATURESIZE 50
> MINDISTANCE 150
> POSITION CC
> SIZE TINY
> COLOR 0 0 0
> END
> END
> CLASS
> EXPRESSION "2"
> STYLE
> COLOR 0 0 0 # dummy color
> SYMBOL 'symbols/ushwy.png'
> END
> LABEL
> MINFEATURESIZE 50
> MINDISTANCE 150
> POSITION CC
> SIZE TINY
> COLOR 0 0 0
> END
> END
>
> PROJECTION
> "init=epsg:4326"
> END
> END # highway annotation
>
> LAYER
> NAME roads_anno1
> GROUP roads
> STATUS DEFAULT
> DATA roads_ugl
> TYPE ANNOTATION
> LABELITEM "SIGN"
> CLASSITEM "CLASS1"
> CLASS
> EXPRESSION "1"
> STYLE
> COLOR 0 0 0 # dummy color
> SYMBOL 'symbols/interstate.png'
> END
> LABEL
> MINFEATURESIZE 20
> MINDISTANCE 150
> POSITION CC
> SIZE TINY
> COLOR 255 255 255
> END
> END
>
> PROJECTION
> "init=epsg:4326"
> END
> END
>
> LAYER # States label layer begins here
> NAME states
> DATA states_ugl
> STATUS DEFAULT
> TYPE ANNOTATION
>
> PROJECTION
> "init=epsg:4326"
> END
>
> CLASSITEM "CLASS"
> LABELITEM "STATE"
> CLASS
> EXPRESSION 'land'
> COLOR -1 -1 -1
> LABEL
> COLOR 132 31 31
> SHADOWCOLOR 218 218 218
> SHADOWSIZE 2 2
> TYPE TRUETYPE
> FONT arial-bold SIZE 12
> ANTIALIAS TRUE
> POSITION CL
> PARTIALS FALSE
> MINDISTANCE 300
> BUFFER 0
> END # end of label
> END # end of class
> END # States label layer ends here
> # End of LAYER DEFINITIONS
> -------------------------------
>
> END # end of map file
>
> When I remove the TYPE,FONT and SIZE attribute the map
> is able to load perfectly but with it it returns the
> error
> The front file contains everything it needs to load
> Can someone help please?
>
>
>
>
>
> ___________________________________________________________
> Yahoo! Messenger - Communicate instantly..."Ping"
> your friends today! Download Messenger Now
> http://uk.messenger.yahoo.com/download/index.html
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
More information about the MapServer-users
mailing list