On Sat, Aug 4, 2012 at 10:40 AM, Andrea Aime
<[email protected]>wrote:

> On Fri, Aug 3, 2012 at 7:00 PM, Matthew Foster <[email protected]>wrote:
>
>> I have a PostGIS db data source on which I need to join in some
>> denormalized tables (i.e. it would have one-to-many relationships).  If I
>> want to display this source via Geoserver, am I going to have to use an
>> Application Schema to handle the denormalized tables?
>
>
> Application schema is to be used if you need to come out with a GML
> compatible complex schema in WFS,
> otherwise you are probably better off using a SQL view, and paste there
> the SQL query representing the
> source of your data
>
>
>
I probably didn't explain my need adequately.  I may have also used the
wrong term: "normalized" vs. "denormalized".

I have table 'A' that has weather stations like this...

Station ID     the_geom
12345           POINT
54321           POINT
56789           POINT

Then we have table 'B' that has the weather equipment for each station like
this...

Station ID     Equipment
12345           Thermometer
12345           Rain gauge
12345           Anemometer
54321           Rain gauge
56789           Thermometer
56789           Anemometer

So when I join table 'A' to table 'B', which I have done in a view on the
database itself, you get multiple rows for station '12345' and '56789'.  I
am using WFS to query the station info on-click from a WMS layer, and the
query returns multiple feature IDs for the stations that have more than one
piece of equipment, as above.

What is the proper solution for this situation?

Matt
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to