[postgis-users] One-to-many join
lists at remoteinformation.com.au
Mon Jan 30 20:03:14 PST 2012
I'm no expert at this, but assuming that your query returns multiple rows, I suspect this is to do with the WMS layer only identifying one feature (which then only returns one of row). This would seem like standard WMS behaviour. If you have multiple features at the same point, you might need to use WFS. If the query returns multiple rows, you are probably better to ask this on the MapServer list.
There may be better ways to do this, but you may need to find the location and provide the multiple rows of data through a secondary query into another window or layer in the window.
What mechanism are you using for displaying the maps and identifying - ie qgis, web template, openlayers??
On 31/01/2012, at 11:00 AM, John Morgan wrote:
> I am attempting to get a one (polys) to many (table) to load postgis data within a mapserver wms. I have the following defined in the .map file.
> DATA "the_geom FROM (SELECT polys.gid AS gid, polys.the_g
> eom AS the_geom, table.pt_id AS pt_id, table.agent AS agent FROM polys RIGHT OUTER JOIN
> table ON polys.pt_id = table.pt_id) as new_table USING UNIQUE gid USING SRID=4326"
> It does load, the layer, however, it doesn't seem to be performing the one-to-many for the attributes on identify. Thanks for any feedback.
> postgis-users mailing list
> postgis-users at postgis.refractions.net
More information about the postgis-users