Class Expressions & Class Items

Stephen Lime steve.lime at dnr.state.mn.us
Wed Mar 28 11:47:54 EST 2001


At the moment you're out of luck. There are no provisions for shapefiles
with disjoint attribute data. Not real standard. I'm looking to add ODBC
based joins soon but that will be a resource hog and you'll lose whatever
performance gains you got from  Oracle in the first place.

That said you could simply loop thorough the features yourself assigning
class membership in PHP and using the shape draw method. In 3.5 the
draw method for a shape assumes that a shape has already been classified
so that's how you'll have to do this in the next release.

Steve

Stephen Lime
Internet Applications Analyst

Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937

>>> Thorsten Fischer <frosch at cs.tu-berlin.de> 03/27/01 03:34AM >>>

Ladies & gentlemen,

I am using php MapScript to display data from shapefiles. The .dbf
data files have been imported into an Oracle database for
performance and maintenance reasons.

I want to 'highlight' one or more shapes in a layer by filling
them with a different color. Using a map file, I would do
the following:

[ BLA BLA LAYER DEFINITION ]
CLASSITEM "name"
CLASS
  EXPRESSION /<whatever>/
  COLOR <a lighter color>
END
CLASS
  EXPRESSION /./
  COLOR <default color>
END
[ REST OF BLA BLA ]

Coding in php MapScript, I would now get the first class with
getClass (), set a new expression, redraw the map, and that's it.

Unfortunately, the CLASSITEM stuff is retrieved from the .dbf
file of course, which does not exist for me anymore.

Any suggestions?


Thorsten Fischer





More information about the mapserver-users mailing list