[Mapserver-users] WFS / PostGIS Problem
Perry Casson
perry.casson at waypointinfo.com
Thu Jul 15 20:57:00 PDT 2004
We have some line objects stored in a postgres database and are finding
the WFS returned XML is not what we are expecting to see.
Problem #1 is the returned data only contains only the start point
coordinate pair and not the end point coordinates of the LineString.
Problem #2 is the bounding box returned is the coordinate system of the
native postgis layer but the actual LineString coordinates returned are
in the projection of the map. I would expect everything to be in map
coordinates or I'm I wrong here.
We are running Mapserver version 4.2.1 under both XP and Linux and both
return the same data.
Thanks,
Perry Casson
Here's a sample of the XML data returned that show the two issues.
<?xml version="1.0" encoding="ISO-8859-1" ?>
*-*
<http://localhost/cgi-bin/mapserv?map=c:/lamp/www/gmap/demo.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&typename=Track##>
<wfs:FeatureCollection xmlns="*http://www.ttt.org/myns*"
xmlns:myns="*http://www.ttt.org/myns*"
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
../wfs/1.0.0/WFS-basic.xsd http://www.ttt.org/myns
http://localhost/cgi-bin/mapserv42.exe?map=c:/lamp/www/gmap/demo.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=Track*">
*-*
<http://localhost/cgi-bin/mapserv?map=c:/lamp/www/gmap/demo.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&typename=Track##>
<gml:boundedBy>
*-*
<http://localhost/cgi-bin/mapserv?map=c:/lamp/www/gmap/demo.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&typename=Track##>
<gml:Box srsName="*EPSG:42304*">
* * <gml:coordinates>*-105.479360,50.433540
-104.278610,50.881740*</gml:coordinates>
* * </gml:Box>
* * </gml:boundedBy>
*-*
<http://localhost/cgi-bin/mapserv?map=c:/lamp/www/gmap/demo.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&typename=Track##>
<gml:featureMember>
*-*
<http://localhost/cgi-bin/mapserv?map=c:/lamp/www/gmap/demo.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&typename=Track##>
<TRACK>
*-*
<http://localhost/cgi-bin/mapserv?map=c:/lamp/www/gmap/demo.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&typename=Track##>
<gml:boundedBy>
*-*
<http://localhost/cgi-bin/mapserv?map=c:/lamp/www/gmap/demo.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&typename=Track##>
<gml:Box srsName="*EPSG:42304*">
* * <gml:coordinates>*-104.653650,50.437610
-104.653240,50.437770*</gml:coordinates>
* * </gml:Box>
* * </gml:boundedBy>
*-*
<http://localhost/cgi-bin/mapserv?map=c:/lamp/www/gmap/demo.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&typename=Track##>
<gml:lineStringProperty>
*-*
<http://localhost/cgi-bin/mapserv?map=c:/lamp/www/gmap/demo.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&typename=Track##>
<gml:LineString srsName="*EPSG:42304*">
* * <gml:coordinates>*-679528.077035,211127.832393*</gml:coordinates>
* * </gml:LineString>
* * </gml:lineStringProperty>
* * <id>*28901*</id>
* * <esn>*0402026*</esn>
* * <identifier>*Perry-1*</identifier>
* * <gpstime>*2004-04-29 15:50:00*</gpstime>
* * <vehicletype>*HCP*</vehicletype>
* * </TRACK>
* * </gml:featureMember>
*-*
<http://localhost/cgi-bin/mapserv?map=c:/lamp/www/gmap/demo.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&typename=Track##>
<gml:featureMember>
*-*
<http://localhost/cgi-bin/mapserv?map=c:/lamp/www/gmap/demo.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&typename=Track##>
<TRACK>
*-*
<http://localhost/cgi-bin/mapserv?map=c:/lamp/www/gmap/demo.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&typename=Track##>
<gml:boundedBy>
*-*
<http://localhost/cgi-bin/mapserv?map=c:/lamp/www/gmap/demo.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&typename=Track##>
<gml:Box srsName="*EPSG:42304*">
* * <gml:coordinates>*-104.909750,50.437770
-104.653650,50.442720*</gml:coordinates>
* * </gml:Box>
* * </gml:boundedBy>
*-*
<http://localhost/cgi-bin/mapserv?map=c:/lamp/www/gmap/demo.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&typename=Track##>
<gml:lineStringProperty>
*-*
<http://localhost/cgi-bin/mapserv?map=c:/lamp/www/gmap/demo.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&typename=Track##>
<gml:LineString srsName="*EPSG:42304*">
* * <gml:coordinates>*-679554.039981,211149.712427*</gml:coordinates>
* * </gml:LineString>
* * </gml:lineStringProperty>
* * <id>*28904*</id>
* * <esn>*0402026*</esn>
* * <identifier>*Perry-1*</identifier>
* * <gpstime>*2004-04-29 16:06:00*</gpstime>
* * <vehicletype>*WATERBOMBERS*</vehicletype>
* * </TRACK>
* * </gml:featureMember>
*-*
<http://localhost/cgi-bin/mapserv?map=c:/lamp/www/gmap/demo.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&typename=Track##>
<gml:featureMember>
More information about the MapServer-users
mailing list