<?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: Statistics and SpatialFilter in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/statistics-and-spatialfilter/m-p/366797#M1749</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;With 10.1 we implemented solution with 2 queries: one for objectIds and second for statistics. Now with 10.1 SP1 we are testing direct query for statistics. When using data stored in Oracle DB, the later solution is faster and thats great. However when using file GDB, performance is poor and the first implementation is faster, although not as fast as with Oracle. I wonder if there is anything we can tune up in the file GDB to get better performance, because we dont want to use Oracle just for this one case&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Jan 2013 06:53:17 GMT</pubDate>
    <dc:creator>GiedriusStanevi_ius</dc:creator>
    <dc:date>2013-01-23T06:53:17Z</dc:date>
    <item>
      <title>Statistics and SpatialFilter</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/statistics-and-spatialfilter/m-p/366792#M1744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;With ArcGIS for Server 10.1 REST API, it seems that when performing a query with oustatistics with a spatial filter (Input Geometry and Spatial Relationship), the spatial filter is not applied.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The query is done on all the features, not only the ones matching the spatial filter.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it supposed to be like this (strange) or is it a bug that will be corrected in the final release?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;olivier&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2012 15:09:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/statistics-and-spatialfilter/m-p/366792#M1744</guid>
      <dc:creator>olivierdev</dc:creator>
      <dc:date>2012-04-23T15:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: Statistics and SpatialFilter</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/statistics-and-spatialfilter/m-p/366793#M1745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've just found out that on the REST API help : &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"When using outStatistics the only other parameters that will be used are groupByFieldsForStatistics, orderByFields, text, time, and where. "&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess this answers my question.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Not supported, and works as required.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;That's too bad...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2012 20:01:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/statistics-and-spatialfilter/m-p/366793#M1745</guid>
      <dc:creator>olivierdev</dc:creator>
      <dc:date>2012-04-23T20:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: Statistics and SpatialFilter</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/statistics-and-spatialfilter/m-p/366794#M1746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Does anybody have any suggestions for how to work around this limitation? What would be the easiest way to calculate statistics in combination with a spatial query?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Some options that I can see:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Query all the data and calculate the statistics client-side - very bandwidth intensive, poor performance&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Do a spatial query for object ids, then do a statistics query with object ids in the where clause. I imagine one would run into issues with long where clauses quickly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. A custom SOE to do the calculation - this seems like it will yield the best performance but seems like a needlessly complex solution for a simple problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;EDIT: And I suppose a geoprocessing service is a fourth alternative. I'm a bit doubtful on the performance I'd get, though.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Suggestions?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 06:28:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/statistics-and-spatialfilter/m-p/366794#M1746</guid>
      <dc:creator>OttarViken_Valvåg</dc:creator>
      <dc:date>2012-08-30T06:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: Statistics and SpatialFilter</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/statistics-and-spatialfilter/m-p/366795#M1747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;By the way... Why is this forum named "ArcGIS Server (10.0 and prior) REST API" - is there a new forum for 10.1 questions?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 06:31:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/statistics-and-spatialfilter/m-p/366795#M1747</guid>
      <dc:creator>OttarViken_Valvåg</dc:creator>
      <dc:date>2012-08-30T06:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: Statistics and SpatialFilter</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/statistics-and-spatialfilter/m-p/366796#M1748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is a known limit at 10.1 that SpatialFilter does not get used while querying for stats off a mapserver, only attribute query is supported.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;We have this in 10.1 SP1 list of enhancements to be supported.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the meantime, here are workarounds:&lt;/SPAN&gt;&lt;BR /&gt;&lt;OL&gt;&lt;BR /&gt;&lt;LI&gt;what valvag proposed as #2.&lt;/LI&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;It will not perform well since you need to make two requests&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;you can also use '&lt;SPAN style="color:#0000ff;"&gt;OBJECTID in &lt;/SPAN&gt;&lt;SPAN style="color:#0000ff;"&gt;(1,2,3...)&lt;/SPAN&gt;' instead of '&lt;SPAN style="color:#0000ff;"&gt;OBJECTID = 1 or OBJECTID = 2 ...&lt;/SPAN&gt;' as a whereclause&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;/OL&gt;&lt;SPAN&gt;OR,&lt;/SPAN&gt;&lt;BR /&gt;&lt;LI&gt;if your underlying RDBMS supports Spatial data natively, then&lt;/LI&gt;&lt;BR /&gt;&lt;UL&gt;&lt;BR /&gt;&lt;LI&gt;store geometries/shapes in DB's native storage type&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;in your web app, construct a SQL Statement that includes a spatial operation and geometry (conformed to their specs)&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;pass that sql as a where clause to query operation.&lt;/LI&gt;&lt;BR /&gt;&lt;/UL&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 16:35:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/statistics-and-spatialfilter/m-p/366796#M1748</guid>
      <dc:creator>TanuHoque</dc:creator>
      <dc:date>2012-08-30T16:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: Statistics and SpatialFilter</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/statistics-and-spatialfilter/m-p/366797#M1749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;With 10.1 we implemented solution with 2 queries: one for objectIds and second for statistics. Now with 10.1 SP1 we are testing direct query for statistics. When using data stored in Oracle DB, the later solution is faster and thats great. However when using file GDB, performance is poor and the first implementation is faster, although not as fast as with Oracle. I wonder if there is anything we can tune up in the file GDB to get better performance, because we dont want to use Oracle just for this one case&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jan 2013 06:53:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/statistics-and-spatialfilter/m-p/366797#M1749</guid>
      <dc:creator>GiedriusStanevi_ius</dc:creator>
      <dc:date>2013-01-23T06:53:17Z</dc:date>
    </item>
  </channel>
</rss>

