On Mon, Jan 31, 2011 at 6:07 AM, Balázs Bámer <bamerbal...@gmail.com> wrote: > Hi All, > > I want to restrict geometry GML in WFS GetFeature responses, so it > should be able to serve only attributes. I've tried to achieve it > using schema mapping described here: > http://docs.geoserver.org/stable/en/user/services/wfs/schemamapping.html > > I choosed the built-in layer topp:states and created a file > workspaces/topp/states_shapefile/states/schema.xsd >
Just include the properties you need in the request, for example this request will only return name, area and the geometry. <wfs:GetFeature service="WFS" version="1.1.0" xmlns:topp="http://www.openplans.org/topp" xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> <wfs:Query typeName="topp:states"> <wfs:PropertyName>topp:STATE_NAME</wfs:PropertyName> <wfs:PropertyName>topp:LAND_KM</wfs:PropertyName> <wfs:PropertyName>topp:the_geom</wfs:PropertyName> <ogc:Filter> <ogc:PropertyIsBetween> <ogc:PropertyName>topp:LAND_KM</ogc:PropertyName> <ogc:LowerBoundary><ogc:Literal>100000</ogc:Literal></ogc:LowerBoundary> <ogc:UpperBoundary><ogc:Literal>150000</ogc:Literal></ogc:UpperBoundary> </ogc:PropertyIsBetween> </ogc:Filter> </wfs:Query> </wfs:GetFeature> Ian -- Ian Turton ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users