[Users] Query joined tables by GetFeatureInfo

Matt Priour mpriour at kestrelcomputer.com
Tue Mar 29 20:17:31 CEST 2011


if you have Geoserver 2.1+, then you can do this via the new SQL Query layer type.

http://underdark.wordpress.com/2010/12/02/layers-from-sql-query-with-geoserver-2-1/

http://docs.geoserver.org/stable/en/user/data/sqlview.html

Matt Priour


From: Morper-Busch, Lucia 
Sent: Tuesday, March 29, 2011 8:02 AM
To: Manuel Aymerich 
Cc: users at geoext.org 
Subject: Re: [Users] Query joined tables by GetFeatureInfo


Hi Manuel,

thank you for your answer:

my architecture is GeoExt - Geoserver - PostGIS.

I can create a view with joined tables in PostGIS, but I don't want to join the entire table, but only the requested feature.

I don't know if it's clear now.

Thank you anyway.

lucia

 

Dipl.-Geogr. Lucia Morper-Busch | Researcher

University of Salzburg | Centre for Geoinformatics - Z_GIS

Schillerstr.30 | Techno-Z, Block 15, 3rd floor | 5020 Salzburg, Austria

Phone +43 (0)662 8044 5298 | Fax +43 (0)662 8044 5260

> Z_GIS.experts for the spatial view

 

Von: Manuel Aymerich [mailto:maymerich at argongra.es] 
Gesendet: Dienstag, 29. März 2011 12:58
An: Morper-Busch, Lucia
Cc: users at geoext.org
Betreff: Re: Query joined tables by GetFeatureInfo

 

Hi Lucia,

 

Probably, the geoext users-list is not the right place to ask this type of question.

To give you the right answer, we would need more information regarding the technology and architecture you are using; please give us some technological context if you want the right hint .

 

Anyway, assuming you are using mapserver and postgis for example, you could implement a join directly in the mapfile like this:

CONNECTIONTYPE POSTGIS

CONNECTION "dbname=yourdatabasename user=yourdbusername"

DATA "the_geom from (select g.gid, g.the_geom, a.attr1, a.attr2 from geotable g join attrtable a on g.gid = a.aid) as subquery unique gid using srid=4326"

That should take care of the GetFeatureInfo join.

 

Regards,

 

Manuel Aymerich

 

R&D Project Manager

ARGONGRA, S.L.

Plaza San Juan de la Cruz, 7  ofic.2

28003 Madrid, SPAIN

maymerich at argongra.es

www.argongra.com

(+34) - 91 129 96 35

 

 

 

--

Date: Tue, 29 Mar 2011 10:39:15 +0200
From: "Morper-Busch, Lucia" <Lucia.Morper-Busch at sbg.ac.at>
Subject: [Users] Query joined tables by GetFeatureInfo
To: <users at geoext.org>
Message-ID:
        <7506863B0141334AA8B9FAAAC6D703B001F6A870 at MAIL2.plus.sbg.ac.at>
Content-Type: text/plain; charset="us-ascii"

Hello GeoExt users,



do somebody have experiences with queries on joined tables via
GetFeatureInfo?

The intention is to get the description of a separate joined table
instead of only index values.



Is it possible to use the cql_filter?



Thank you

Lucia Morper-Busch



Dipl.-Geogr. Lucia Morper-Busch | Researcher

University of Salzburg | Centre for Geoinformatics - Z_GIS

Schillerstr.30 | Techno-Z, Block 15, 3rd floor | 5020 Salzburg, Austria

Phone +43 (0)662 8044 5298 | Fax +43 (0)662 8044 5260

> Z_GIS...experts for the spatial view <http://www.zgis.at/research>



--------------------------------------------------------------------------------


_______________________________________________
Users mailing list
Users at geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20110329/33c64d4e/attachment.htm 


More information about the Users mailing list