New User Questions

Stephen Lime steve.lime at dnr.state.mn.us
Wed Jun 23 11:04:34 EDT 1999


Joins changed with version 3.217. There is now a join object instead of a single line
join statement. This was needed in order add support for one-to-many joins. The syntax
is similar to any other mapserver object. (it is documented on the web site) The demo
breaks because I haven't updated it yet- sorry. Anyway, here's how this would be re-written.

JOIN "data/lakejoin.dbf" islake "type"

becomes

JOIN
  NAME lakejoin
  TABLE data/lakejoin.dbf
  FROM islake # item names are case insensitive
  TO "type"  # must be quoted as TYPE is a mapserver keyword
END

I believe TABLE needs to be full path. An oversight on my part and it will be fixed in the
next release. Joined items can be accessed in templates by surrounding their name with
[]'s (eg. [TYPE]). Non-unique names can be accessed by prefacing the item name with
the join name (eg. [lakejoin_TYPE]). Note that the item names in templates are case
sensitive. ArcView always writes xbase item names in all-caps. 

Steve

Stephen Lime
Internet Applications Analyst
MIS Bureau - MN DNR

(651) 297-2937
steve.lime at dnr.state.mn.us

>>> "Grzegorz Myrda" <mapadm at polsl.gliwice.pl> 06/23 8:22 AM >>>
> An error has occurred in loadJoin(): Unknown identifier.
> (data/lakejoin.dbf):(117) 
> 
> #    JOIN "data/lakejoin.dbf" islake "type"

I use full path, with no quotation-marks, field names in uppercase, 
and it works.

Grzegorz




More information about the mapserver-users mailing list