getFeature: Results are not correct
Christian Wilmes
C.Wilmes at GMX.DE
Tue May 16 03:28:58 PDT 2006
Hello,
first of all sorry for cross posting, but I've got no idea where I have to
search the mistake so I post it to the GDAL and the Mapserver Mailinglist.
I'm trying to publish a WFS-Server. The Data (only Point-Data) are in a
PostgreSQL-Database (no PostGIS!). So the connection to the data is over
"Virtual Spatial Data". The getCapabilities and DescribeFeatureType request
both work very well. Only the GML-Document getting with the getFeature
request is not correct. The number of features in the GML-Document are
correct too every time, but the features are not in the Bounding Box. The
features in the GML-Document are always the feature which are on the top of
the table they come from. Only the number of feature is correct. The MBR
(Minimum Boundig Rectangle) on the top of the GML-Document amasingly the
correct one. So it don't fit to the features in the document. Testing the
connection with "ogrinfo" and a Boundig-Box is working correct. If I'm
trying to make a WMS-Server with the same Data and the same OGR-file it
works very well.
So here is my Mapfile:
MAP
NAME WFS_Server
STATUS ON
WEB
METADATA
"wfs_title" "WFS Server"
"wfs_onlineresource" "http://127.0.0.1/cgi-bin/mapserv.exe?"
"wfs_srs" "EPSG:4326"
END
END
PROJECTION
"init=EPSG:4326"
END
LAYER
NAME myWFS
METADATA
"wfs_title" "myWFS"
"gml_include_items" "all"
END
TYPE POINT
STATUS ON
CONNECTIONTYPE OGR
CONNECTION "test.ovf"
PROJECTION
"init=EPSG:4326"
END
DUMP TRUE
END
END
and the OGR-File test.ovf:
<OGRVRTDataSource>
<OGRVRTLayer name="feature">
<SrcDataSource>PG:host=192.168.5.86 user=cwilmes dbname=rosoapcw
password=xxx</SrcDataSource>
<SrcLayer>feature</SrcLayer>
<GeometryType>wkbPoint</GeometryType>
<LayerSRS>EPSG:4326</LayerSRS>
<GeometryField encoding="PointFromColumns" x="lat" y="lon"/>
</OGRVRTLayer>
</OGRVRTDataSource>
Here is a URL which I used for testing
the
WFS
getFeature-Request:
http://localhost/cgi-bin/mapserv.exe?&REQUEST=GetFeature&VERSION=1.0.0&SERVICE=WFS&TYPENAME=myWFS&&BBox=9.98,7.98,10,8
....and here is the result:
<?xml version="1.0" encoding="ISO-8859-1"
?>
-
<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.opengeospatial.net/wfs/1.0.0/WFS-basic.xsd
http://mapserver.gis.umn.edu/mapserver
http://127.0.0.1/cgi-bin/mapserv.exe?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=myWFS&OUTPUTFORMAT=XMLSCHEMA">
- <gml:boundedBy>
- <gml:Box srsName="EPSG:4326">
<gml:coordinates>9.980700,7.984220 9.997500,7.995010</gml:coordinates>
</gml:Box>
</gml:boundedBy>
- <gml:featureMember>
- <ms:myWFS>
- <gml:boundedBy>
- <gml:Box srsName="EPSG:4326">
<gml:coordinates>9.682230,7.653260 9.682230,7.653260</gml:coordinates>
</gml:Box>
</gml:boundedBy>
- <ms:msGeometry>
- <gml:Point srsName="EPSG:4326">
<gml:coordinates>9.682230,7.653260</gml:coordinates>
</gml:Point>
</ms:msGeometry>
<ms:id>16</ms:id>
</ms:myWFS>
</gml:featureMember>
- <gml:featureMember>
- <ms:myWFS>
- <gml:boundedBy>
- <gml:Box srsName="EPSG:4326">
<gml:coordinates>9.768800,7.835870 9.768800,7.835870</gml:coordinates>
</gml:Box>
</gml:boundedBy>
- <ms:msGeometry>
- <gml:Point srsName="EPSG:4326">
<gml:coordinates>9.768800,7.835870</gml:coordinates>
</gml:Point>
</ms:msGeometry>
<ms:id>17</ms:id>
</ms:myWFS>
</gml:featureMember>
- <gml:featureMember>
- <ms:myWFS>
- <gml:boundedBy>
- <gml:Box srsName="EPSG:4326">
<gml:coordinates>9.296530,7.426330 9.296530,7.426330</gml:coordinates>
</gml:Box>
</gml:boundedBy>
- <ms:msGeometry>
- <gml:Point srsName="EPSG:4326">
<gml:coordinates>9.296530,7.426330</gml:coordinates>
</gml:Point>
</ms:msGeometry>
<ms:id>18</ms:id>
</ms:myWFS>
</gml:featureMember>
- <gml:featureMember>
- <ms:myWFS>
- <gml:boundedBy>
- <gml:Box srsName="EPSG:4326">
<gml:coordinates>9.111500,7.645390 9.111500,7.645390</gml:coordinates>
</gml:Box>
</gml:boundedBy>
- <ms:msGeometry>
- <gml:Point srsName="EPSG:4326">
<gml:coordinates>9.111500,7.645390</gml:coordinates>
</gml:Point>
</ms:msGeometry>
<ms:id>20</ms:id>
</ms:myWFS>
</gml:featureMember>
</wfs:FeatureCollection>
I will be very thankful for every idea where the mistake could!
Please excuse my bad english!
Best Regards
Christian
--
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
--
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
--
Mobile Internet - E-Mail und Internet immer und überall!
GMX zum Mitnehmen: http://www.gmx.net/de/go/pocketweb
More information about the MapServer-users
mailing list