[Geomoose-users] debugging mapserver WFS layer search

karsten karsten at terragis.net
Fri Jan 5 07:53:28 PST 2018


Hi All,
 
I have configured my first Geomoose v 3 pilot project and got all working
except a MapServer WFS layer search on a PostGIS layer. I am using ms4w v
3.2.3  and the app package geomoose 3.1. I have successfully added a
firestation WFS search to the desktop demo
<http://localhost/gm3/desktop/index.html>
http://localhost/gm3/desktop/index.html following  the instructions at
<http://geomoose.github.io/gm3/howto/add-search.html>
http://geomoose.github.io/gm3/howto/add-search.html .
Now I have used MapServer WMS for many years but this is the first time I am
using WFS; so am a bit lost of how to debug my own custom layers search in
Geomoose.
In a copy of the desktop app I added my own data and so on but the search on
one parcel layer I have added (a MapServer WFS layer drawn from PostGIS)
returns no errors but empty gml results. 
 
The request I can see is 
http://localhost/cgi-bin/mapserv.exe?MAP=c:/data/mapfiles/mechernich.map
<http://localhost/cgi-bin/mapserv.exe?MAP=c:/data/mapfiles/mechernich.map&ty
pename=ms:flurstueck_wfs> &typename=ms:flurstueck_wfs
plus the post params
MAP	 c:/data/mapfiles/mechernich.map	
typename    	 ms:flurstueck_wfs	
 
<GetFeature xmlns=" <http://www.opengis.net/wfs> http://www.opengis.net/wfs"
service="WFS" version="1.1.0" outputFormat="text/xml; subtype=gml/2.1.2"
xsi:schemaLocation=" <http://www.opengis.net/wfs> http://www.opengis.net/wfs
<http://schemas.opengis.net/wfs/1.1.0/wfs.xsd>
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" xmlns:xsi="
<http://www.w3.org/2001/XMLSchema-instance>
http://www.w3.org/2001/XMLSchema-instance"><Query
typeName="ms:flurstueck_wfs" srsName="EPSG:4326"><Filter xmlns="
<http://www.opengis.net/ogc> http://www.opengis.net/ogc"><PropertyIsLike
wildCard="*" singleChar="." escapeChar="!"
matchCase="false"><PropertyName>lagebezeichnung</PropertyName><Literal>*Auf*
</Literal></PropertyIsLike></Filter></Query></GetFeature>
 
 
The response gives me an empty bounding box and feature collection (when
there are many objects that should be found using the string "Auf" - tried
it with a postgres SQL query that gave me > 2200 results):
 
<?xml version='1.0' encoding="UTF-8" ?>
<wfs:FeatureCollection
   xmlns:ms=" <http://mapserver.gis.umn.edu/mapserver>
http://mapserver.gis.umn.edu/mapserver"
   xmlns:wfs=" <http://www.opengis.net/wfs> http://www.opengis.net/wfs"
   xmlns:gml=" <http://www.opengis.net/gml> http://www.opengis.net/gml"
   xmlns:ogc=" <http://www.opengis.net/ogc> http://www.opengis.net/ogc"
   xmlns:xsi=" <http://www.w3.org/2001/XMLSchema-instance>
http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation=" <http://www.opengis.net/wfs>
http://www.opengis.net/wfs
<http://schemas.opengis.net/wfs/1.1.0/WFS-basic.xsd>
http://schemas.opengis.net/wfs/1.1.0/WFS-basic.xsd 
                        <http://mapserver.gis.umn.edu/mapserver>
http://mapserver.gis.umn.edu/mapserver
<http://localhost/cgi-bin/mapserv?map=C:/data/mapfiles/mechernich.map&SE
RVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=ms:
flurstueck_wfs&OUTPUTFORMAT=XMLSCHEMA>
http://localhost/cgi-bin/mapserv?map=C:/data/mapfiles/mechernich.map&SER
VICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=ms:f
lurstueck_wfs&OUTPUTFORMAT=XMLSCHEMA">
   <gml:boundedBy>
      <gml:null>missing</gml:null>
   </gml:boundedBy>
</wfs:FeatureCollection>

 
I have tried to include all that is needed in the mapsertver layers see
below (even changed the data tag to a sub select to make sure all atributes
are retrieved for sure ...
 
 
Would anyone have suggestions how to debug this ?
 
Cheers
Karsten
 
Karsten Vennemann
Principal

Terra GIS LTD
 <http://www.terragis.net> www.terragis.net 
 
 
------------------- in map file  ---------------
 
  LAYER
    CONNECTION "dbname='gisme' host=localhost port=5432 user='postgres'
password='postgres' sslmode=disable"
    CONNECTIONTYPE POSTGIS
    DATA 'wkb_geometry FROM (select * from "public"."gm_ax_flurstueck_geo")
as foo USING UNIQUE fid USING srid=25832'
    EXTENT 324008.5625 5598582 343287.6875 5614541
    METADATA
      "gml_include_items" "all"  
      "ows_extent" "324008.5625 5598582.0 343287.6875 5614541.0"
      "ows_srs" "EPSG:25832 EPSG:3857 EPSG:900913 EPSG:4326" 
      "ows_title" "flurstueck_wfs"
      "wms_bbox_extended" "true"
      "gml_include_items" "all" 
      "wfs_title"         "flusstuecke_wfs" ##REQUIRED
      "gml_featureid"     "ogc_fid" ## REQUIRED
      "wfs_enable_request" "*"  
      'ows_srs' 'EPSG:25832 EPSG:4326 EPSG:3857 EPSG:900913'
      'wfs_srs' 'EPSG:25832 EPSG:4326 EPSG:3857 EPSG:900913'
      'wms_feature_info_mime_type' 'application/json' 
   END # METADATA
    TEMPLATE 'dummy'
    NAME "flurstueck_wfs"
    PROJECTION
      "init=epsg:25832"
    END # PROJECTION
    STATUS OFF
    TILEITEM "location"
    TYPE POLYGON
    UNITS METERS
    CLASS
      NAME "Flurstueck"
      STYLE
        COLOR 249 250 255
        OPACITY 0
      END # STYLE
      STYLE
        OUTLINECOLOR 187 142 142
        WIDTH 0.982677
      END # STYLE
    END # CLASS
  END # LAYER

 

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20180105/bc01d291/attachment.html>


More information about the Geomoose-users mailing list