class with join
Zolla Michalak
michalak at hwr.arizona.edu
Wed Feb 7 16:45:58 PST 2001
We are using JOIN to bring in new attributes to a layer, and need to make
classes based on the joined attributes, but just discovered by reading the
archives that this is not possible, directly.
I'm trying to figure out what our options are. One option would be to edit
the dbf file of the shape file, adding our new attributes directly, rather
than using JOIN. But I wanted to see if there is an easier way before I go
that route.
Here is a copy of resonse to a previous question about class with join
that we found in the archives. Steve, could you explain in more detail the
options listed here in the following message?
>>Um, nope. No joins are supported for classification purposes. You can
only use directly attached attributes. This was done for performance
reasons. It's technically feasible though.
There are a couple of work arounds. The most straight forward would be
assign a shape to each record in the taxa dataset. You'll have duplicate
shapes (shapefile spec allows it) but with the maps you want to make that
won't be an issue. You can use mapscript to build the shapefile using your
taxa .dbf file as the new attribute table. Here's the approach
1) open sites shapefile and taxa dbf file
2) create a new taxa shapefile (type=point)
3) for each taxa record
- find the appropriate shape in sites
- read it from sites
- write it to taxa
It's redundant but space it cheap and it will certainly be a lot faster.
You may also
want to add some metrics to sites.dbf as you go like number of taxa, date
range
or whatever.
Steve
Stephen Lime
Internet Applications Analyst
---------------------------------------------------------------------------
-Thanks!
***************************************************
Zolla Michalak
Support Systems Analyst
Hydrology, University of Arizona
(520) 626-8746 http://hydis.hwr.arizona.edu
***************************************************
More information about the MapServer-users
mailing list