Server-Side mapagent maxFeatures parameter

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Server-Side mapagent maxFeatures parameter

kshippey
Hello,

From a previous post on the matter, the final word was that there is no
server-side mechanism to limit the number of map features selected:

http://osgeo-org.1560.x6.nabble.com/Limiting-number-of-results-from-Maestro-QueryFeatureSource-or-mapagent-SELECTFEATURES-td5135715.html

Have there been any changes that provide this option in serverconfig.ini or
elsewhere? I am interested in forcing server-side upper limits as a backup
to client-supplied parameter "maxFeatures" as passed to the mapagent.fcgi
url. For example, tests indicate that I can keep raising the client-side
parameter until the server finally throws an exception as follows:

An exception occurred in DB component. Db::put: DB_LOG_BUFFER_FULL:
In-memory log buffer is full

Ideally I can force an upper limit regardless of large values passed by the
client URL request.



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Server-Side mapagent maxFeatures parameter

Jackie Ng
No server-side limiting mechanism exists at the moment.

This is actually something worth implementing, but I'm not sure if a global
serverconfig.ini value is the place to put it. It's probably actually a web
tier limit (specified in webconfig.ini) that should be applied for mapagent
operations that return features (QUERYMAPFEATURES and SELECTFEATURES). We
don't want to unintentionally limit feature queries from *your own* MapGuide
applications.

- Jackie



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Server-Side mapagent maxFeatures parameter

kshippey
Thank you Jackie. I suspected that was the case, as I looked in many places
for evidence of that parameter, although I did not consider the
webconfig.ini.

On a related note, it would be nice to turn off sending Bounds as part of
the Feature data provided in the JSON to mapagent.fcgi request, i.e.

"Feature":[{"Bounds":["-12945413.350013612 5407462.6793876747
-12945104.670435043 5407572.3364841882"]

According to this RFC you implemented, it seems there is a hook in the
MgBatchPropertyCollection for bIncludeFeatureBBOX:

https://trac.osgeo.org/mapguide/wiki/MapGuideRfc126

However it does not appear that the mapagent.fcgi behavior can be adjusted
on either client-side or server side. Removing bounds information would
reduce the JSON overhead anywhere from 10%-50% depending on the requested
layer feature data. Just an additional consideration related to the first
one.



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Server-Side mapagent maxFeatures parameter

Jackie Ng
Support for omitting bounds information in QUERYMAPFEATURES:
 
 a) Is an API change
 b) Would break our existing client viewers that relied on this information
(eg. Zoom to selected feature) if omitted by default. It would also require
some modification from our viewers to gracefully operate in the absence of
such information.

So while this request is also reasonable, such a change can only
realistically land in the next major release.

- Jackie



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Server-Side mapagent maxFeatures parameter

kshippey
Thanks again Jackie. Not a major issue but it does offer more control over
default output.

To prevent breaking existing client viewers that rely on this information,
the default setting could be left to output the bounds data, with a
server-side variable that disables it if desired. As you said, perhaps this
will make its way into an upcoming release down the line.



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Server-Side mapagent maxFeatures parameter

Jackie Ng
In reply to this post by Jackie Ng
The just released 3.1.2 introduced new webconfig.ini properties for you to
apply global limits:

GlobalMaxFeatureQueryLimit (for SELECTFEATURES)
GlobalMaxMapFeatureQueryLimit (for QUERYMAPFEATURES)
GlobalGetWfsFeaturesLimit (for WFS GETFEATURES)
GlobalGetWmsFeatureInfoLimit (for WMS GETFEATUREINFO)

These values are unset by default meaning results are unbounded as they
currently are or limited by the maxfeatures parameter for applicable
operations.

If set, these values represent the global upper limit on how many features
the applicable operation can return (regardless of whatever maxfeatures a
user may pass in)

- Jackie



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Server-Side mapagent maxFeatures parameter

kshippey
Fantastic, thanks for following up with the information on this item.



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users