Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WFS GetFeature request with filter very very long #5291

Closed
GisModule opened this issue Jun 6, 2016 · 4 comments
Closed

WFS GetFeature request with filter very very long #5291

GisModule opened this issue Jun 6, 2016 · 4 comments
Milestone

Comments

@GisModule
Copy link

Hi,

version: release-1800-x64-gdal-2-1-0-mapserver-7-0-1 for windows from www.gisinternals.com

I notice an issue in the version 7.0.1 when using a BBOX filter in a POST GetFeature request. The datasource is a TileIndex shapefile.

To get a result with only one feature, it takes around 40s. The same request with the version 6.4 takes around 40ms. The same request with a BBOX parameter instead of a BBOX filter with the version 7.0.1 is very faster too.

I tried to trace some actions with ProcMonitor (SysInternal), and I saw that in the version 7.0.1 with a filter, all shape files are opened. It is not the case with the version 6.4.

I didn't found another ticket for my case, but I saw that some performance issues will be fixed in the release 7.0.2. Maybe there are linked?

Thanks

@rouault
Copy link
Contributor

rouault commented Jun 6, 2016

Could you post somewhere a mapfile, the associated data and the request you try ?

@GisModule
Copy link
Author

GisModule commented Jun 6, 2016

Hello. Thanks for your answer.

The mapfile is attached below.

For the data, it is heavy (900Mo). Do you need all files? Is there a way to give it to you. I'm new on GitHub, I don't know all the tricks...

Here is the request sent. Don't be surprised, normally it shoul be a DWITHIN filter, not a BBOX request, but in the version 6.4 I had problem with DWITHIN.

Request URL:http://mapserver.integration.farmsat.local/ms7
Request Method:POST
Status Code:200 OK
Remote Address:172.31.1.84:80

Response Headers
Access-Control-Allow-Headers:Origin, X-Requested-With, Content-Type, Accept
Access-Control-Allow-Origin:*
Content-Length:2226
Content-Type:text/xml; subtype=gml/3.1.1; charset=UTF-8
Date:Mon, 06 Jun 2016 09:29:23 GMT
Server:Microsoft-IIS/8.5
X-Powered-By:ASP.NET

Request Headers
Accept:/
Accept-Encoding:gzip, deflate
Accept-Language:fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4
Connection:keep-alive
Content-Length:633
Content-Type:application/xml
Host:mapserver.integration.farmsat.local
Origin:http://gismodule.com
Referer:http://gismodule.com/GisModule.v3.Documentation.working/Pages/examples/WmsLayer/WmsLayer.aspx?debug=true
User-Agent:Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36

Request Payload
<GetFeature xmlns="http://www.opengis.net/wfs" service="WFS" version="1.1.0" outputFormat="GML3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"><Query typeName="ms:CLUs" srsName="EPSG:900913" xmlns:ms="http://mapserver.gis.umn.edu/mapserver"><Filter xmlns="http://www.opengis.net/ogc"><BBOX><PropertyName>msGeometry</PropertyName><Envelope xmlns="http://www.opengis.net/gml" srsName="EPSG:900913"><lowerCorner>-11133508 5084906</lowerCorner><upperCorner>-11133507 5084907</upperCorner></Envelope></BBOX></Filter></Query></GetFeature>

mapfile.txt

rouault added a commit to rouault/mapserver that referenced this issue Jun 22, 2016
…apServer#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().
rouault added a commit to rouault/mapserver that referenced this issue Jun 22, 2016
…apServer#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().
@rouault rouault added this to the 7.0.2 Release milestone Jun 22, 2016
@rouault
Copy link
Contributor

rouault commented Jun 22, 2016

Fixed in master and branch-7-0

@rouault rouault closed this as completed Jun 22, 2016
@GisModule
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants