[mapserver-users] legend causing Mapserver to crash!

David Raitzer david_raitzer at hotmail.com
Thu Apr 19 13:07:35 PDT 2001


Hello,

Somehow it seems that my names for the legend are causing Mapserver to fail! 
  Is Mapserver limited to 8 legend entries?  Or is there something else that 
I'm doing wrong?  My mapfile is below.  When I added the elevation names for 
Guatemala, Mapserver started failing.  Thanks for any help that can be 
provided.

-David

NAME WATERSHED
SIZE 600 600
EXTENT -92.5 9 -67.75 20
SHAPEPATH "data"
SHADESET symbols/shade.sym
MARKERSET symbols/marker.sym
LINESET symbols/line.sym
UNITS DD

WEB
	TEMPLATE watershed.html
	IMAGEPATH "C:\Inetpub\wwwroot\tmp\"
	IMAGEURL "/tmp/"
	#LOG "watershed.log"
END

REFERENCE
  IMAGE reference/central.gif
  EXTENT -92.4 6 -68 24
  SIZE 128 95
  STATUS ON
  COLOR -1 -1 -1
  OUTLINECOLOR 255 0 0
END

LEGEND
  KEYSIZE 18 10
  LABEL
    TYPE BITMAP
    SIZE SMALL
    COLOR 0 0 89
  END
  STATUS ON
END

SCALEBAR
  IMAGECOLOR 255 255 255
  LABEL
    COLOR 255 255 255
    SIZE small
  END
  STYLE 1
  SIZE 50 2
  COLOR 255 255 255
  UNITS KILOMETERS
  INTERVALS 1
  TRANSPARENT TRUE
  STATUS TRUE
END

LAYER
	NAME "labels"
	DATA "general/awscntry"
	STATUS DEFAULT
	LABELITEM CNTRY_NAME
	TYPE ANNOTATION
	CLASS
		COLOR 200 0 0
		LABEL
			SIZE GIANT
			COLOR 0 0 0
			POSITION CC
		END
	END # end of class object
END # end of layer object

LAYER
	NAME "general"
	DATA "general/awscntry"
	STATUS DEFAULT
	TYPE POLYGON
	CLASSITEM Cntry_name
     		CLASS
	        EXPRESSION 'Aruba'
	        COLOR 107 103 97
	        OUTLINECOLOR 0 0 0
		END  # CLASS
	CLASSITEM Cntry_name
     		CLASS
	        EXPRESSION 'Bahamas, The'
	        COLOR 107 103 97
	        OUTLINECOLOR 0 0 0
		END  # CLASS
	CLASSITEM Cntry_name
     		CLASS
	        EXPRESSION 'Belize'
	        COLOR 107 103 97
	        OUTLINECOLOR 0 0 0
		END  # CLASS
	CLASSITEM Cntry_name
		CLASS
		EXPRESSION 'Cayman Islands'
		COLOR 107 103 97
	        OUTLINECOLOR 0 0 0
		END  # CLASS
	CLASSITEM Cntry_name
		CLASS
		EXPRESSION 'Colombia'
	        COLOR 107 103 97
	        OUTLINECOLOR 0 0 0
		END  # CLASS
	CLASSITEM Cntry_name
		CLASS
		EXPRESSION 'Costa Rica'
	        COLOR 107 103 97
	        OUTLINECOLOR 0 0 0
		END  # CLASS
	CLASSITEM Cntry_name
     		CLASS
	        EXPRESSION 'Cuba'
	        COLOR 107 103 97
	        OUTLINECOLOR 0 0 0
		END  # CLASS
	CLASSITEM Cntry_name
     		CLASS
	        EXPRESSION 'Dominican Republic'
	        COLOR 138 169 76
	        OUTLINECOLOR 0 0 0
		END  # CLASS
	CLASSITEM Cntry_name
		CLASS
		EXPRESSION 'El Salvador'
	        COLOR 192 101 73
	        OUTLINECOLOR 0 0 0
		END  # CLASS
	CLASSITEM Cntry_name
		CLASS
		EXPRESSION 'Guatemala'
	        COLOR 205 155 29
	        OUTLINECOLOR 0 0 0
	        END  # CLASS
	CLASSITEM Cntry_name
     		CLASS
	        EXPRESSION 'Haiti'
	        COLOR 125 171 176
	        OUTLINECOLOR 0 0 0
		END  # CLASS
	CLASSITEM Cntry_name
		CLASS
		EXPRESSION 'Honduras'
	        COLOR 240 230 140
	        OUTLINECOLOR 0 0 0
		END  # CLASS
	CLASSITEM Cntry_name
     		CLASS
	        EXPRESSION 'Jamaica'
	        COLOR 107 103 97
	        OUTLINECOLOR 0 0 0
		END  # CLASS
	CLASSITEM Cntry_name
		CLASS
		EXPRESSION 'Mexico'
	        COLOR 107 103 97
	        OUTLINECOLOR 0 0 0
	        END  # CLASS
	CLASSITEM Cntry_name
     		CLASS
	        EXPRESSION ''
	        COLOR 107 103 97
	        OUTLINECOLOR 0 0 0
		END  # CLASS
	CLASSITEM Cntry_name
     		CLASS
	        EXPRESSION 'Netherlands Antilles'
	        COLOR 107 103 97
	        OUTLINECOLOR 0 0 0
		END  # CLASS
	CLASSITEM Cntry_name
		CLASS
		EXPRESSION 'Nicaragua'
	        COLOR 192 144 88
	        OUTLINECOLOR 0 0 0
		END  # CLASS
	CLASSITEM Cntry_name
		CLASS
		EXPRESSION 'Panama'
	        COLOR 107 103 97
	        OUTLINECOLOR 0 0 0
		END  # CLASS
	CLASSITEM Cntry_name
     		CLASS
	        EXPRESSION 'Turks and Caicos Islands'
	        COLOR 107 103 97
	        OUTLINECOLOR 0 0 0
		END  # CLASS
	CLASSITEM Cntry_name
     		CLASS
	        EXPRESSION 'United States'
	        COLOR 107 103 97
	        OUTLINECOLOR 0 0 0
		END  # CLASS
	CLASSITEM Cntry_name
     		CLASS
	        EXPRESSION 'Venezuela'
	        COLOR 107 103 97
	        OUTLINECOLOR 0 0 0
		END  # CLASS

