AW: [UMN_MAPSERVER-USERS] attribut values

listuser H. listuser at HERZSYS.DE
Wed Aug 24 04:04:49 EDT 2005


On Wednesday 24 August 2005 09:16, Leopold Schefcik (MULTIMEDIAPLAN.AT) wrote:
> Hi Travis, thank you for your advice to make a map file for several
> classes.
>
> I tried to make some for my file of inhabitant-density with two classes
> >200 and <200. (Mapfile in the Attachement)
>
> But I get the error message 'msDrawMap(): Failed to draw layer named
> 'Bev_Density' '.
>
> Is it right, that you don't have the line 'CLASSITEM "EWKM2"' in you map
> file?
>
> best regards - Leopold
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: Travis Kirstine GIS Tech [mailto:tkirstine at jdbarnes.com]
> Gesendet: Dienstag, 23. August 2005 14:32
> An: Leopold Schefcik (MULTIMEDIAPLAN.AT)
> Betreff: RE: [UMN_MAPSERVER-USERS] attribut values
>
>
> Leopold
> If you are trying to display a layer with several classes you can try
> something like this:
>
>
> 	LAYER
> 		DATA mattamy/road_web
> 		NAME roads
> 		METADATA
> 			DESCRIPTION "Roads"
> 		END
> 		TYPE LINE
> 		STATUS ON
> 		MAXSCALE 150000
> 		MINSCALE 40001
> 		LABELMAXSCALE 120000
> 		LABELMINSCALE 500
> 		LABELITEM "STREETNAME"
> 		CLASS							# HIGHWAYS/MAJOR ROADS
> 			MAXSCALE 120000
> 			MINSCALE 500
> 			EXPRESSION ([RD_CLASS]=1)  #if it is a string ('[FIELD]'='value')
> 			SYMBOL 1
> 			COLOR 75 75 75
> 			SIZE 1
> 		END
>
> 		CLASS							# SECONDARY ROADS
> 			MAXSCALE 120000
> 			MINSCALE 40001
> 			EXPRESSION ([RD_CLASS]=2)
> 			SYMBOL 1
> 			COLOR 100 100 100
> 			SIZE 1
> 		END
> 		CLASS							# LOCAL ROADS
> 			MAXSCALE 80000
> 			MINSCALE 40001
> 			EXPRESSION ([RD_CLASS]=3)
> 			SYMBOL 1
> 			COLOR 150 150 150
> 			SIZE 1
>
> 		END
> 	END
> You can also check out http://ms.gis.umn.edu/docs/reference/mapfile
> Travis
> -----Original Message-----
> From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On
> Behalf Of Leopold Schefcik (MULTIMEDIAPLAN.AT)
> Sent: Tuesday, August 23, 2005 8:01 AM
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: [UMN_MAPSERVER-USERS] attribut values
>
>
>
> Hi list,
>
> I have a database for a layer conisting of 5 files:
> test_bevdichte3.dbf
> test_bevdichte3.sbn
> test_bevdichte3.sbx
> test_bevdichte3.shp
> test_bevdichte3.shx
>
> In my map file I can give the path to the dbf file to clasify the data.
>
>  CLASSITEM "EWKM2"
>
> but still oll the polygones have the same color.
>
> Somehow I want to configurate how many classes are build and with stile
> every class has.
>
> Somebody can give my a hint?
>
> best regards - Leopold


Leopold,

you don't need the classitem because you give it within the EXPRESSION. Are 
the values in your dbf numbers or strings? You should look in the dbf for the 
exact name of the field.
http://mapserver.gis.umn.edu/doc46/mapfile-reference.html#class

If you want to serve WMS you have to put in the projection in the layer 
definition.

Regards,
Norbert



More information about the mapserver-users mailing list