[GeoMoose-users] One to Many Join - GeoMoose 3

James Klassen klassen.js at gmail.com
Fri Jan 6 00:46:47 PST 2023


Personally, I haven’t used MapServer JOIN in a very long time and instead,
as Brent suggested, prefer using doing joins in SQL (OGR’s SQL
capabilities, PostGIS or GPKG).

One thought is I’m not sure MapServer JOIN would work over WFS.  My
impression is it is meant more for use with MapServer templates
(mode=query, mode=nquery) which GeoMoose no longer uses (as of ver 3).  The
interesting bit here is the MapServer join one-to-many join doesn’t appear
to duplicate the feature like a SQL join ahead of MapServer would generally
do (unless some SQL tricks are done to transform the multiple joined rows
into columns.  I’m not sure how MapServer/GeoMoose would handle an array
column or a json column.)

And besides auto=true, looking at the WFS response GML with the browser
debugger can be helpful too (or looking at the WFS in QGIS).  My guess is
the JOINed columns aren’t in the WFS response.

On Thu, Jan 5, 2023 at 18:59 Brent Fraser <bfraser at geoanalytic.com> wrote:

> I've done a join in the DATA statement and in an ogr vrt file, but I don't
> recall using the JOIN object in the map file.  Likely you need to be
> careful to use upper case for the DBF column names. GeoMoose 3 uses WMS/WFS
> to communicate with Mapserver; maybe the JOIN doesn't work with these
> protocols.
>
> Did you set DEBUG 5 and check the contents of the log file?
>
>
>
> ------------------------------
> *From*: "Christopher Hughes" <chughes at co.lincoln.or.us>
> *Sent*: 1/5/23 5:32 PM
> *To*: geomoose-users-osgeo <geomoose-users at lists.osgeo.org>, "
> bfraser at geoanalytic.com" <bfraser at geoanalytic.com>
> *Subject*: Re: [GeoMoose-users] One to Many Join - GeoMoose 3
>
> In this case my join is one-to-many. For each parcel I have multiple
> results in the table I'm trying to join. The issue is that I only get
> results for the initial layer, not for the table I'm trying to join to the
> initial layer. I've tried auto="true", which works except it only gives me
> the values for the parcel layer, not the table I'm trying to join in the
> mapfile. I wasn't sure if there was a way of setting the join parameters in
> the mapbook map-source rather than in mapfile layer.
>
> --
> Chris Hughes
>
> GIS Analyst
> Lincoln County GIS Department
> 880 NE 7th
> <https://www.google.com/maps/search/880+NE+7th?entry=gmail&source=g> St.
> l Newport, OR 97365
> Tel: (541) 574 1283
>
>
> ------------------------------
> *From:* Brent Fraser <bfraser at geoanalytic.com>
> *Sent:* Thursday, January 5, 2023 4:06 PM
> *To:* Christopher Hughes <chughes at co.lincoln.or.us>; geomoose-users-osgeo
> <geomoose-users at lists.osgeo.org>
> *Subject:*RE: [GeoMoose-users] One to Many Join - GeoMoose 3
>
> Hi Chris,
>
>   Usually what I do is in the mapbook set   <template name="identify"
> auto="true" /> and do an Identify on a parcel to what Mapserver sends back
> via GML format.  You can then tune your GeoMoose template using the
> property names shown in the Identify results.
>
> Should your join be a one-to-one?  Have a look in the mapserver error log
> to see if there any problems on the Mapserver side.
>
> Best Regards,
> Brent Fraser
>
>
>
> ------------------------------
> *From*: "Christopher Hughes" <chughes at co.lincoln.or.us>
>  *Sent*: 1/5/23 4:27 PM
>  *To*: geomoose-users-osgeo <geomoose-users at lists.osgeo.org>
>  *Subject*: [GeoMoose-users] One to Many Join - GeoMoose 3
>
> Hello all,
>
> I was curious if anyone's tried to do a join (in my case one-to-many) in
> GeoMoose 3.
>
> I have a shapefile of parcels that I was trying to join to a dbf of
> related information for each parcel.
> I was following the mapserver documentation for joins  Here
> <https://mapserver.org/mapfile/join.html> but I couldn't figure out how
> to convert the mapserver format where the templates and joins are specified
> in the mapfile to the GeoMoose 3 format where the templates are set in the
> mapbook.xml. I couldn't get results to reflect the JOIN parameters that
> were set in the mapfile.
>
> Any feedback would be appreciated,
>
> Chris
>
>
> --
> Chris Hughes
>
> GIS Analyst
> Lincoln County GIS Department
> 880 NE 7th
> <https://www.google.com/maps/search/880+NE+7th?entry=gmail&source=g> St.
> l Newport, OR 97365
> Tel: (541) 574 1283
>
> _______________________________________________
> GeoMoose-users mailing list
> GeoMoose-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/geomoose-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20230106/e318428c/attachment.htm>


More information about the GeoMoose-users mailing list