END # end of layer object

LAYER
	NAME "cities"
	DATA "general/awscitie"
	STATUS DEFAULT
	TYPE POINT
	LABELITEM CITY_NAME
	MAXSCALE 5000000
	LABELMAXSCALE 5000000
	CLASS
		NAME "Major Cities"
		SYMBOL 'city'
		COLOR 0 0 0
		LABEL
			BUFFER 2
			ANTIALIAS
			FORCE TRUE
			SIZE SMALL
			MINSIZE 1
			MINFEATURESIZE 2
			COLOR 114 18 18
      			TYPE BITMAP
     			POSITION AUTO
		END
	END # CLASS
END # end of layer object

LAYER
	NAME "polnames"
	DATA "general/awsadmin"
	STATUS DEFAULT
	LABELITEM ADMIN_NAME
	LABELMAXSCALE 5000000
	TYPE ANNOTATION
	CLASS
		COLOR 0 98 0
		LABEL
			SIZE MEDIUM
			COLOR 0 98 0
		END
	END # end of class object
END # end of layer object

LAYER
	NAME "hon_river"
	DATA "honduras/awriv3ml"
	STATUS DEFAULT
	TYPE LINE
	CLASS
		NAME "Rivers"
		COLOR 100 100 150
	END # end of class object
END # end of layer object

LAYER
	NAME "guat_river"
	DATA "guatemala/awriv3ml"
	STATUS DEFAULT
	TYPE LINE
	CLASS
		COLOR 100 100 150
	END # end of class object
END # end of layer object

LAYER
	NAME "nic_river"
	DATA "nicaragua/awriv3ml"
	STATUS DEFAULT
	TYPE LINE
	CLASS
		COLOR 100 100 150
	END # end of class object
END # end of layer object
LAYER
	NAME "dr_river"
	DATA "dr/awriv3ml"
	STATUS DEFAULT
	TYPE LINE
	CLASS
		COLOR 100 100 150
	END # end of class object
END # end of layer object
LAYER
	NAME "haiti_river"
	DATA "haiti/awriv3ml"
	STATUS DEFAULT
	TYPE LINE
	CLASS
		COLOR 100 100 150
	END # end of class object
END # end of layer object
LAYER
	NAME "borders"
	DATA "general/awscntry"
	STATUS DEFAULT
	TYPE POLYLINE
	CLASS
		COLOR 0 0 0
	END # end of class object
