<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: returnCountOnly causes wrong subsequence query? in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/returncountonly-causes-wrong-subsequence-query/m-p/1075632#M3910</link>
    <description>&lt;P&gt;I found out that when the feature count is over 50,000 that the request is split into multiple requests.&lt;/P&gt;&lt;P&gt;So where does the limit "50,000" come from and how can I override it?&lt;/P&gt;&lt;P&gt;I didn't find anything about this in the docs.&lt;/P&gt;</description>
    <pubDate>Mon, 05 Jul 2021 13:18:44 GMT</pubDate>
    <dc:creator>EmreCan</dc:creator>
    <dc:date>2021-07-05T13:18:44Z</dc:date>
    <item>
      <title>returnCountOnly causes wrong subsequence query?</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/returncountonly-causes-wrong-subsequence-query/m-p/1075147#M3908</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am using ArcGIS REST Api version 10.6.1.&lt;/P&gt;&lt;P&gt;I have the following problem: Geometries are not displayed in 3D mode because the requests may be incorrect. In 2D mode (MapView) everything works fine.&lt;/P&gt;&lt;P&gt;My analysis:&lt;/P&gt;&lt;P&gt;If I do not support queries with returnCountOnly &amp;amp; returnIdsOnly in the query interface, then everything works. So if I return an empty object in the following query:&lt;/P&gt;&lt;P&gt;Request:&lt;/P&gt;&lt;P&gt;&lt;A href="http://localhost:8080/rest/arcgis/features/4242/4242/query?f=json&amp;amp;returnIdsOnly=true&amp;amp;returnCountOnly=true&amp;amp;outSR=3857&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;where=1%3D1" target="_blank" rel="noopener"&gt;http://localhost:8080/rest/arcgis/features/4242/4242/query?f=json&amp;amp;returnIdsOnly=true&amp;amp;returnCountOnly=true&amp;amp;outSR=3857&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;where=1%3D1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Response:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As soon as I return an object with the Count value as usual it doesn't work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{"count": 1}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Because the subsequent requests then look like this:&lt;/P&gt;&lt;P&gt;Request:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;http://localhost:8080/rest/arcgis/features/4242/4242/query?f=json&amp;amp;outFields=objectId%2Cdescription&amp;amp;outSR=102100&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;where=1%3D1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I don't want to support query calls without a geometry.&lt;/P&gt;&lt;P&gt;My expected subsequent request would be:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;http://localhost:8080/rest/arcgis/features/4242/4242/query?f=json&amp;amp;geometry=&amp;lt;geometry&amp;gt;&amp;amp;maxAllowableOffset=3261.313206833336&amp;amp;outFields=objectId%2Cdescription&amp;amp;outSR=102100&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;where=1%3D1&amp;amp;geometryType=esriGeometryEnvelope&amp;amp;inSR=102100&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I also get the following error message on #fetchTile():&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="fetchTile_Error.PNG" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/17601i3713303A766D32B9/image-size/large?v=v2&amp;amp;px=999" role="button" title="fetchTile_Error.PNG" alt="fetchTile_Error.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;What is the best way to solve the problem? I don't want to remove the returnCountOnly function from the interface.&lt;/P&gt;&lt;P&gt;Why does it work at all if I return something wrong (empty object) so to speak?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*** &lt;STRONG&gt;EDIT&lt;/STRONG&gt; ***&lt;/P&gt;&lt;P&gt;I found out that when the feature count is over 50,000 that the request is split into multiple requests.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;So where does the limit "50,000" come from and how can I override it?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I didn't find anything about this in the docs.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jul 2021 14:07:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/returncountonly-causes-wrong-subsequence-query/m-p/1075147#M3908</guid>
      <dc:creator>EmreCan</dc:creator>
      <dc:date>2021-07-05T14:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: returnCountOnly causes wrong subsequence query?</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/returncountonly-causes-wrong-subsequence-query/m-p/1075632#M3910</link>
      <description>&lt;P&gt;I found out that when the feature count is over 50,000 that the request is split into multiple requests.&lt;/P&gt;&lt;P&gt;So where does the limit "50,000" come from and how can I override it?&lt;/P&gt;&lt;P&gt;I didn't find anything about this in the docs.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jul 2021 13:18:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/returncountonly-causes-wrong-subsequence-query/m-p/1075632#M3910</guid>
      <dc:creator>EmreCan</dc:creator>
      <dc:date>2021-07-05T13:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: returnCountOnly causes wrong subsequence query?</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/returncountonly-causes-wrong-subsequence-query/m-p/1095317#M3952</link>
      <description>&lt;P&gt;The API limits calls to 1000 results at a time. There is not a way to get more than this.&lt;BR /&gt;In my experience, the best way to handle this is:&lt;BR /&gt;- get a list of the objectids that match your query&lt;BR /&gt;- divide the list of objectids into groups of 1000&lt;BR /&gt;- make a separate call for each group of 1000 to get the features (with geometries, if appropriate) from the service&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt; Browsers, and some services, often have limits for how many queries they can process at one time. Trying to run more than that will crash the browser, or cause all the queries to fail. If you need to run a lot of them, you may need to set up some custom code to make sure that a smaller group of queries finishes before running the next batch.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Sep 2021 15:01:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/returncountonly-causes-wrong-subsequence-query/m-p/1095317#M3952</guid>
      <dc:creator>CourtneyMenikheim</dc:creator>
      <dc:date>2021-09-03T15:01:58Z</dc:date>
    </item>
  </channel>
</rss>

