[mapserver-users] WFS server configuration problems...
George A. Dubin
lysholm at tut.by
Mon Aug 18 06:25:00 PDT 2008
Hi all again =)
Nowadays I’m trying to fire up a WFS server based on Mapserver 5.0.2, but
I have a problem with it. This is what I have:
1) mapserv –v output:
MapServer version 5.0.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE
SUPPORTS=WMS_SERVER SUPPORTS=WFS_SERVER SUPPORTS=WCS_SERVER INPUT=TIFF
INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
2) My MAP file:
MAP
UNITS METERS
EXTENT 1373.000000 1663.000000 2073.000000 2163.000000
SIZE 1095 565
SHAPEPATH "/var/www/map/shapes"
SYMBOLSET "/var/www/map/symbols/symbols.sym"
FONTSET "/var/www/map/fonts/fonts.list"
IMAGECOLOR 255 255 255
TEMPLATEPATTERN 'map*'
WEB
TEMPLATE '/var/www/map/map.html'
IMAGEPATH '/var/www/map/tmp/'
IMAGEURL '/map/tmp/'
METADATA
wfs_title "WFS Demo"
wfs_onlineresource
"http://localhost/cgi-bin/mapserv?map=wfs.map&"
wfs_srs "EPSG:32235"
END
END
PROJECTION
"init=epsg:32235"
END
LAYER
NAME "Housepoints"
CONNECTIONTYPE postgis
CONNECTION "user=mapserv dbname=mapserv host=127.0.0.1
port=5432"
DATA "wkb_geometry from polymap"
STATUS ON
TYPE POINT
LABELITEM "label"
TOLERANCE 7
HEADER '/var/www/map/templates/templ_head.html'
FOOTER '/var/www/map/templates/templ_footer.html'
DUMP TRUE
METADATA
wfs_title "houses"
gml_featureid "msGeometry"
gml_include_items "all"
END
PROJECTION
"init=epsg:32235"
END
CLASS
NAME "housepoints"
TEMPLATE '/var/www/map/templates/templ_query.html'
STYLE
SYMBOL 'circle'
COLOR [color]
OUTLINECOLOR 0 0 0
SIZE [size]
END
LABEL
COLOR 0 0 255
POSITION AUTO
PARTIALS TRUE
MINDISTANCE 100
BUFFER 2
ENCODING CP1251
WRAP '~'
END
END
END
END
This mapfile is a working one, only “metadata” sections added.
3) A part of
http://localhost/cgi-bin/mapserv?map=wfs.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=getcapabilities
output:
...
<FeatureTypeList>
<Operations>
<Query/>
</Operations>
<FeatureType>
<Name>Housepoints</Name>
<Title>houses</Title>
<SRS>EPSG:32235</SRS>
<LatLongBoundingBox minx="-178.487" miny="-8.24225e+12" maxx="170.758"
maxy="8.24225e+12"/>
</FeatureType>
</FeatureTypeList>
...
4)
http://172.20.200.200:8080/cgi-bin/mapserv?map=wfs.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=Housepoints
output:
<schema 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="Housepoints" type="ms:HousepointsType"
substitutionGroup="gml:_Feature"/>
<complexType name="HousepointsType">
<complexContent>
<extension base="gml:AbstractFeatureType">
<sequence>
<element name="msGeometry" type="gml:GeometryPropertyType" minOccurs="0"
maxOccurs="1"/>
<element name="ogc_fid" type="string"/>
<element name="cat" type="string"/>
<element name="label" type="string"/>
<element name="color" type="string"/>
<element name="size" type="string"/>
</sequence>
</extension>
</complexContent>
</complexType>
</schema>
5) And now -
http://172.20.200.200:8080/cgi-bin/mapserv?map=wfs.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=getfeature&TYPENAME=Housepoints
output:
<wfs:FeatureCollection 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://localhost/cgi-bin/mapserv?map=
wfs.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=Housepoints&OUTPUTFORMAT=XMLSCHEMA">
<gml:boundedBy>
<gml:null>missing</gml:null>
</gml:boundedBy>
</wfs:FeatureCollection>
Why am I having “missing” here? =/
--
Отправлено M2, революционной почтовой программой Opera:
http://www.opera.com/mail/
More information about the MapServer-users
mailing list