possible to classify map layer on JOIN attributes?
(in this description is my enhancement request and some remarks from Attila
Csipa from email converstation about this subject)
In my map file I have several shapefile map layers with joins to dbf files.
What I'm trying to do is classify and display such a map layer based on
attributes from the joined dbf.
But when I try I get an error message:
msDrawMap(): Image handling error. Failed to draw layer named
'aanleiding'... <brmsDBFGetItemIndex(): DBASE file error. Item
'AANLEIDING' not found. <br>
The item 'AANLEIDING' is a field in the external dbf.
>>Attila Csipa
> I see nothing wrong with your example, but I have not used DBF joins
> extensively so don't take my word for granted. Also, check which version of
> Mapserver are you using, IIRC it has been worked on joins in the latest
> releases and some xbase (dbf) functionality was lost and then later
> reintroduced around 4.0.
Querying the map does show the joined attributes so I suppose on a map
layer with a join you can query the joined attributes but you cannot use
them to classify and display the layer.
Is this correct? If not, what am I missing and if so, wouldn't this be a
nice enhancement?
>>Attila Csipa
> That is correct. I have personally suggested that enhancement as well but at
> is turns out it is not easy to implement so it will have to wait until
> somebody invests the time and effort.
Part of the map file and template can be found at the end of this message.
*****
Map file:
LAYER
NAME "aanleiding"
METADATA
wms_title "aanleiding"
END
STATUS ON
TYPE POLYGON
DATA bis_rapv
TOLERANCE 8
LABELITEM rap_code
CLASS
NAME "BIS Aanleiding"
COLOR 0 255 0
OUTLINECOLOR 255 0 0
TEMPLATE "C:\websites\dbf_join\bis_aanleiding.htm"
END
JOIN
TABLE "AANLEIDI.DBF"
TO "RAP_CODE"
NAME "bis_aanleiding_join"
FROM "rap_code"
END
END
Template file:
<p class="red">
rapportcode: [rap_code]
<br>
</p>
<p>
rapportcode: [bis_aanleiding_join_RAP_CODE]
<br>
aanleiding: [bis_aanleiding_join_AANLEIDING]
<br>
</p>
<p class="red">
XCOORD: [XCOORD]
<br>
YCOORD: [YCOORD]
<br>
</p>
Never seems to be high enough priority to actually do anything about it. Moving forward for posterity... -Steve