Запрос (реальные адреса заменены на ..URL.. и ..addr..):
Код: Выделить всё
http://..URL../cgi-bin/mapserv?map=/..addr../query_wfs.map&version=1.0.0&service=WFS&request=GetFeature&typename=highlights&filter=<Filter><PropertyIsEqualTo><PropertyName>gid</PropertyName><Literal>3748</Literal></PropertyIsEqualTo></Filter>
Код: Выделить всё
<wfs:FeatureCollection xmlns:ms="http://mapserver.gis.umn.edu/mapserver" 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://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd http://mapserver.gis.umn.edu/mapserver http://..URL../cgi-bin/mapserv?map=/..addr../query_wfs.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=highlights&OUTPUTFORMAT=XMLSCHEMA">
<gml:boundedBy>
<gml:null>missing</gml:null>
</gml:boundedBy>
</wfs:FeatureCollection>
Код: Выделить всё
LAYER
CONNECTIONTYPE postgis
CONNECTION "user=***** dbname=***** host=localhost port=5432 password=*****"
DATA "the_geom from home_polygon USING UNIQUE gid"
NAME "highlights"
STATUS on
TYPE polygon
DUMP TRUE
TRANSPARENCY 0
METADATA
"wfs_title" "highlights"
"wfs_typename" "highlights"
"wfs_include_items" "all"
"wfs_encoding" "utf-8"
"gml_include_items" "all"
"gml_title" "highlights"
"wfs_enable_request" "*"
"gml_featureid" "gid"
"wfs_srs" "EPSG:4326"
"wfs_version" "1.0.0"
END
PROJECTION
"init=epsg:4326"
END
CLASS
NAME "home_polygon"
TEMPLATE "templates/homes.html"
STYLE
SYMBOL 0
SIZE 2
OUTLINECOLOR 255 128 128
COLOR 255 0 0
ANTIALIAS false
END
END
END
Код: Выделить всё
<schema xmlns:ms="http://mapserver.gis.umn.edu/mapserver" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml" targetNamespace="http://mapserver.gis.umn.edu/mapserver" elementFormDefault="qualified" version="0.1">
<import namespace="http://www.opengis.net/gml" schemaLocation="http://schemas.opengis.net/gml/2.1.2/feature.xsd"/>
<element name="highlights" type="ms:highlightsType" substitutionGroup="gml:_Feature"/>
<complexType name="highlightsType">
<complexContent>
<extension base="gml:AbstractFeatureType">
<sequence>
<element name="msGeometry" type="gml:GeometryPropertyType" minOccurs="0" maxOccurs="1"/>
<element name="gid" type="string"/>
<element name="id" type="string"/>
<element name="label" type="string"/>
</sequence>
</extension>
</complexContent>
</complexType>
</schema>
Код: Выделить всё
<WFS_Capabilities xmlns="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0" updateSequence="0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-capabilities.xsd">
<!--
MapServer version 6.0.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
-->
<Service>
<Name>MapServer WFS</Name>
<Title>WFS</Title>
<OnlineResource>
http://..URL../cgi-bin/mapserv?map=/..addr../query_wfs.map&
</OnlineResource>
</Service>
<Capability>
<Request>
<GetCapabilities>
<DCPType>
<HTTP>
<Get onlineResource="http://..URL../cgi-bin/mapserv?map=/..addr../query_wfs.map&"/>
</HTTP>
</DCPType>
<DCPType>
<HTTP>
<Post onlineResource="http://..URL../cgi-bin/mapserv?map=/..addr../query_wfs.map&"/>
</HTTP>
</DCPType>
</GetCapabilities>
<DescribeFeatureType>
<SchemaDescriptionLanguage>
<XMLSCHEMA/>
</SchemaDescriptionLanguage>
<DCPType>
<HTTP>
<Get onlineResource="http://..URL../cgi-bin/mapserv?map=/..addr../query_wfs.map&"/>
</HTTP>
</DCPType>
<DCPType>
<HTTP>
<Post onlineResource="http://..URL../cgi-bin/mapserv?map=/..addr../query_wfs.map&"/>
</HTTP>
</DCPType>
</DescribeFeatureType>
<GetFeature>
<ResultFormat>
<GML2/>
</ResultFormat>
<DCPType>
<HTTP>
<Get onlineResource="http://..URL../cgi-bin/mapserv?map=/..addr../query_wfs.map&"/>
</HTTP>
</DCPType>
<DCPType>
<HTTP>
<Post onlineResource="http://..URL../cgi-bin/mapserv?map=/..addr../query_wfs.map&"/>
</HTTP>
</DCPType>
</GetFeature>
</Request>
</Capability>
<FeatureTypeList>
<Operations>
<Query/>
</Operations>
<FeatureType>
<Name>highlights</Name>
<Title>highlights</Title>
<SRS>EPSG:4326</SRS>
<LatLongBoundingBox minx="-2.5e+07" miny="-2.5e+07" maxx="2.5e+07" maxy="2.5e+07"/>
</FeatureType>
<FeatureType>
<Name>streets</Name>
<Title>highlights1</Title>
<SRS>EPSG:4326</SRS>
<LatLongBoundingBox minx="-2.5e+07" miny="-2.5e+07" maxx="2.5e+07" maxy="2.5e+07"/>
</FeatureType>
<FeatureType>
<Name>home_polygon</Name>
<Title>home_polygon</Title>
<SRS>EPSG:4326</SRS>
<LatLongBoundingBox minx="-2.5e+07" miny="-2.5e+07" maxx="2.5e+07" maxy="2.5e+07"/>
</FeatureType>
<FeatureType>
<Name>tourizm</Name>
<Title>tourizm</Title>
<SRS>EPSG:4326</SRS>
<LatLongBoundingBox minx="-2.5e+07" miny="-2.5e+07" maxx="2.5e+07" maxy="2.5e+07"/>
</FeatureType>
</FeatureTypeList>
<ogc:Filter_Capabilities>
<ogc:Spatial_Capabilities>
<ogc:Spatial_Operators>
<ogc:Equals/>
<ogc:Disjoint/>
<ogc:Touches/>
<ogc:Within/>
<ogc:Overlaps/>
<ogc:Crosses/>
<ogc:Intersect/>
<ogc:Contains/>
<ogc:DWithin/>
<ogc:BBOX/>
</ogc:Spatial_Operators>
</ogc:Spatial_Capabilities>
<ogc:Scalar_Capabilities>
<ogc:Logical_Operators/>
<ogc:Comparison_Operators>
<ogc:Simple_Comparisons/>
<ogc:Like/>
<ogc:Between/>
</ogc:Comparison_Operators>
</ogc:Scalar_Capabilities>
</ogc:Filter_Capabilities>
</WFS_Capabilities>