-
Notifications
You must be signed in to change notification settings - Fork 520
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #529 from Esri/ncastle/qfce
Query feature count and extent - cartography and readme updates
- Loading branch information
Showing
17 changed files
with
332 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-56.4 KB
(66%)
...roid/Samples/Analysis/QueryFeatureCountAndExtent/QueryFeatureCountAndExtent.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 37 additions & 3 deletions
40
src/Android/Xamarin.Android/Samples/Analysis/QueryFeatureCountAndExtent/readme.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,43 @@ | ||
# Query feature count and extent | ||
|
||
This sample demonstrates how to query a feature table, in this case returning a count, for features that are within the visible extent or that meet specified criteria. | ||
Zoom to features matching a query and count the features in the current visible extent. | ||
|
||
<img src="QueryFeatureCountAndExtent.jpg" width="350"/> | ||
![](QueryFeatureCountAndExtent.jpg) | ||
|
||
## Instructions | ||
## How to use the sample | ||
|
||
Use the button to zoom to the extent of the state specified (by abbreviation) in the textbox or use the button to count the features in the current extent. | ||
|
||
## How it works | ||
|
||
Querying by state abbreviation: | ||
|
||
1. A `QueryParameters` object is created with a `WhereClause`. | ||
2. `FeatureTable.QueryExtentAsync` is called with the `QueryParameters` object to obtain the extent that contains all matching features. | ||
3. The extent is converted to a `Viewpoint`, which is passed to `MapView.SetViewpointAsync`. | ||
|
||
Counting features in the current extent: | ||
|
||
1. The current visible extent is obtained from a call to `MapView.GetCurrentViewpoint(ViewpointType)`. | ||
2. A `QueryParameters` object is created with the visible extent and a defined `SpatialRelationship` (in this case 'intersects'). | ||
3. The count of matching features is obtained from a call to `FeatureTable.QueryFeatureCountAsync`. | ||
|
||
## Relevant API | ||
|
||
* `QueryParameters` | ||
* `QueryParameters.WhereClause` | ||
* `QueryParameters.Geometry` | ||
* `QueryParameters.SpatialRelationship` | ||
* `FeatureTable.QueryExtentAsync` | ||
* `FeatureTable.QueryFeatureCountAsync` | ||
* `MapView.GetCurrentViewpoint(ViewpointType)` | ||
|
||
## About the data | ||
|
||
[See the layer on ArcGIS Online](https://www.arcgis.com/home/item.html?id=c8810b20c01b4e8ba5cd848966a66d7b) | ||
|
||
This map shows hospital spending per-patient for common incidents. Hospitals in blue/turquoise spend less than the national average. Red/salmon indicates higher spending relative to other hospitals, while gray is average. | ||
|
||
## Tags | ||
|
||
Feature layer, Feature table, Query, Medicare |
Binary file modified
BIN
-7.02 KB
(93%)
...ared/Samples/Analysis/QueryFeatureCountAndExtent/QueryFeatureCountAndExtent.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.