[mapserver-users] SQL Server 2008 and WFS Service
geographika
geographika at gmail.com
Fri Jul 23 15:49:01 PDT 2010
Hi,
Has anyone successfully created a WFS service using the SQL Server 2008
plug in?
I followed the steps at http://mapserver.org/ogc/wfs_server.html, and
get no errors when running a
SERVICE=WFS&VERSION=1.0.0&REQUEST=getcapabilities request.
However when trying to retrieve the features using a feature request
(&SERVICE=WFS&VERSION=1.0.0&REQUEST=getfeature&TYPENAME=RoadsWFS) I
don't get any GML. There are no errors in the MapServer log file. I
don't believe this GET request requires a proxy and I get the same
result on the server itself.
I ran SQL Server profiler and the results and geometry are being
correctly queried from the database. A shortened version of the SQL is
below (several attributes removed):
SELECT convert(varchar(max),
RoadID),GEOM.STAsBinary(),convert(varchar(20), ROADID) from RoadNetwork2
WHERE GEOM.STIntersects(Geometry::STGeomFromText('POLYGON((-710069
7038976,-683731 7038976,-683731 7059350,-710069 7059350,-710069
7038976))',3785)) = 1
I think there may be an issue due to none of the columns having names.
In addition setting the following metadata items for the layer have no
effect on the SQL that is run (setting field aliases and limiting fields)
"gml_include_items" "RoadID"
"gml_geometries" "GEOM"
"gml_RoadID_alias" "OID"
In all cases I only get the following output in the browser:
<wfs:FeatureCollection xsi:schemaLocation="...
<gml:boundedBy>
<gml:Box srsName="EPSG:3785">
<gml:coordinates>
-710069.511630,7038976.757978 -683731.912138,7059350.746437
</gml:coordinates>
</gml:Box>
</gml:boundedBy>
</wfs:FeatureCollection>
Thanks for any advice,
Seth Girvin
http://geographika.co.uk
More information about the MapServer-users
mailing list