Hello,
i have a question with the Filter parameter.
without a filter, mapserver does a normal SQL query like:
select
"pkid","set","id","lod","type","source","referencepoint","boundingbox",encode(ST_AsBinary(ST_Force_2D("groundsurface"),'NDR'),'hex')
as geom,"id" from building where groundsurface &&
ST_GeomFromText('POLYGON((691642.41999 5334989.72599,691642.41999
5335172.82301,691979.17301 5335172.82301,691979.17301
5334989.72599,691642.41999 5334989.72599))',-1) limit 101
but if i add an BBox filter, i got a wrong polygon:
select
"pkid","set","id","lod","type","source","referencepoint","boundingbox",encode(ST_AsBinary(ST_Force_2D("groundsurface"),'NDR'),'hex')
as geom,"id" from building where groundsurface &&
ST_GeomFromText('POLYGON((-0.999888179649133
-0.999999999990785,-0.999888179649133
-0.999999999990785,-0.999888179649133
-0.999999999990785,-0.999888179649133
-0.999999999990785,-0.999888179649133 -0.999999999990785))',-1) and
(st_intersects(groundsurface,ST_GeomFromText('POLYGON
((691813.1405204038600000 5335101.3663145527000000,
691813.1405204038600000 5335921.3585226759000000,
692960.5523786536700000 5335921.3585226759000000,
692960.5523786536700000 5335101.3663145527000000,
691813.1405204038600000 5335101.3663145527000000))',-1)) = TRUE)
... The polygon:
'POLYGON((-0.999888179649133 -0.999999999990785,-0.999888179649133
-0.999999999990785,-0.999888179649133
-0.999999999990785,-0.999888179649133
-0.999999999990785,-0.999888179649133 -0.999999999990785))',-1
is wrong. A normal SQL query without these values, gets my desired result.
My map File:
--------------------------------------------------------------
MAP
NAME "sample"
SIZE 800 400
DEBUG 5
OUTPUTFORMAT
NAME "geojson"
DRIVER "OGR/GEOJSON"
MIMETYPE "application/json; subtype=geojson"
FORMATOPTION "STORAGE=stream"
FORMATOPTION "FORM=SIMPLE"
END
CONFIG MS_ERRORFILE "ms_error.log"
PROJECTION
"init=epsg:32632"
END
WEB
METADATA
ows_enable_request "*"
END
END
LAYER
DEBUG 5
NAME "poly"
STATUS DEFAULT
TYPE POLYGON
METADATA
"wfs_srs" "EPSG:32632"
"wms_transparent" "true"
"wfs_getfeature_formatlist" "geojson"
END
PROJECTION
'init=epsg:32632'
END
CONNECTIONTYPE postgis
CONNECTION "host=localhost port=5432 user=postgres password=xxxxx
dbname=map_daniel"
DATA "groundsurface from building using SRID=-1 using unique id"
CLASS
STYLE
COLOR "#88888888"
ANTIALIAS true
END
END
END
END
-------------------------------------------------------------
And the Request:
http://localhost:8081/cgi-bin/mapserv.exe?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRSNAME=EPSG:32632&TYPENAMES=poly&COUNT=100&outputformat1=geojson&map=C:\Users\d.hardes\Documents\map.map&Filter=<Filter><BBOX><PropertyName>poly</PropertyName><Box
srsName="EPSG:32632"> <coordinates>691813.1405204039,5335101.366314553
692960.5523786537,5335921.358522676</coordinates></Box></BBOX></Filter>
And result
<?xml version='1.0' encoding="UTF-8" ?>
<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.opengis.net/wfs/1.0.0/WFS-basic.xsd
http://mapserver.gis.umn.edu/mapserver
http://localhost:8081/cgi-bin/mapserv.exe?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=poly&OUTPUTFORMAT=XMLSCHEMA">
<gml:boundedBy>
<gml:null>missing</gml:null>
</gml:boundedBy>
</wfs:FeatureCollection>
where is the Error in my settings?
--
3DIS GmbH <http://www.3dis.de>
Daniel Hardes
Mail: [email protected] <mailto:[email protected]>| Tel.: +49 (0)2861 8919 84
3DIS GmbH
Konrad-Zuse-Straße 6 D - 46397 Bocholt
www.3dis.de <http://www.3dis.de>
3DIS GmbH | Geschäftsführung: Gerrit Hoven, Andreas Steffens |
Amtsgericht Coesfeld | HRB 12986
_______________________________________________
mapserver-users mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/mapserver-users