Paginating results \ Order By workaround

3206
2
04-28-2010 10:40 AM
TroySchmidt
New Contributor
Since ArcGIS Server doesn't support order by in REST querying, is there a workaround?  I am specifically wanting to paginate results back from queries and limit query result sets down to around 100 and execute more queries as necessary in the pagination logic.

Seems like someone has to have done a workaround that doesn't involve writing a custom .NET Service to perform something as wildly accepted as pagination.
0 Kudos
2 Replies
RahulRavikumar
New Contributor
The ArcGIS REST API supports returning objectID's only, in a query response, you can get the get the objectID's for the features, and then implement a paging/ order by solution on the client side.

For more information you can check out the ArcGIS REST API documentation at: http://sampleserver3.arcgisonline.com/ArcGIS/SDK/REST/query.html

The parameter that you are interested in is :

returnIdsOnly - Description: If true, the response only includes an array of object IDs. Otherwise the response is a feature set. The default is false.

Note that while there is a limit on the number of features included in the feature set response, there is no limit on the number of object IDs returned in the ID array response. Clients can exploit this to get all the query conforming object IDs by specifying returnIdsOnly=true and subsequently requesting feature sets for subsets of object IDs.

Values: false | true
0 Kudos
TroySchmidt
New Contributor
I think it is important to note this is implemented in ArcGIS 10 when it is released.  Got my hopes up that I missed a parameter in 9.3.1 for a second there.

Also, it is mentioned to exploit this for pagination so obviously an example must already have been formulated to take advantage of such functionality.  Is that posted anywhere online to view?

In the interm what solutions are people doing for those that cannot upgrade to ArcGIS Server 10 the second it is released?
0 Kudos