Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(arcgis-rest-feature-service): add additional statistic types #1114

Merged
merged 1 commit into from
Aug 8, 2023

Conversation

gavinr-maps
Copy link
Contributor

#1043

These are currently supported in ArcGIS Online hosted feature services, but not in ArcGIS Enterprise. So these are not yet in the ArcGIS REST API Documentation because they are not supported in ArcGIS Enterprise yet. But due to the request in #1043 and also the fact that they are built into other client libraries like the ArcGIS Maps SDK for JavaScript, we think it's valid to put these types into ArcGIS REST JS.

Demo

Because these are not in the REST API documentation yet, I had to look up what are the actual string names. They can be found in the JSON info of a Feature Service layer, for example here - scroll down to the supportedSpatialAggregationStatistics:
image

Also, to verify these are correct, I constructed a test REST call - here is an example using EnvelopeAggregate:

https://services.arcgis.com/P3ePLMYs2RVChkJx/ArcGIS/rest/services/USA_Major_Cities_/FeatureServer/0/query?where=1%3D1&outFields=*&returnGeometry=true&groupByFieldsForStatistics=STATE_ABBR&outStatistics=%5B%0D%0A++%7B%0D%0A++++%22statisticType%22%3A+%22AVG%22%2C%0D%0A++++%22onStatisticField%22%3A+%22POPULATION%22%2C%0D%0A++++%22outStatisticFieldName%22%3A+%22avg_pop%22%0D%0A++%7D%2C%0D%0A++%7B%0D%0A++++%22statisticType%22%3A+%22EnvelopeAggregate%22%2C%0D%0A++++%22outStatisticFieldName%22%3A+%22aggregateExtent%22%0D%0A++%7D%0D%0A%5D&f=html

@gavinr-maps gavinr-maps requested a review from patrickarlt July 28, 2023 20:15
@codecov
Copy link

codecov bot commented Jul 28, 2023

Codecov Report

Merging #1114 (e6f34af) into main (170c450) will not change coverage.
Report is 4 commits behind head on main.
The diff coverage is n/a.

@@            Coverage Diff            @@
##              main     #1114   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          163       163           
  Lines         3003      3003           
  Branches       534       534           
=========================================
  Hits          3003      3003           
Files Changed Coverage Δ
...ackages/arcgis-rest-feature-service/src/helpers.ts 100.00% <ø> (ø)

Copy link
Contributor

@patrickarlt patrickarlt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@gavinr-maps gavinr-maps merged commit 37e6e8e into Esri:main Aug 8, 2023
github-actions bot pushed a commit that referenced this pull request Sep 6, 2023
## @esri/arcgis-rest-feature-service [4.0.5](https://github.com/Esri/arcgis-rest-js/compare/@esri/arcgis-rest-feature-service@4.0.4...@esri/arcgis-rest-feature-service@4.0.5) (2023-09-06)

### Bug Fixes

