[mapserver-users] symbols indexed by an attribute

Stephen Woodbridge woodbri at swoodbridge.com
Tue Feb 12 17:41:20 EST 2002


I think you need to use mapscript then it should not be a problem. Using
mapscript implies that you build your web navigation tool using the Perl
or PHP version of mapscript.

-Steve

Pushkar Pradhan wrote:
> 
> Hi everyone,
> My team wants me to create markers, lines and shades depend. upon
> particular attribs. from the shapefile.
> Eg. they created an attr. Shade_sym which is a no., that no. should be
> used to fetch symbol from the map file e.g. if Shade_sym = 29, the 29th
> symbol from the map file must be used.
> I do the foll. to accomplish the task:
>    CLASSITEM 'Shade_sym'
>    CLASS
>      NAME "sym = 29"
>      EXPRESSION ([Shade_sym] EQ 29)
>      SYMBOL 29
>      SIZE 2
>      COLOR 114 24 124
>    END
> Okay I think this is the optimal way, unless any body has other ideas.
> But they also want me to read COLOR AND/OR SIZE for the symbol from a
> file, e.g. the foll. is such a file, the first no. being the symbol no.:
> # value red green blue
> 
> 1 255 250 250
> 2 248 248 255
> 3 245 245 245
> 4 220 220 220
> 5 255 250 240
> Thus I should be able to use the attr. Shade_sym's value 29 to index into
> this file and assign the RGB values to COLOR?
> Is there a way to do this? I've tried to be very brief.
> Thanks,
> ------------------------------------------------------------------------------
> PUSHKAR S. PRADHAN
> Research Assistant
> MISSISSIPPI STATE UNIVERSITY,
> STARKVILLE, MS 39759.
> 
> Engineering Research Center
> Box 9627
> Mississippi State, MS 39762-9627
> ------------------------------------------------------------------------------



More information about the mapserver-users mailing list