Is it NOW possible to join (Postgres-)Tables viaWFS-Requests ?

"Schönhammer, Herbert" Schoenhammer.Herbert at REGENSBURG.DE
Wed Jan 16 07:20:10 EST 2008


Hello, 
I try to join two postgis-tables and I want to display the result via a WFS-request. 
I have found a discussion from May 2005, that is is not working (Title: "JOIN object and WMS/WFS" ). 
But is this working NOW, 
or does anybody know a workaround ? 
I try to do this (a sequence of the mapfile): 
------------------------------------ 
CONNECTIONTYPE postgis 
CONNECTION "user=xxx dbname=yyy host=zzz password=vvvv" 
DATA "the_geom from (SELECT fid, the_geom, ...., wahlb_nummer_int FROM table_1 ORDER by wahlb_nummer_int) as foo USING UNIQUE fid USING SRID=31468"
.... 
HEADER ".../wahlen1_header.html" 
TEMPLATE ".../wahlen1.html" 
FOOTER ".../wahlen1_footer.html" 

JOIN 
NAME "bereiche" 
CONNECTIONTYPE ogr 
CONNECTION "user=xxx dbname=yyy host=zzz password=vvv" 
TABLE "table_2" 
FROM "wahlb_nummer_int" 
TO "wahlb_nummer_int2" 
TYPE ONE-TO-MANY 
TEMPLATE ".../wahlen1_join_adressbereiche.html" 
END 
------------------------------------ 
The map is drawn correctly, the WFS responds with all attributes of table_1. 
ogrinfo recognizes and describes the table_2 correctly. 
Producing errors (for example giving a wrong field-name in the TO-parameter of the JOIN-object), mapserver answers with an error-massage (field not recognized ...). So I think, the join definition is correct. 
But the template TEMPLATE ".../wahlen1_join_adressbereiche.html" is NEVER put into the WFS-answer. 
greetings 
Herbert 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080116/945a08b2/attachment.html


More information about the mapserver-users mailing list