I have a user who wants to send a shape and have GeoServer calculate the Area.
I see an Area function, which takes one parameter of type Geometry.
http://svn.geotools.org/geotools/branches/2.2.x/module/main/src/org/geotools/filter/function/FilterFunction_area.java
I see in our GetCapabilities that our GeoServer supports the Area function.
I know I don’t have the syntax correct in the request. Can anyone point out what I’m doing wrong?
I’m getting an error message at gml:Polygon “Invalid content was found starting with element gml:Polygon. One of
http:/www.opengis.net/ogc expression is expected”.
And it would seem that don’t need typeName, but it seems to require it…
<wfs:GetFeature xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=“http://www.opengis.net/wfs http://giswebservices.massgis.state.ma.us/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd”
xmlns:gml=“http://www.opengis.net/gml” xmlns:wfs=“http://www.opengis.net/wfs”
xmlns:ogc=“http://www.opengis.net/ogc” service=“WFS” version=“1.0.0”>
<wfs:Query typeName=“massgis:GISDATA.SCHOOLS_PT”
xmlns:massgis=“http://massgis.state.ma.us/featuretype”>
<ogc:Filter xmlns=“http://www.opengis.net/ogc”>
ogc:PropertyIsEqualTo
<ogc:Function name=“Area”>
<gml:Polygon srsName=“http://www.opengis.net/gml/srs/epsg.xml#26986”>
gml:outerBoundaryIs
gml:LinearRing
gml:coordinates55482.23359037,932685.310856 51792.79359037,932912.810856
51674.35359037,932515.310856 51544.14359038,932078.310856
49599.28359037,925512.060856 47775.54359037,919372.560856
47449.62359038,918279.440856 45808.45359038,912738.870856
45140.77359037,910497.620856 45004.94359038,910041.620856
45744.48359037,909868.310856 48668.97359037,909195.190856
50438.62359038,917473.120856 50803.29359037,917410.810856
50996.35359037,918202.000856 51108.95359038,918699.620856
55684.83359037,927925.440856 54440.55359038,928210.250856
55318.41359037,931999.120856 55482.23359037,932685.310856</gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
</ogc:Function>
1
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>
Aleda Freeman
MassGIS
Office of Geographic and Environmental Information
251 Causeway St. 5th floor
Boston, MA 02114
phone: 617-626-1193
fax: 617-626-1249
http://www.mass.gov/mgis - MassGIS
http://lyceum.massgis.state.ma.us - Webservices Wiki
http://maps.massgis.state.ma.us/biodiversity - EOEEA Biodiversity Days