JOIN object and WMS/WFS

Emil Zegers taatuut at PLANET.NL
Fri May 20 08:25:56 EDT 2005


Hello Tom,

I don't think it is possible to do joins this way and access them through
WMS/WFS.

In the past I've asked a similair question whether it is possible to
classify and display a map image based on attributes in the join table by
using the MapServer JOIN.

That is not possible (see bug
http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=674).

But maybe doing a join through OGR will work for you (I have not tested this
myself).

OGR SQL supports a limited form of one to one JOIN.

Somehting like:

CONNECTIONTYPE OGR
CONNECTION "data/popplace_pt"
DATA "SELECT columns FROM table LEFT JOIN some join statement"

Take a look at the JOIN examples at
http://www.remotesensing.org/gdal/ogr/ogr_sql.html

Regards,

Emil


-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On
Behalf Of Kralidis,Tom [Burlington]
Sent: vrijdag 20 mei 2005 14:01
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] JOIN object and WMS/WFS


Hi,

Some further progress.  I can verify that MapServer is recognizing the
join; I put invalid entries for the TABLE, FROM, and TO directives and
got a MapServer error, so I know the join'd table is being read, or at
least scanned for existence/fields.

Any suggestions?  Is it possible to do JOIN's in this way and have them
accessible via WMS/WFS?

Thanks

..Tom


> -----Original Message-----
> From: UMN MapServer Users List
> [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of
> Kralidis,Tom [Burlington]
> Sent: Tuesday, 17 May, 2005 07:44
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: [UMN_MAPSERVER-USERS] JOIN object and WMS/WFS
>
>
> Hi,
>
> I have a .shp/.shx/.dbf combo which I have publised as a
> layer/featuretype for OGC:WMS/OGC:WFS.
>
> I have an additional .dbf file which I'd like to join to the
> layer. However when I issue a WMS GetFeatureInfo WFS
> DescribeFeatureType I can't see the data from the seperate .dbf file.
>
> Any suggestions?  Below is my mapfile layer def:
>
> Thanks in advance
>
> ..Tom
>
>
>
>  LAYER
>   NAME "popplace_pt"
>   STATUS ON
>   DATA "data/popplace_pt"
>   TYPE POINT
>   DUMP TRUE
>   HEADER "templates/popplace_pt_query_header.html"
>   TEMPLATE "templates/popplace_pt_query_body.html"
>   TOLERANCE 30
>   JOIN
>    NAME "POPNAMEJOIN"
>    FROM "POPNAME"
>    TO "POPNAME"
>    TABLE
> "/usr/local/wwwsites/apache/devgeo.cciw.ca/apps/mapserv/servic
> es/kyw/dat
> a/table1.dbf"
>    TYPE MULTIPLE
>    TEMPLATE "templates/popplace_pt_join_query_body.html"
>   END
>   METADATA
>    "ows_title"    "Populated Places"
>    "ows_abstract"    "Populated Places"
>    "ows_keywordlist" "environment,air pollution,acid
> rain,climate,greenhouse effect,ecosystems,environment i mpact
> assessment,emergency preparedness,pollution,biological
> diversity,environmental protection,water,wildli
> fe,weather,waste,environmental management,environmental
> technology,recycling,climate change,environmental em
> ergency,pollution prevention,sustainable development,science
> and technology,environmental action,smog,ozone, ec,cise,ogc,cgdi"
>    "wms_opaque" "0"
>    "ows_metadataurl_type" "FGDC"
>    "wms_metadataurl_format" "text/html"
>    "ows_metadataurl_href" "http://www.environmentandresources.ca/"
>    "wms_dataurl_format" "text/html"
>    "wms_dataurl_href" "http://www.environmentandresources.ca/"
>    "wfs_metadataurl_format" "TXT"
>    "gml_include_items" "all"
>   END
>   PROJECTION
>     "init=epsg:42304"
>   END
>   LABELITEM "REAL_NAME"
>   CLASS
>    NAME "Populated Places"
>    SYMBOL 'circle'
>    SIZE 3
>    COLOR 0 255 0
>    LABEL
>     ANTIALIAS TRUE
>     COLOR 255 0 0
>     POSITION ur
>     SIZE LARGE
>    END
>   END
>  END
>



More information about the mapserver-users mailing list