Opened 17 years ago
Last modified 15 years ago
#2308 reopened enhancement
WFS spatial filter "equals" with a BBOX in lat/long returned null
Reported by: | nsavard | Owned by: | assefa |
---|---|---|---|
Priority: | normal | Milestone: | 6.0 release |
Component: | WFS Server | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
When I issue a GetFeature? request with an "equals" spatial filter and a bbox in lat/long the server returns null. I tested with 5.0-rc2 on Linux. There are two tests with "equals" filter.
The feature returned which is bounded by a polygon should be "Quebec, Iles de la Madeleine (AREA: 4833029.500)" and the one located at a specific coordinate should be Cheticamp. See msautotest (wfs_filter_equals_poly.xml and wfs_filter_equals.xml). The two requests are respectively:
QUERY_STRING="map=[MAPFILE]&SERVICE=WFS&VERSION=1.0.0& REQUEST=GetFeature&TYPENAME=province&FILTER=<Filter><Equals> <PropertyName>Geometry</PropertyName><gml:Polygon> <gml:outerBoundaryIs><gml:LinearRing> <gml:coordinates>-61.748897101358892 47.258393824294707,-61.75096395282408 47.275550067023246,-61.730321527607451 47.282116089229753,-61.719829698475976 47.269592918433993,-61.732190995311512 47.25507337571689,-61.748897101358892 47.258393824294707</gml:coordinates></gml:LinearRing> </gml:outerBoundaryIs></gml:Polygon></Equals></Filter>"
and:
QUERY_STRING="map=[MAPFILE]&SERVICE=WFS&VERSION=1.0.0& REQUEST=GetFeature&TYPENAME=popplace&FILTER=<Filter><Equals> <PropertyName>Geometry</PropertyName><gml:Point> <gml:coordinates>-60.214963466386187,46.123322047124134 </gml:coordinates></gml:Point></Equals></Filter>"
Change History (12)
comment:1 by , 17 years ago
Component: | MapServer C Library → WFS Server |
---|---|
Owner: | changed from | to
comment:2 by , 16 years ago
Milestone: | → 5.2 release |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:4 by , 16 years ago
updated files in msautotest in r7709. Works locally on windows.
Norm if you got a minute, can you run the msautotest
comment:6 by , 16 years ago
Assefa: This is fixed. I used OpenEv to translate to 4326. Did you use ogr2ogr?
comment:7 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Thx Norm. Closing
I used directly mapserver proj functions:
$projOutObj = ms_newprojectionobj("init=epsg:4326"); $projInObj = ms_newprojectionobj("init=epsg:42304"); $poPoint = ms_newpointobj(); $poPoint->setXY(2503805.5,427872.65625); $poPoint->project($projInObj, $projOutObj);
echo "x,y" . $poPoint->x . ", " . $poPoint->y;
comment:8 by , 16 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Sorry for that but I missed the first request. When the first request is sent no result is returned. I tried to reproject the coordinates but didn't succeed with ogr2ogr (ogr2ogr -f "ESRI Shapefile" -t_srs EPSG:4326 -s_src EPSG:4269 province_4326.shp province.shp).
So I tried with a modified version of your previous code (comment:7). The coordinates of the existing shape is:
x,y-61.7488971014, 47.2583938243x,y-61.7509639528, 47.275550067x,y-61.7303215276, 47.2821160892x,y-61.7198296985, 47.2695929184x,y-61.7321909953, 47.2550733757x,y-61.7488971014, 47.2583938243
and the coordinates of the spatial filter is: -61.748897101358850,47.258393824294672 -61.75096\ 3952824037,47.275550067023204 -61.730321527607408,47.282116089229731 -61.719829\ 698475941,47.269592918433965 -61.732190995311470,47.255073375716847 -61.7488971\ 01358850,47.258393824294672
It doesn't work because of the precision number.
comment:9 by , 16 years ago
mmm not sure what I should do for this. I think the equals operation works but it needs to be an exact match. I think to get an exact match, we should avoid any reprojection; so we need to have a projection at the map level that is the same as the layer level and we can then use the exact coordinates that come from the data. Can we set this to 5.4 since I think It is more of a test problem than a mapserver problem ?
comment:11 by , 16 years ago
Milestone: | 5.2 release → 5.4 release |
---|
We will add a new map file for operations that need an exact match (such as equals) and use the same projection in the map and layers.
Setting this work for 5.4.
comment:12 by , 15 years ago
Milestone: | 5.6 release → 6.0 release |
---|---|
Type: | defect → enhancement |
This is for msautotest.
looking into this
Using the latest values, my msautotest passed for the query. I tried to see if I was using a different projection definition but I think I am using the same as defined in the msautotest. Norm, do you see any problem if I change wfs_filter.map to reflect the values I have?