[mapserver-users] Help needed with empty WFS layer

pcreso at pcreso.com pcreso at pcreso.com
Mon May 23 16:06:47 EDT 2011


Hi,

I figure I've missed something obvious in the mapfile, but I can't see it... can anyone else see why WMS works for this layer but WFS doesn't? GetCapabilities works fine for both WMS & WFS.

I have a mapfile, (MS v5.6.6.) with a layer set up as both WMS & WFS, accessible from:
http://boi.wms.niwa.co.nz/cgi-bin/mapserv?map=/srv/www/htdocs/mapdata/mafbnz/bnz_demo.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=-36.855397,174.740902,-36.813416,174.798964&CRS=EPSG:4326&WIDTH=485&HEIGHT=351&LAYERS=Surveillance_native&STYLES=&FORMAT=image/png&TRANSPARENT=TRUE

(for context you can include the coastpoly layer as well)

As a WMS, it works fine, all points rendered as expected, eg, the URL above in a browser. As a WFS, it returns an empty dataset. The XML from the WFS connection:
 http://boi.wms.niwa.co.nz/cgi-bin/mapserv?map=/srv/www/htdocs/mapdata/mafbnz/bnz_demo.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=Surveillance_native


p, li { white-space: pre-wrap; }


is:
<gml:boundedBy>
<gml:null>missing</gml:null>
</gml:boundedBy>
</wfs:FeatureCollection>


The embedded SQL works fine from psql, & it works via WMS.
I have "GML_include_items" & "DUMP true" in the layer definition in the mapfile, which is below.

  LAYER
    NAME "Surveillance_native"
    TYPE point
    STATUS on
    DUMP true

    CONNECTIONTYPE POSTGIS
    CONNECTION "dbname=xxx user=xxx host=localhost port=5432"

    DATA "geom from (SELECT t.stid as gid,
                            n.taxon_name as name,
                            s.geom_point as geom
                     FROM surveillance.samples s, 
                          public.taxon_names n,
                          surveillance.s_taxa t
                     WHERE s.site_id = t.site_id
                       and t.key=n.key
                       and n.biosecurity_status = 'Native'
                     ) as myquery using unique gid using srid=4326"

    METADATA
      "wms_title" "Surveillance_native"
      "wms_srs"   "EPSG:4326"
      "wfs_title" "Surveillance_native"    
      "wfs_srs"   "EPSG:4326"
      "wfs_version" "1.0.0"
      "wfs_typename" "Surveillance_native"
      "gml_include_items" "all"
      "wfs_extent" "177 -48 179 -34"
    END

    CLASS
      NAME "Surv_native"
      STYLE
        SYMBOL "circle"
        SIZE 5
        COLOR 255 0 0
        ANTIALIAS true
      END
    END

    PROJECTION
      "init=epsg:4326"
    END

  END # layer


Any advice appreciated...

  Thanks,

  Brent Wood
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110523/9004c209/attachment.html


More information about the mapserver-users mailing list