END # end of layer object
LAYER
	NAME "dr_elev"
	DATA "dr/elevation2"
	TYPE POLYGON
	STATUS DEFAULT
	MAXSCALE 500000
	CLASSITEM Elevation
     		CLASS
	        EXPRESSION '305'
		COLOR 139 140 76
	        OUTLINECOLOR 139 140 76
		END  # CLASS
     	CLASSITEM Elevation
		CLASS
	        EXPRESSION '914'
		COLOR 47 168 17
	        OUTLINECOLOR 47 168 17
		END  # CLASS
	CLASSITEM Elevation
		CLASS
	        EXPRESSION '2134'
		COLOR 190 172 71
	        OUTLINECOLOR 190 172 71
		END  # CLASS
	CLASSITEM Elevation
	     	CLASS
	        EXPRESSION '3353'
		COLOR 241 158 143
	        OUTLINECOLOR 241 158 143
		END  # CLASS
END # end of layer object

LAYER
	NAME "el_sal_elev"
	DATA "elsalvador/elevation2"
	TYPE POLYGON
	STATUS DEFAULT
	MAXSCALE 500000
	CLASSITEM Elevation
     		CLASS
	        EXPRESSION '305'
	        COLOR 139 140 76
	        OUTLINECOLOR 139 140 76
		END  # CLASS
     	CLASSITEM Elevation
		CLASS
	        EXPRESSION '914'
	        COLOR 47 168 17
	        OUTLINECOLOR 47 168 17
		END  # CLASS
	CLASSITEM Elevation
		CLASS
	        EXPRESSION '2134'
	        COLOR 190 172 71
	        OUTLINECOLOR 190 172 71
		END  # CLASS
	CLASSITEM Elevation
	     	CLASS
	        EXPRESSION '3353'
	        COLOR 241 158 143
	        OUTLINECOLOR 241 158 143
		END  # CLASS
END # end of layer object

LAYER
	NAME "guat_elev"
	DATA "guatemala/elevation"
	TYPE POLYGON
	STATUS DEFAULT
	MAXSCALE 500000
	CLASSITEM Elevation
     		CLASS
	        EXPRESSION '305'
		NAME '305-914 m elevation'
	        COLOR 139 140 76
	        OUTLINECOLOR 139 140 76
		END  # CLASS
     	CLASSITEM Elevation
		CLASS
	        EXPRESSION '914'
		NAME '914-2134 m elevation'
	        COLOR 47 168 17
	        OUTLINECOLOR 47 168 17
		END  # CLASS
	CLASSITEM Elevation
		CLASS
	        EXPRESSION '2134'
		NAME '2134-3353 m elevation'
		COLOR 190 172 71
	        OUTLINECOLOR 190 172 71
		END  # CLASS
	CLASSITEM Elevation
	     	CLASS
	        EXPRESSION '3353'
		NAME '3353+ m elevation'
		COLOR 241 158 143
	        OUTLINECOLOR 241 158 143
		END  # CLASS
END # end of layer object

LAYER
	NAME "haiti_elev"
	DATA "haiti/elevation"
	TYPE POLYGON
	STATUS DEFAULT
	MAXSCALE 500000
	CLASSITEM Elevation
     		CLASS
	        EXPRESSION '305'
	        COLOR 139 140 76
	        OUTLINECOLOR 139 140 76
		END  # CLASS
     	CLASSITEM Elevation
		CLASS
	        EXPRESSION '914'
	        COLOR 47 168 17
	        OUTLINECOLOR 47 168 17
		END  # CLASS
	CLASSITEM Elevation
		CLASS
		Name '2134-3353 m'
	        COLOR 190 172 71
	        OUTLINECOLOR 190 172 71
		END  # CLASS
	CLASSITEM Elevation
	     	CLASS
	        EXPRESSION '3353'
	        COLOR 241 158 143
	        OUTLINECOLOR 241 158 143
		END  # CLASS
END # end of layer object

LAYER
	NAME "honduras_elev"
	DATA "honduras/elevation"
	TYPE POLYGON
	STATUS DEFAULT
	MAXSCALE 500000
	CLASSITEM Elevation
     		CLASS
	        EXPRESSION '305'
	        COLOR 139 140 76
	        OUTLINECOLOR 139 140 76
		END  # CLASS
     	CLASSITEM Elevation
		CLASS
	        EXPRESSION '914'
	        COLOR 47 168 17
	        OUTLINECOLOR 47 168 17
		END  # CLASS
	CLASSITEM Elevation
		CLASS
		Name '2134-3353 m'
	        COLOR 190 172 71
	        OUTLINECOLOR 190 172 71
		END  # CLASS
	CLASSITEM Elevation
	     	CLASS
	        EXPRESSION '3353'
	        COLOR 241 158 143
	        OUTLINECOLOR 241 158 143
		END  # CLASS
