One shapefile, many countries, many colors?

Pascal Ehlert dadark at DADARK.DE
Wed Jun 13 23:05:16 PDT 2007


That's great, thank you for the example.. Makes it a lot clearer :)
> As an example I am usually using something similar like this:
>
> LAYER
> 	NAME "Countries"	
> 	GROUP "Africa"
>  	TYPE POLYGON
> 	STATUS ON
>   CONNECTIONTYPE postgis
>   CONNECTION "user=me password=none dbname=africa host=localhost"
>   DATA "the_geom from (select the_geom, countryname, area, gid from
> africa_countries) as temp using unique gid using SRID=4326"
>   # SRID 4326 is when using decimal degrees, replace with the correct SRID
> for your data  
>   CLASSITEM "countryname"	
>  	CLASS
>  		NAME "EGYPT"
>  		COLOR 153 204 143
>  		EXPRESSION ([countryname]=EGYPT)
>  	END
>  	CLASS
>  		NAME "LYBIA"
>  		COLOR 252 141 50
>  		EXPRESSION ([countryname]=LYBIA)
>  	END
>  	CLASS
>  		NAME "MADAGASCAR"
>  		COLOR 255 190 232
>  		EXPRESSION ([countryname]=MADAGASCAR)
>  	END	
> END
>
> Cheers
> Karsten
>
>   



More information about the MapServer-users mailing list