Using JOIN for querying
cris ricana
crisricana at GMAIL.COM
Tue Aug 29 20:01:50 PDT 2006
Hello!
I'd like some help regarding my use of JOIN in my mapserver setup. I'm
using two sets of data, a base shapefile ("reg_bndary") containing
basically place information and system-generated csv files containing
all the relevant information regarding these places in the shapefiles.
Both have a common field called Place_ID to be used for the join. I
was planning to use these csv in times when the users want to query
for detailed information on these places. My map file looks like this
(the JOIN part is near the end):
NAME reg_bndary2000.map
SIZE 600 600
EXTENT 114.03 3.8315 131.33 21.1585
SHAPEPATH "data"
IMAGETYPE PNG
UNITS meters
WEB
TEMPLATE 'reg_bndary2000.html'
# IMAGEPATH '/home/mis/DIRP/maps/'
# IMAGEURL 'home/mis/DIRP/maps/'
IMAGEPATH '/home/yronald/htdocs/maps/test_map/maps/'
IMAGEURL '/test_map/maps/'
END #WEB
QUERYMAP
SIZE 600 600
STATUS ON
STYLE SELECTED
COLOR 255 0 0
END
(...)
LAYER
NAME CY_2000
TYPE polygon
STATUS ON
DATA reg_bndary
CLASSITEM COUNT
LABELITEM REGION
(...)
HEADER "reg_bndary2000_header.html"
FOOTER "reg_bndary2000_footer.html"
JOIN
NAME "reg_join"
CONNECTIONTYPE CSV
TABLE "lgu_DB_DACCESS_PROV.csv"
FROM "Place_ID"
TO "1"
TEMPLATE "reg_bndary 2000_dbf.html"
END #join
END # LAYER
END # MAPFILE
The template file used for , "reg_bndary 2000_dbf.html", contains
simply the following:
[reg_join_REGION]<br>
[reg_join_PLACE]
When when I test this, I get the following error:
msQueryByPoint(): Search returned no results. No matching
record(s) found.
Can somebody help me tell me what is wrong in my setup?
Thanks!
Maricris
More information about the MapServer-users
mailing list