-
-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Filter] Fix slow filter BBOX evaluation with tileindex of shapefile (#…
…5291) On a layer that is a tileindex of shapefiles, a BBOX as WFS XML filter used the slow path of common expression evaluation, which caused all shapefiles to be opened, instead of just the ones intersecting the BBOX. This commit tries to fetch a "top BBOX" filter and use it as the rect passed to msLayerWhichShapes().
- Loading branch information
Showing
15 changed files
with
229 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
33 changes: 33 additions & 0 deletions
33
msautotest/wxs/expected/wfs_shp_tileindex_of_shp_bbox_filter.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Content-Type: text/xml; subtype="gml/3.2.1"; charset=UTF-8 | ||
|
||
<?xml version='1.0' encoding="UTF-8" ?> | ||
<wfs:FeatureCollection | ||
xmlns:ms="http://mapserver.gis.umn.edu/mapserver" | ||
xmlns:gml="http://www.opengis.net/gml/3.2" | ||
xmlns:wfs="http://www.opengis.net/wfs/2.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver http://localhost/path/to/wfs_simple?SERVICE=WFS&VERSION=2.0.0&REQUEST=DescribeFeatureType&TYPENAME=ms:test&OUTPUTFORMAT=application%2Fgml%2Bxml%3B%20version%3D3.2 http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd" | ||
timeStamp="" numberMatched="1" numberReturned="1"> | ||
<wfs:boundedBy> | ||
<gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326"> | ||
<gml:lowerCorner>49.00000 2.00000</gml:lowerCorner> | ||
<gml:upperCorner>49.00000 2.00000</gml:upperCorner> | ||
</gml:Envelope> | ||
</wfs:boundedBy> | ||
<wfs:member> | ||
<ms:test gml:id="test.1"> | ||
<gml:boundedBy> | ||
<gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326"> | ||
<gml:lowerCorner>49.00000 2.00000</gml:lowerCorner> | ||
<gml:upperCorner>49.00000 2.00000</gml:upperCorner> | ||
</gml:Envelope> | ||
</gml:boundedBy> | ||
<ms:msGeometry> | ||
<gml:Point gml:id="test.1.1" srsName="urn:ogc:def:crs:EPSG::4326"> | ||
<gml:pos>49.00000 2.00000</gml:pos> | ||
</gml:Point> | ||
</ms:msGeometry> | ||
</ms:test> | ||
</wfs:member> | ||
</wfs:FeatureCollection> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# | ||
# Test WFS : shapefile tileindex of shapefiles (#5291) | ||
# | ||
# REQUIRES: INPUT=OGR SUPPORTS=WFS | ||
# | ||
# In the logs, point_3_50.shp shouldn't appear | ||
# RUN_PARMS: wfs_shp_tileindex_of_shp_bbox_filter.xml [MAPSERV] QUERY_STRING="map=[MAPFILE]&REQUEST=GetFeature&SERVICE=WFS&TYPENAMES=ms:test&VERSION=2.0.0&FILTER=<Filter><BBOX><Envelope srsName='urn:ogc:def:crs:EPSG::4326'><lowerCorner>48.9 1.9</lowerCorner><upperCorner>49.1 2.1</upperCorner></Envelope></BBOX></Filter>" > [RESULT_DEVERSION] | ||
|
||
MAP | ||
|
||
NAME WFS_TEST | ||
STATUS ON | ||
SIZE 400 300 | ||
EXTENT 1 48 4 51 | ||
IMAGECOLOR 255 255 255 | ||
SHAPEPATH "data" | ||
|
||
# | ||
# Start of web interface definition | ||
# | ||
WEB | ||
|
||
IMAGEPATH "/tmp/ms_tmp/" | ||
IMAGEURL "/ms_tmp/" | ||
|
||
METADATA | ||
"ows_updatesequence" "123" | ||
"wfs_title" "Test simple wfs" | ||
"wfs_onlineresource" "http://localhost/path/to/wfs_simple?" | ||
"wfs_srs" "EPSG:4326" | ||
"ows_abstract" "Test WFS Abstract" | ||
"ows_keywordlist" "ogc,wfs,gml,om" | ||
"ows_service_onlineresource" "http://localhost" | ||
"ows_fees" "none" | ||
"ows_accessconstraints" "none" | ||
"ows_addresstype" "postal" | ||
"ows_address" "123 SomeRoad Road" | ||
"ows_city" "Toronto" | ||
"ows_stateorprovince" "Ontario" | ||
"ows_postcode" "xxx-xxx" | ||
"ows_country" "Canada" | ||
"ows_contactelectronicmailaddress" "tomkralidis@xxxxxxx.xxx" | ||
"ows_contactvoicetelephone" "+xx-xxx-xxx-xxxx" | ||
"ows_contactfacsimiletelephone" "+xx-xxx-xxx-xxxx" | ||
"ows_contactperson" "Tom Kralidis" | ||
"ows_contactorganization" "MapServer" | ||
"ows_contactposition" "self" | ||
"ows_hoursofservice" "0800h - 1600h EST" | ||
"ows_contactinstructions" "during hours of service" | ||
"ows_role" "staff" | ||
"ows_enable_request" "*" | ||
END | ||
END | ||
|
||
PROJECTION | ||
"init=epsg:4326" | ||
END | ||
|
||
|
||
# | ||
# Start of layer definitions | ||
# | ||
|
||
|
||
LAYER | ||
NAME test | ||
CONNECTIONTYPE OGR | ||
TILEINDEX "shp_tileindex_of_shp.shp" | ||
TILEITEM "LOCATION" | ||
METADATA | ||
"wfs_title" "test" | ||
"wfs_description" "test" | ||
"wfs_featureid" "id" | ||
END | ||
TYPE POINT | ||
STATUS ON | ||
EXTENT 1 48 4 51 | ||
PROJECTION | ||
"init=epsg:4326" | ||
END | ||
|
||
DUMP TRUE | ||
END # Layer | ||
|
||
|
||
END # Map File |