<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Thank you. EXTENT was the missing setting<br>
</p>
<br>
<div class="moz-cite-prefix">Am 02.02.2017 um 13:45 schrieb Seth G:<br>
</div>
<blockquote
cite="mid:5ba3eb39-dd32-8932-6cb2-2cbb08f4a198@fastmail.com"
type="cite">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<p>Hi Daniel,</p>
<p>Does setting the EXTENT for your map or layer make any
difference?</p>
Also try adding the projections you want to use to the MAP
METADATA section. <br>
<p> "wfs_srs" "EPSG:32632 EPSG:4326"<br>
</p>
<p>Regards,</p>
<p>Seth<br>
</p>
<br>
<div class="moz-cite-prefix">On 02/02/2017 10:19, Daniel Hardes
wrote:<br>
</div>
<blockquote
cite="mid:ec9539da-53bc-6bf1-6b89-5eb8b8cb7b9b@3dis.de"
type="cite">
<meta content="text/html; charset=utf-8"
http-equiv="Content-Type">
<p>Same query without srsName. I tried it with WFS 1.0.0, 1.1.0,
2.0.0 and no results.<br>
</p>
<br>
<div class="moz-cite-prefix">Am 02.02.2017 um 09:33 schrieb
Rahkonen Jukka (MML):<br>
</div>
<blockquote
cite="mid:077dd9de2326420bb83c77b9fbee9115@C119S212VM022.msvyvi.vaha.local"
type="cite">
<pre wrap="">What happens if you remove srsName from the filter? It can be hard to know how to reproject from EPSG:32632 into unknown. WFS 1.0.0 is anyway tied to the default srs. I would also consider saving data into PostGIS with proper SRID.
-Jukka Rahkonen-
----- Alkuperäinen viesti -----
Lähettäjä: "Daniel Hardes" <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:hardes@3dis.de"><hardes@3dis.de></a>
Lähetetty: 2.2.2017 10:22
Vastaanottaja: <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:mapserver-users@lists.osgeo.org">"mapserver-users@lists.osgeo.org"</a> <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:mapserver-users@lists.osgeo.org"><mapserver-users@lists.osgeo.org></a>
Aihe: [mapserver-users] Error with Filter = no results
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:
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="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:%5CUsers%5Cd.hardes%5CDocuments%5Cmap.map&Filter=">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=</a><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=<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="http://mapserver.gis.umn.edu/mapserver">"http://mapserver.gis.umn.edu/mapserver"</a>
xmlns:wfs=<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="http://www.opengis.net/wfs">"http://www.opengis.net/wfs"</a>
xmlns:gml=<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="http://www.opengis.net/gml">"http://www.opengis.net/gml"</a>
xmlns:ogc=<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="http://www.opengis.net/ogc">"http://www.opengis.net/ogc"</a>
xmlns:xsi=<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema-instance">"http://www.w3.org/2001/XMLSchema-instance"</a>
xsi:schemaLocation=<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="http://www.opengis.net/wfshttp://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsdhttp://mapserver.gis.umn.edu/mapserverhttp://localhost:8081/cgi-bin/mapserv.exe?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=poly&OUTPUTFORMAT=XMLSCHEMA">"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"</a>>
<gml:boundedBy>
<gml:null>missing</gml:null>
</gml:boundedBy>
</wfs:FeatureCollection>
where is the Error in my settings?
</pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<table style="table-layout:fixed" border="0" cellpadding="0"
width="450">
<tbody>
<tr>
<td class="logo-td" align="left" valign="middle"
width="136">
<p style="margin-right: 10px; font-family: Helvetica,
Arial, sans-serif; font-size: 10px; line-height:
12px; margin-bottom: 10px;"> <a
moz-do-not-send="true"
style="text-decoration:none"
href="http://www.3dis.de" class="clink
logo-container"> <img
src="cid:part11.A66837CD.F3D1A760@3dis.de"
alt="3DIS GmbH" class="sig-logo" border="0"> </a>
</p>
</td>
<td class="content-td" align="left" nowrap="nowrap"
width="NaN">
<p style="font-family: Helvetica, Arial, sans-serif;
font-size: 10px; line-height: 12px; color: rgb(33,
33, 33); margin-bottom: 10px;"><span
style="font-weight: bold; color: rgb(33, 33, 33);
display: inline;" class="txt signature_name-target
sig-hide">Daniel Hardes</span> <span
class="email-sep break" style="display: inline;"><br>
</span> Mail: <a moz-do-not-send="true" class="link
email signature_email-target sig-hide"
href="mailto:kalkofen@3dis.de" style="color:
rgb(71, 124, 204); text-decoration: none; display:
inline;">hardes@3dis.de</a><span
class="signature_email-sep sep" style="display:
inline;"> | </span><span style="color: rgb(33,
33, 33); display: inline;" class="txt
signature_mobilephone-target sig-hide">Tel.: +49
(0)2861 8919 84</span></p>
<p style="font-family: Helvetica, Arial, sans-serif;
font-size: 10px; line-height: 12px; margin-bottom:
10px;"> <span style="font-weight: bold; color:
rgb(33, 33, 33); display: inline;" class="txt
signature_companyname-target sig-hide">3DIS GmbH</span>
<span class="company-sep break" style="display:
inline;"><br>
</span> <span class="address-sep break"></span> <span
style="color: rgb(33, 33, 33); display: inline;"
class="txt signature_address-target sig-hide">Konrad-Zuse-Straße
6</span> <span class="address2-sep break"
style="display: block;"></span> <span
style="color: rgb(33, 33, 33); display: inline;"
class="txt signature_address2-target sig-hide">D -
46397 Bocholt</span> <span class="website-sep
break" style="display: inline;"><br>
</span> <a moz-do-not-send="true" class="link
signature_website-target sig-hide"
href="http://www.3dis.de" style="color: rgb(71,
124, 204); text-decoration: none; display:
inline;">www.3dis.de</a> </p>
</td>
</tr>
<tr>
<td colspan="2">
<p style="font-family: Helvetica, Arial, sans-serif;
color: #212121; font-size: 9px; line-height: 12px;"
class="txt signature_disclaimer-target">3DIS GmbH |
Geschäftsführung: Gerrit Hoven, Andreas Steffens |
Amtsgericht Coesfeld | HRB 12986</p>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
mapserver-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a></pre>
</blockquote>
<br>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<table style="table-layout:fixed" border="0" cellpadding="0"
width="450">
<tbody>
<tr>
<td class="logo-td" align="left" valign="middle" width="136">
<p style="margin-right: 10px; font-family: Helvetica,
Arial, sans-serif; font-size: 10px; line-height: 12px;
margin-bottom: 10px;"> <a style="text-decoration:none"
href="http://www.3dis.de" class="clink logo-container">
<img src="cid:part17.BCE749FB.0EE9D3D3@3dis.de"
alt="3DIS GmbH" class="sig-logo" border="0"> </a> </p>
</td>
<td class="content-td" align="left" nowrap="nowrap"
width="NaN">
<p style="font-family: Helvetica, Arial, sans-serif;
font-size: 10px; line-height: 12px; color: rgb(33, 33,
33); margin-bottom: 10px;"><span style="font-weight:
bold; color: rgb(33, 33, 33); display: inline;"
class="txt signature_name-target sig-hide">Daniel
Hardes</span> <span class="email-sep break"
style="display: inline;"><br>
</span> Mail: <a class="link email
signature_email-target sig-hide"
href="mailto:kalkofen@3dis.de" style="color: rgb(71,
124, 204); text-decoration: none; display: inline;">hardes@3dis.de</a><span
class="signature_email-sep sep" style="display:
inline;"> | </span><span style="color: rgb(33, 33,
33); display: inline;" class="txt
signature_mobilephone-target sig-hide">Tel.: +49
(0)2861 8919 84</span></p>
<p style="font-family: Helvetica, Arial, sans-serif;
font-size: 10px; line-height: 12px; margin-bottom:
10px;"> <span style="font-weight: bold; color: rgb(33,
33, 33); display: inline;" class="txt
signature_companyname-target sig-hide">3DIS GmbH</span>
<span class="company-sep break" style="display: inline;"><br>
</span> <span class="address-sep break"></span> <span
style="color: rgb(33, 33, 33); display: inline;"
class="txt signature_address-target sig-hide">Konrad-Zuse-Straße
6</span> <span class="address2-sep break"
style="display: block;"></span> <span style="color:
rgb(33, 33, 33); display: inline;" class="txt
signature_address2-target sig-hide">D - 46397 Bocholt</span>
<span class="website-sep break" style="display: inline;"><br>
</span> <a class="link signature_website-target
sig-hide" href="http://www.3dis.de" style="color:
rgb(71, 124, 204); text-decoration: none; display:
inline;">www.3dis.de</a> </p>
</td>
</tr>
<tr>
<td colspan="2">
<p style="font-family: Helvetica, Arial, sans-serif;
color: #212121; font-size: 9px; line-height: 12px;"
class="txt signature_disclaimer-target">3DIS GmbH |
Geschäftsführung: Gerrit Hoven, Andreas Steffens |
Amtsgericht Coesfeld | HRB 12986</p>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>