[mapserver-users] Error with WFS request from MapInfo
Jelmer Baas
baas at speerit.nl
Fri Aug 19 01:25:43 PDT 2011
Hello list,
I've been struggling with this issue for a while, now. When I try to add a WFS layer in MapInfo, I receive the following error (from the mapserver logfile):
prepare_database(): Query error. Error declaring cursor: ERROR: BOX3D parser - couldnt parse. It should look like: BOX3D(xmin ymin zmin,xmax ymax zmax) or BOX3D(xmin ymin,xmax ymax)
LINE 1: ...:text from pandactueel WHERE geometrie && setSRID('BOX3D(-1....
^
With query string: DECLARE mycursor BINARY CURSOR FOR SELECT asbinary(force_collection(force_2d(geo)),'NDR'),oid::text from mytable WHERE geo && setSRID('BOX3D(-1.#INF -1.#INF,1390604146415.56 -16080812.3872859)'::BOX3D, 28992 )
The layer itself works, via normal GetMap requests.
This is my mapfile:
MAP
NAME TEST
STATUS ON
UNITS meters
FONTSET "fontset.txt"
DEBUG 5
CONFIG "MS_ERRORFILE" "c:\temp\mapserver.log"
IMAGECOLOR 255 55 255
OUTPUTFORMAT
NAME aggpng24
DRIVER AGG/PNG
TRANSPARENT ON
IMAGEMODE RGBA
MIMETYPE "image/png"
EXTENSION "png"
END
WEB
METADATA
"wms_title" "TEST"
"wfs_title" "TEST"
"wms_srs" "epsg:4326 epsg:900913"
"wfs_srs" "epsg:4326 epsg:900913"
"wms_onlineresource" "***"
"wfs_onlineresource" "***"
END # METADATA
END #web
SYMBOLSET "symbols_mapinfo2.sym"
PROJECTION
"init=epsg:4326"
END
LAYER
TYPE POLYGON
STATUS ON
DUMP TRUE
CONNECTIONTYPE POSTGIS
CONNECTION "host=localhost dbname=TEST user=postgres password=*** port=5432"
DATA "geo from mytable using unique oid using srid=28992"
NAME mytest
CLASS
NAME " mytest "
STYLE
COLOR 0 0 250
OUTLINECOLOR 0 250 0
END
END
PROJECTION
"init=epsg:28992"
END
MINSCALE 1
MAXSCALE 80000000
METADATA
"wms_title" " mytest "
"wms_srs" "epsg:4326 epsg:900913"
"wfs_title" " mytest "
"wfs_srs" "epsg:4326 epsg:900913"
"gml_featureid" "oid"
"gml_include_items" "all"
END # METADATA
END
END # Map File
MapInfo sends its requests as post (I'd prefer get...) and after using a packet sniffer I found out it sends this:
<?xml version="1.0" encoding="utf-8"?>
<GetFeature version="1.0.0" service="WFS" outputFormat="GML2" xmlns:ms="http://mapserver.gis.umn.edu/mapserver" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns="http://www.opengis.net/wfs" xsi:schemaLocation="http://www.opengis.net/wfs ../wfs/1.0.0/WFS-basic.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Query typeName=" mytest"/></GetFeature>
I use MapServer version 5.4.2, by the way.
Can anyone tell me what I'm missing? Should I add extends in the MapFile or something? And where do those weird numbers come from?
Regards,
Jelmer Baas
Speer IT B.V.
More information about the MapServer-users
mailing list