END # end of layer object


LAYER
	NAME "nic_elev"
	DATA "nicaragua/elevation"
	TYPE POLYGON
	STATUS DEFAULT
	MAXSCALE 500000
	CLASSITEM Elevation
     		CLASS
	        EXPRESSION '305'
	        COLOR 139 140 76
	        OUTLINECOLOR 139 140 76
		END  # CLASS
     	CLASSITEM Elevation
		CLASS
	        EXPRESSION '914'
	        COLOR 47 168 17
	        OUTLINECOLOR 47 168 17
		END  # CLASS
	CLASSITEM Elevation
		CLASS
	        EXPRESSION '2134'
	        COLOR 190 172 71
	        OUTLINECOLOR 190 172 71
		END  # CLASS
	CLASSITEM Elevation
	     	CLASS
	        EXPRESSION '3353'
	        COLOR 241 158 143
	        OUTLINECOLOR 241 158 143
		END  # CLASS
END # end of layer object
LAYER
	NAME "dr_roads"
	DATA "dr/roads"
	STATUS DEFAULT
	TYPE LINE
	MAXSCALE 1000000
	CLASS
	        Name "Roads"
	        COLOR 83 0 0
	        OUTLINECOLOR 0 0 0
		END  # CLASS
END # end of layer object

LAYER
	NAME "el_sal_roads"
	DATA "elsalvador/roads"
	STATUS DEFAULT
	TYPE LINE
	MAXSCALE 1000000
	CLASS
	        COLOR 83 0 0
	        OUTLINECOLOR 0 0 0
		END  # CLASS
END # end of layer object

LAYER
	NAME "guat_roads"
	DATA "guatemala/roads"
	STATUS DEFAULT
	TYPE LINE
	MAXSCALE 1000000
	CLASS
	        COLOR 83 0 0
	        OUTLINECOLOR 0 0 0
		END  # CLASS
END # end of layer object

LAYER
	NAME "haiti_roads"
	DATA "haiti/roads"
	STATUS DEFAULT
	TYPE LINE
	MAXSCALE 1000000
	CLASS
	        COLOR 83 0 0
	        OUTLINECOLOR 0 0 0
		END  # CLASS
END # end of layer object

LAYER
	NAME "honduras_roads"
	DATA "honduras/roads"
	STATUS DEFAULT
	TYPE LINE
	MAXSCALE 1000000
	CLASS
		COLOR 83 0 0
	        OUTLINECOLOR 0 0 0
		END  # CLASS
END # end of layer object

LAYER
	NAME "nicaragua_roads"
	DATA "nicaragua/roads"
	STATUS DEFAULT
	TYPE LINE
	MAXSCALE 1000000
	CLASS
	        COLOR 83 0 0
	        OUTLINECOLOR 0 0 0
		END  # CLASS
END # end of layer object


LAYER
	NAME "polboundries"
	DATA "general/awsadmin"
	STATUS DEFAULT
	MINSCALE 500000
	TYPE LINE
	CLASS
		NAME "Municipalities"
		COLOR 0 98 0
	END # end of class object
END # end of layer object

LAYER
	NAME "watershed"
	DATA "watershed"
	STATUS DEFAULT
	LABELITEM SITE_NAME
	TYPE POINT
	LABELMAXSCALE 2000000
	CLASS

		NAME "USDA Sites"
		SYMBOL 'county_highway_shield'
		COLOR 0 0 0
		LABEL
			BUFFER 2
			ANTIALIAS
			FORCE TRUE
			SIZE SMALL
			MINSIZE 1
			MINFEATURESIZE 2
			COLOR 0 0 0
      			TYPE BITMAP
     			POSITION CC
		END

END # end of class object
	HEADER "watershed_header.html"
	FOOTER "watershed_footer.html"
	QUERY
      TEMPLATE "watershed_template.html"
    END

	TOLERANCE 20

END # end of layer object

END # end of map file

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com




More information about the MapServer-users mailing list