[mapserver-users] Mapserver 7.0.3 and disabling default extent for WFS

Rahkonen Jukka (MML) jukka.rahkonen at maanmittauslaitos.fi
Mon Dec 19 23:51:03 PST 2016


Hi,

No, GeoPackage is as fast as Spatialite. Actually I do not have exact numbers but the feeling is the same – they are both very fast.

The strange behavior that I had was obviously due to a combination of running Mapserver as fast-cgi and using PROCESSING "CLOSE_CONNECTION=DEFER" in the mapfile. Therefore even if turning “wfs_use_default_extent_for_getfeature” on or off did change the spatial filter in  msOGRFileWhichShapes (at least in the logs), it did not really change the SQL or the execution path or something like that.

I first noticed that my COUNT=1 query was served immediately in the morning after a few hours break, then I managed to make it slow again and learned that restarting Apache helps. Finally I was clever enough for testing what happens if I comment out PROCESSING "CLOSE_CONNECTION=DEFER”. It made my server to react immediately to changes in “wfs_use_default_extent_for_getfeature” value.

-Jukka Rahkonen-





Andrea Peri wrote:

Re: [mapserver-users] Mapserver 7.0.3 and disabling default extent for WFS

Hi jukka,
The time low differenze could be to the use of a geopackage SQLite Instead of a spatialite SQLite ?

A.

Il 19 dic 2016 23:34, "Rahkonen Jukka (MML)" <jukka.rahkonen at maanmittauslaitos.fi<mailto:jukka.rahkonen at maanmittauslaitos.fi>> ha scritto:

If I set "wfs_use_default_extent_for_getfeature" "yes"
I  see a difference
[Tue Dec 20 00:28:37 2016].113723 msOGRFileWhichShapes: Setting spatial filter to -1e+300 -1e+300 1e+300 1e+300
[Tue Dec 20 00:28:48 2016].950696 msOGRFileNextShape: Returning shape=9, tile=0

However, this change does not make is fast, notice 11 seconds between WhichShapes and Next shape.

-Jukka-

Lähettäjä: Even Rouault [mailto:even.rouault at spatialys.com<mailto:even.rouault at spatialys.com>]
Lähetetty: 20. joulukuuta 2016 0:27
Vastaanottaja: mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>
Kopio: Rahkonen Jukka (MML) <jukka.rahkonen at maanmittauslaitos.fi<mailto:jukka.rahkonen at maanmittauslaitos.fi>>
Aihe: Re: [mapserver-users] Mapserver 7.0.3 and disabling default extent for WFS


On lundi 19 décembre 2016 21:46:32 CET Rahkonen Jukka (MML) wrote:

> Hi,

>

> I am running Mapserver 7.0.3, I have a vector layer from a quite large

> GeoPackage through OGR connection and I have set the LAYER METADATA item

> "wfs_use_default_extent_for_getfeature" "no"

>

> Still if I query GetFeature simply with &COUNT=1 I can see that the default

> extent is used msOGRFileWhichShapes: Setting spatial filter to 19969.99999

> 6597277.99999 749676.00001 7785300.00001 This makes count based request

> pretty slow and it take about 15 second to get the first feature.

>

> The documentation in http://mapserver.org/ogc/wfs_server.html says that this

> option is supported "since MapServer 7.0.3" . So what could be wrong?



Jukka,



thanks for spotting my brain damage...



In fact there are 2 issues :

- a minor one: the debug message "Setting spatial filter..." was always displayed, even when the spatial filter wasn't applied

- a major one: the logic to interpret the yes/no value of the setting was inverted (only when it is explicitly set fortunately, so that doesn't break existing mapfiles without the metadata item). I've fixed that, and thus modified the doc to advertize the feature only in 7.0.4. I guess I didn't notice that since I mixed it with other optimizations.



Even





--

Spatialys - Geospatial professional services

http://www.spatialys.com

_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/mapserver-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20161220/8079c20a/attachment-0001.html>


More information about the mapserver-users mailing list