* **arcgis-rest-feature-service:** add additional statistic types ([#1114](#1114)) ([37e6e8e](37e6e8e))
github-actions bot pushed a commit that referenced this pull request Sep 6, 2023
# [4.4.0](https://github.com/Esri/arcgis-rest-js/compare/@esri/arcgis-rest-portal@4.3.0...@esri/arcgis-rest-portal@4.4.0) (2023-09-06)

### Bug Fixes

* **arcgis-rest-feature-service:** add additional statistic types ([#1114](#1114)) ([37e6e8e](37e6e8e))

### Features

* **arcgis-rest-portal:** add searchCommunityUsers method to allow for searching outside user's org ([2695a75](2695a75))
gavinr-maps pushed a commit that referenced this pull request Jun 15, 2024
## [4.0.3](https://github.com/Esri/arcgis-rest-js/compare/@esri/arcgis-rest-demographics@4.0.2...@esri/arcgis-rest-demographics@4.0.3) (2024-06-15)

### Bug Fixes

* change to trigger a catch-up release ([#1164](#1164)) ([c3a70f1](c3a70f1))
* fix the ci ([#1160](#1160)) ([15dce8d](15dce8d)), closes [/github.com/Esri/hub.js/blob/master/.github/workflows/release.yml#L64-L66](https://github.com//github.com/Esri/hub.js/blob/master/.github/workflows/release.yml/issues/L64-L66)
* removed owningSystemUrl from IServerInfo ([#1146](#1146)) ([a801537](a801537))
* small change to trigger a catch-up release ([#1159](#1159)) ([ea1ac91](ea1ac91))
* small change to trigger a catch-up release ([#1163](#1163)) ([11adbce](11adbce))
* update auth warning ([#1162](#1162)) ([fdd411b](fdd411b))
* **arcgis-rest-feature-service:** add additional statistic types ([#1114](#1114)) ([37e6e8e](37e6e8e))
* **arcgis-rest-places:** update pagination values for latest API ([#1109](#1109)) ([ea5370c](ea5370c))
* **arcgis-rest-portal:** add supported search fields ([#1017](#1017)) ([2be361a](2be361a))
* **arcgis-rest-request:** Added Params Preprocessor for GP Mutilvalue Inputs ([#1027](#1027)) ([cf75cd6](cf75cd6))
* **arcgis-rest-request:** added social providers ([caf8d11](caf8d11))
* **arcgis-rest-request:** fix [#1035](#1035) by adding parsing for generateToken endpoints on ArcGIS Server ([c0ff7a3](c0ff7a3))
* **arcgis-rest-request:** geometry type esriGeometryMultiPatch ([#1102](#1102)) ([b5e1aa4](b5e1aa4))
* **arcgis-rest-request:** pass referer ([c950c4a](c950c4a))
* **arcgis-rest-request:** pass referer ([81c2de8](81c2de8))
* **arcgis-rest-request:** pass referer ([57de1f6](57de1f6))
* **arcgis-rest-request:** pass referer ([5af0c3b](5af0c3b))
* **arcgis-rest-request:** pass referer ([08ec6fd](08ec6fd))
* **arcgis-rest-request:** pass referer ([8ba4890](8ba4890))
* add error parameter to IEditFeatureResult ([#1038](#1038)) ([36f78e5](36f78e5))
* **arcgis-rest-routing:** url param ([#1028](#1028)) ([3713b81](3713b81))
* [#995](#995) and [#1006](#1006), issues with redirect urls ([f03ed13](f03ed13))
* encode item extent prior to calling request ([135600c](135600c))
* resolve cross-org sharing as admin bug ([1ae4f1a](1ae4f1a))

### Features

* **arcgis-rest-developer-credentials:** Initial package release ([68e1249](68e1249))
* **arcgis-rest-places:** Add support for the new Places service via a new arcgis-rest-places package ([6ee5a54](6ee5a54))
* **arcgis-rest-portal:** add documentation ([826e7fd](826e7fd))
* **arcgis-rest-portal:** add searchCommunityUsers method to allow for searching outside user's org ([2695a75](2695a75))
* **arcgis-rest-portal:** add user properties functions ([a9e7352](a9e7352))
* **arcgis-rest-portal:** code coverage ([b668b15](b668b15))
* **arcgis-rest-portal:** export functions ([92831f2](92831f2))
* **arcgis-rest-portal:** pr feedback ([9f0c721](9f0c721))
* **arcgis-rest-portal:** pr feedback ([2e26348](2e26348))
* **arcgis-rest-portal:** remove console statement ([4981383](4981383))
* **arcgis-rest-portal:** split set user properties ([46e15fb](46e15fb))
* **arcgis-rest-portal:** update comment ([96be4bd](96be4bd))
* **arcgis-rest-portal:** v4 updates ([6332675](6332675))
* **arcgis-rest-request:** add a new Job class to support asynchronous long running tasks. ([9c222aa](9c222aa))
gavinr-maps pushed a commit that referenced this pull request Jun 15, 2024
## [4.0.3](https://github.com/Esri/arcgis-rest-js/compare/@esri/arcgis-rest-geocoding@4.0.2...@esri/arcgis-rest-geocoding@4.0.3) (2024-06-15)

### Bug Fixes

* change to trigger a catch-up release ([#1164](#1164)) ([c3a70f1](c3a70f1))
* fix the ci ([#1160](#1160)) ([15dce8d](15dce8d)), closes [/github.com/Esri/hub.js/blob/master/.github/workflows/release.yml#L64-L66](https://github.com//github.com/Esri/hub.js/blob/master/.github/workflows/release.yml/issues/L64-L66)
* removed owningSystemUrl from IServerInfo ([#1146](#1146)) ([a801537](a801537))
* small change to trigger a catch-up release ([#1159](#1159)) ([ea1ac91](ea1ac91))
* small change to trigger a catch-up release ([#1163](#1163)) ([11adbce](11adbce))
* small change to trigger a catch-up release ([#1165](#1165)) ([73aa677](73aa677))
* small change to trigger a catch-up release ([#1166](#1166)) ([26c33b1](26c33b1))
* small change to trigger a catch-up release ([#1167](#1167)) ([42fb211](42fb211))
* small change to trigger a catch-up release ([#1168](#1168)) ([5417fa7](5417fa7))
* update auth warning ([#1162](#1162)) ([fdd411b](fdd411b))
* **arcgis-rest-feature-service:** add additional statistic types ([#1114](#1114)) ([37e6e8e](37e6e8e))
* **arcgis-rest-places:** update pagination values for latest API ([#1109](#1109)) ([ea5370c](ea5370c))
* **arcgis-rest-portal:** add supported search fields ([#1017](#1017)) ([2be361a](2be361a))
* **arcgis-rest-request:** Added Params Preprocessor for GP Mutilvalue Inputs ([#1027](#1027)) ([cf75cd6](cf75cd6))
* **arcgis-rest-request:** added social providers ([caf8d11](caf8d11))
* **arcgis-rest-request:** fix [#1035](#1035) by adding parsing for generateToken endpoints on ArcGIS Server ([c0ff7a3](c0ff7a3))
* **arcgis-rest-request:** geometry type esriGeometryMultiPatch ([#1102](#1102)) ([b5e1aa4](b5e1aa4))
* **arcgis-rest-request:** pass referer ([c950c4a](c950c4a))
* **arcgis-rest-request:** pass referer ([81c2de8](81c2de8))
* **arcgis-rest-request:** pass referer ([57de1f6](57de1f6))
* **arcgis-rest-request:** pass referer ([5af0c3b](5af0c3b))
* **arcgis-rest-request:** pass referer ([08ec6fd](08ec6fd))
* **arcgis-rest-request:** pass referer ([8ba4890](8ba4890))
* [#995](#995) and [#1006](#1006), issues with redirect urls ([f03ed13](f03ed13))
* add error parameter to IEditFeatureResult ([#1038](#1038)) ([36f78e5](36f78e5))
* **arcgis-rest-routing:** url param ([#1028](#1028)) ([3713b81](3713b81))
* encode item extent prior to calling request ([135600c](135600c))
* resolve cross-org sharing as admin bug ([1ae4f1a](1ae4f1a))

### Features

* **arcgis-rest-developer-credentials:** Initial package release ([68e1249](68e1249))
* **arcgis-rest-places:** Add support for the new Places service via a new arcgis-rest-places package ([6ee5a54](6ee5a54))
* **arcgis-rest-portal:** add documentation ([826e7fd](826e7fd))
* **arcgis-rest-portal:** add searchCommunityUsers method to allow for searching outside user's org ([2695a75](2695a75))
* **arcgis-rest-portal:** add user properties functions ([a9e7352](a9e7352))
* **arcgis-rest-portal:** code coverage ([b668b15](b668b15))
* **arcgis-rest-portal:** export functions ([92831f2](92831f2))
* **arcgis-rest-portal:** pr feedback ([9f0c721](9f0c721))
* **arcgis-rest-portal:** pr feedback ([2e26348](2e26348))
* **arcgis-rest-portal:** remove console statement ([4981383](4981383))
* **arcgis-rest-portal:** split set user properties ([46e15fb](46e15fb))
* **arcgis-rest-portal:** update comment ([96be4bd](96be4bd))
* **arcgis-rest-portal:** v4 updates ([6332675](6332675))
* **arcgis-rest-request:** add a new Job class to support asynchronous long running tasks. ([9c222aa](9c222aa))
gavinr-maps pushed a commit that referenced this pull request Jun 15, 2024
## [1.0.2](https://github.com/Esri/arcgis-rest-js/compare/@esri/arcgis-rest-places@1.0.1...@esri/arcgis-rest-places@1.0.2) (2024-06-15)

### Bug Fixes

* change to trigger a catch-up release ([#1164](#1164)) ([c3a70f1](c3a70f1))
* fix the ci ([#1160](#1160)) ([15dce8d](15dce8d)), closes [/github.com/Esri/hub.js/blob/master/.github/workflows/release.yml#L64-L66](https://github.com//github.com/Esri/hub.js/blob/master/.github/workflows/release.yml/issues/L64-L66)
* removed owningSystemUrl from IServerInfo ([#1146](#1146)) ([a801537](a801537))
* small change to trigger a catch-up release ([#1159](#1159)) ([ea1ac91](ea1ac91))
* small change to trigger a catch-up release ([#1163](#1163)) ([11adbce](11adbce))
* small change to trigger a catch-up release ([#1165](#1165)) ([73aa677](73aa677))
* small change to trigger a catch-up release ([#1166](#1166)) ([26c33b1](26c33b1))
* small change to trigger a catch-up release ([#1167](#1167)) ([42fb211](42fb211))
* small change to trigger a catch-up release ([#1168](#1168)) ([5417fa7](5417fa7))
* update auth warning ([#1162](#1162)) ([fdd411b](fdd411b))
* **arcgis-rest-feature-service:** add additional statistic types ([#1114](#1114)) ([37e6e8e](37e6e8e))

### Features

* **arcgis-rest-developer-credentials:** Initial package release ([68e1249](68e1249))
* **arcgis-rest-portal:** add searchCommunityUsers method to allow for searching outside user's org ([2695a75](2695a75))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants