[Mapbender-users] Is it NOW possible to join (Postgres-)Tables via WFS-Requests ?

"Schönhammer, Herbert" Schoenhammer.Herbert at Regensburg.de
Wed Jan 16 05:09:44 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/mapbender_users/attachments/20080116/6ac77334/attachment.html


More information about the Mapbender_users mailing list