[mapserver-users] Using Mapserver as standalone WFS - GetFeature fails
Lars I. Nielsen
lin at hvenegaard.dk
Fri Nov 8 05:44:38 PST 2013
Hi again,
I'm trying to access a handful of tables in an MS/SQL 2008 database, using a Mapserver as a standalone WFS server.
I'm attempting to use the OGR method, as the mssql2008 plugin fails to load for some reason.
I managed to get it to respond to GetCapabilities and DescribeTypeName request, but GetFeature requests fails completely.
My request is as follows:
http://localhost/mswfs/mapserv.exe?map=WFS.map&service=WFS&version=1.0.0&request=getfeature&typename=GO_Punkter&maxfeatures=10&bbox=711500,6183000,712500,6184000
The layer metadata is as follows:
METADATA
"ows_title" "GO_Punkter"
"ows_srs" "EPSG:25832"
"wfs_include_items" "all"
"gml_featureid" "MI_PRINX"
"wfs_enable_request" "*"
"gml_types" "auto"
"ows_extent" "700000 6170000 720000 6190000"
END
My layer is defined as follows:
TYPE POINT
STATUS ON
CONNECTIONTYPE OGR
CONNECTION "MSSQL:Server=xxxxxxxxxxxxxxxxxxxxx,1433;Database=xxxxxxxxxxxxxxxxxxxxxx;UID=xxxxxxxxx;PWD=xxxxxxx;Trusted_Connection=No;Tables=D00001_POINTS(feature);"
The error I get in the Mapserver error log is as follows:
CGI Request 1 on process 6252
msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `GO_Punkter'. File not found or unsupported format.
msWFSGetFeature(): WFS server error. ms_error->code not found
mapserv request processing time (msLoadMap not incl.): 0.018s
msFreeMap(): freeing map at 01628CF8.
I read that I could debug the connection using "ogrinfo.exe -al", but that works perfectly, and returns all features:
C:\Mapserver.640>ogrinfo -al "MSSQL:Server=xxxxxxxxxxxxxxxxxxxxx,1433;Database=xxxxxxxxxxxxxxxxxxxxxx;UID=xxxxxxxxx;PWD=xxxxxxx;Trusted_Connection=No;Tables=D00001_POINTS(feature);"
INFO: Open of `MSSQL:Server=xxxxxxxxxxxxxxxxxxxxx,1433;Database=xxxxxxxxxxxxxxxxxxxxxx;UID=xxxxxxxxx;PWD=xxxxxxx;Trusted_Connection=No;Tables=D00001_POINTS(feature);'
using driver `MSSQLSpatial' successful.
Layer name: D00001_POINTS
Geometry: Unknown (any)
Feature Count: 33541
Extent: (705463.862800, 6177660.915000) - (715176.650800, 6184543.444000)
Layer SRS WKT:
PROJCS["ETRS89 / UTM zone 32N",
GEOGCS["ETRS89",
DATUM["European_Terrestrial_Reference_System_1989",
SPHEROID["GRS 1980",6378137,298.257222101,
AUTHORITY["EPSG","7019"]],
TOWGS84[0,0,0,0,0,0,0],
AUTHORITY["EPSG","6258"]],
PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]],
UNIT["degree",0.0174532925199433,
AUTHORITY["EPSG","9122"]],
AUTHORITY["EPSG","4258"]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",0],
PARAMETER["central_meridian",9],
PARAMETER["scale_factor",0.9996],
PARAMETER["false_easting",500000],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AXIS["Easting",EAST],
AXIS["Northing",NORTH],
AUTHORITY["EPSG","25832"]]
FID Column = MI_PRINX
Geometry Column = feature
valid_from: DateTime (23.0)
valid_to: DateTime (23.0)
sectioncode: String (50.0)
element_code: String (10.0)
element_subcode: String (50.0)
carename: String (50.0)
mi_style: String (250.0)
symbology: String (8000.0)
labeltext: String (250.0)
OGRFeature(D00001_POINTS):1
valid_from (DateTime) = (null)
valid_to (DateTime) = (null)
sectioncode (String) = 03-001-001-009
element_code (String) = 7e
element_subcode (String) = Legeudstyr
carename (String) = (null)
mi_style (String) = Symbol (36,12615935,8,"Map Symbols",0,0)
symbology (String) = (null)
labeltext (String) = (null)
etc. etc.
Can anyone point me towards a solution for this issue ?
Am I missing something obvious here ?
Kind regards / Med venlig hilsen
Lars I. Nielsen
----------------------------------------------------------------
Landinspektør, Senior GIS Programmør og Konsulent
Hvenegaard og Jens Bo Landinspektører A/S
Rugaardsvej 55, DK-5000 Odense C
Denmark
Tel. +45 6313 5050
http://www.hvenegaard.dk<http://www.hvenegaard.dk/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20131108/9c9fdd2e/attachment.htm>
More information about the MapServer-users
mailing list