WFS getFeature-get gml but no attributes

Ethan Alpert ealpert at DIGITALGLOBE.COM
Tue Dec 6 15:46:21 EST 2005


Just to be specific this should appear in your LAYER's METADATA block:

LAYER
...
    METADATA
        "wfs_title" "mylayer"
        "gml_include_items" "all"
    END
...
END
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Ethan Alpert
Sent: Tuesday, December 06, 2005 1:44 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] WFS getFeature-get gml but no attributes


http://ms.gis.umn.edu/docs/howto/wfs_server

In the above how to if you scroll to the bottom you'll see that as of 4.6 you need to use a directive in each layer.

Gml_include_item all

-e

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of McGraw, Joanne
Sent: Tuesday, December 06, 2005 1:20 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] WFS getFeature-get gml but no attributes


Hello everyone,
I have a WFS service available on my server. When I send a GetFeature request, the gml coordinates of the polygons are returned to me, but the attributes associated with them are not. Is there something I am missing in my mapfile (below) for the following request to return attributes? The response is at bottom. Cheers, jtm


http://myHost/cgi-bin/ogc/blahmap_wfs_e?version=1.0.0&service=wfs&request=getfeature&typename=blah&maxfeatures=1 <http://myHost/cgi-bin/ogc/ind2001_wfs_e?version=1.0.0&service=wfs&request=getfeature&typename=blah&maxfeatures=1> 


MAP
  NAME "blahmap"
  STATUS ON
  SHAPEPATH "../data"
  FONTSET "../../etc/fonts.txt"
  SYMBOLSET "../../etc/symbols.sym"
  SIZE 400 300
  IMAGETYPE PNG
  IMAGECOLOR 255 255 255
  EXTENT -2903297.697389 -789911.662978 3431059.382789 3959683.443689
  UNITS METERS

  PROJECTION
    "init=epsg:42304"
  END

  WEB
    METADATA
      "wfs_title"             "blah map"
      "wfs_srs"               "EPSG:42304"
      "wfs_abstract"          "about blah map"
      "wfs_onlineresource"    "http://myHost/cgi-bin/ogc/blahmap_wfs_e"
    END
  END

  layer
    name           blah
    type           polygon
    data           blah
    status         on
    dump           true

    metadata
      "wfs_title"             "blah"
      "wfs_srs"               "EPSG:42304"
    end
  end 
end


  <?xml version="1.0" encoding="ISO-8859-1" ?>
  <wfs:FeatureCollection xmlns:myns="http://www.ttt.org/myns" 
   xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml"
   xmlns:ogc="http://www.opengis.net/ogc"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.opengis.net/wfs  <http://www.opengis.net/wfs http://schemas.opengeospatial.net/wfs/1.0.0/WFS-basic.xsd http://www.ttt.org/myns    http://myHost/cgi-bin/ogc/blahmap_wfs_e?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=blah&OUTPUTFORMAT=XMLSCHEMA> 
http://schemas.opengeospatial.net/wfs/1.0.0/WFS-basic.xsd http://www.ttt.org/myns    http://myHost/cgi-bin/ogc/blahmap_wfs_e?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=blah&OUTPUTFORMAT=XMLSCHEMA">
    <gml:boundedBy>
      <gml:Box srsName="EPSG:42304">
        <gml:coordinates>-2299020.105722,-725070.375238 2988711.175777,1279918.168109</gml:coordinates> 
      </gml:Box>
    </gml:boundedBy>
    <gml:featureMember>
      <myns:blah>
        <gml:boundedBy>
          <gml:Box srsName="EPSG:42304">
            <gml:coordinates>-1231975.930367,1214910.267599 -1125764.355386,1279918.168109</gml:coordinates> 
          </gml:Box>
        </gml:boundedBy>
        <myns:msGeometry>
          <gml:Polygon srsName="EPSG:42304">
            <gml:outerBoundaryIs>
              <gml:LinearRing>
                <gml:coordinates>-1230134.382728,1276578.054274 ... -1230134.382728,1276578.054274</gml:coordinates> 
              </gml:LinearRing>
            </gml:outerBoundaryIs>
          </gml:Polygon>
        </myns:msGeometry>
      </myns:blah>
    </gml:featureMember>
  </wfs:FeatureCollection>


Joanne T. McGraw
GIS Data Analyst / Analyste des données du SIG
Agriculture and Agri-Food Canada / Agriculture et Agroalimentaire Canada
Telephone/Téléphone: (613) 759-6103
Facsimile/Télécopieur: (613) 759-1937
960 Carling Ave, #1136
Ottawa, Ontario
K1A 0C6

mcgrawj at agr.gc.ca



More information about the mapserver-users mailing list