[mapserver-users] problem with join
mikee
mike at mikee.de
Wed Mar 6 11:45:11 PST 2002
1000s thanks, but i need also the temlate-files.
my old problem:
1.) i have a shapfile called "test1" with an item "nr" in the dir: /mapserver/data
2.) i have also a dbf called "join1.dbf" in the dir: "c:\inetpub\wwwroot\mapserver\data\join1.dbf" also with an item "nr" and "wert1" and "test2"
3.) my map-file:
LAYER
NAME test
TYPE POLYGON
STATUS DEFAULT
DATA test1
LABELITEM NR
CLASS
SYMBOL 0
COLOR 255 0 0
OUTLINECOLOR 0 0 0
TEMPLATE "joinx.html"
JOIN
NAME jj
table "c:\inetpub\wwwroot\mapserver\data\join1.dbf"
from nr
to nr
type single
END # join
LABEL
COLOR 128 0 0
ANTIALIAS TRUE
SIZE tiny
END
END
HEADER "joinx_header.html"
FOOTER "joinx_footer.html"
END
4.) the templates
a) "joinx_header.html"
<font size+1><b>Layer: TEST</b></font><p>
<table cellpadding=5 cellspacing=2 border=0>
<tr bgcolor=#CCCCCC>
<th>NR</th><th>WERT1</th><th>TEXT2</th>
</tr>
b) "joinx_footer.html"
</table><p>
c) "joinx.html
<tr>
<td>[NR]</td>
<td>[WERT1]</td>
<td>[TEXT2]</td>
</tr>
but my query give me only this:
Layer: TEST
NR WERT1 TEXT2
5 [WERT1] [TEXT2]
:-( - where is the mistake? where are the value for "wert1" and "text2"??
---> mfg mikeE. :-)
---> mail: mike at mikee.de
---> @web: http://www.mikee.de
---> @wap: http://www.mikee.de/wap (dinge, die die welt nicht braucht!)
---> icq: 129278959
---> siehe auch:
---> www.hallelinks.de
---> www.rettet-die-berliner-bruecke.de
---> www.buergerforum-halle.de
---> www.ohnesocken.de
---> www.elstermanns.de
---> www.tonart-halle.de
----- Original Message -----
From: Richard Greenwood
To: Mike Elstermann
Cc: mapserver-users at lists.gis.umn.edu
Sent: Tuesday, March 05, 2002 5:53 AM
Subject: Re: [mapserver-users] problem with join
You can create a join in your map file. Here's an example:
Class
Join
from PIDN
name jointest
table "\Tc\DATA\assessor.DBF"
# TEMPLATE join_region.shp_query.html # required only for one-to-many joins
to Pidn
type single
End # of Join Object
SYMBOL "Solid"
OUTLINECOLOR 0 0 0
END # of Class
This is pretty well documented. Be careful how much editing is done to the dbf - adding or deleting records will break the join.
Also note that you can only use a join for queries, not labeling. If you need to label features off the dbf you are out of luck. You will need to create the join in ArcView or MapInfo, and save it out as a single, static layer.
Rich
At 11:54 AM 3/4/2002 +0100, you wrote:
hi,
my (little) problem:
i have a shape and i have ab big dbf-file.
the polys in the shape have 1 (one!) item - the ID , all other dates are in the dbf (landuse, name, number, ........)
i want to join both files to shade the poly in different views (first landuse, later name, ....)
my users should only edit in the dbf-file!
and now my problem: how must I join to shade different with datas from the joined dbf???
who has an example for me (map-file?)
great thanks.
mikeE.:-)
Richard W. Greenwood, PLS
Greenwood Mapping, Inc.
Rich at GreenwoodMap.com
(307) 733-0203
http://www.GreenwoodMap.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20020306/06db31a1/attachment.htm>
More information about the MapServer-users
mailing list