This repository has been archived by the owner on Jan 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 393
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
895 changed files
with
8,996 additions
and
3,449 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
28 changes: 22 additions & 6 deletions
28
arcgis-ios-sdk-samples/Analysis/Analyze hotspots/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,18 +1,34 @@ | ||
# Analyze hotspots | ||
|
||
This sample demonstrates how to execute a geoprocessing task to calculate a hotspot analysis based on the frequency of 911 calls. It calculates the frequency of these calls within a given study area during a specified constrained time period set between 1/1/1998 and 5/31/1998. | ||
Use a geoprocessing service and a set of features to identify statistically significant hot spots and cold spots. | ||
|
||
## How to use the sample | ||
 | ||
 | ||
|
||
## Use case | ||
|
||
To select a date range for analysis, tap on `Analyze` in the bottom toolbar. Pick `From` and `To` date and tap on `Done` button to start analysis (Tap anywhere on screen to hide the date picker). The results will be shown on the map on successful completion. | ||
This tool identifies statistically significant spatial clusters of high values (hot spots) and low values (cold spots). For example, a hotspot analysis based on the frequency of 911 calls within a set region. | ||
|
||
## How to use the sample | ||
|
||
 | ||
 | ||
Select a date range (between 1998-01-01 and 1998-05-31) from the dialog and tap on Analyze. The results will be shown on the map upon successful completion of the `AGSGeoprocessingJob`. | ||
|
||
## How it works | ||
|
||
An `AGSGeoprocessingTask` is created by setting the URL to the REST endpoint of a geoprocessing service. `AGSGeoprocessingParameters` are created and the execution type is set to `AsynchronousSubmit`. Once the date ranges are selected, a query string is created with the to and from dates. A key/value parameter input is created, where the key is the string `Query` and the value is an `AGSGeoprocessingString` that contains the query string. These parameter inputs are then added to the `AGSGeoprocessingParameters`. An `AGSGeoprocessingJob` is obtained by calling the `geoprocessingJob(with:)` method of the `AGSGeoprocessingTask`. The job is started, and once it is complete, the `AGSArcGISMapImageLayer` is obtained from the result, and added to the `AGSMap`. | ||
1. Create an `AGSGeoprocessingTask` with the URL set to the endpoint of a geoprocessing service. | ||
2. Create a query string with the date range as an input of `AGSGeoprocessingParameters`. | ||
3. Use the `AGSGeoprocessingTask` to create an `AGSGeoprocessingJob` with the `AGSGeoprocessingParameters` instance. | ||
4. Start the `AGSGeoprocessingJob` and wait for it to complete and return an `AGSGeoprocessingResult`. | ||
5. Get the resulting `AGSArcGISMapImageLayer`. | ||
6. Add the layer to the map's operational layers. | ||
|
||
## Relevant API | ||
|
||
* AGSGeoprocessingJob | ||
* AGSGeoprocessingParameters | ||
* AGSGeoprocessingResult | ||
* AGSGeoprocessingTask | ||
|
||
## Tags | ||
|
||
analysis, density, geoprocessing, hot spots, hotspots |
23 changes: 19 additions & 4 deletions
23
arcgis-ios-sdk-samples/Analysis/Analyze hotspots/README.metadata.json
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
File renamed without changes
File renamed without changes
34 changes: 21 additions & 13 deletions
34
arcgis-ios-sdk-samples/Analysis/Distance measurement analysis/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,26 +1,34 @@ | ||
# Distance Measurement Analysis | ||
This sample demonstrates measuring 3D distances between two points in a scene. | ||
# Distance measurement analysis | ||
|
||
The distance measurement analysis allows you to add the same measuring experience found in ArcGIS Pro, City Engine, and the ArcGIS API for JavaScript to your app. You can set the unit system of measurement (metric or imperial) and have the units automatically switch to one appropriate for the current scale. The rendering is handled internally so they do not interfere with other analyses like viewsheds. | ||
Measure distances between two points in 3D. | ||
|
||
 | ||
 | ||
|
||
## Use case | ||
|
||
The distance measurement analysis allows you to add to your app the same interactive measuring experience found in ArcGIS Pro, City Engine, and the ArcGIS API for JavaScript. You can set the unit system of measurement (metric or imperial). The units automatically switch to one appropriate for the current scale. | ||
|
||
## How to use the sample | ||
|
||
Choose a unit system for the measurement in the segmented control. Long press any location in the scene to start measuring. Then drag to an end location, and lift your finger to complete the measure. Tap a new location to clear and start a new measurement. | ||
|
||
## How it works | ||
To measure distances with the `AGSLocationDistanceMeasurement` analysis: | ||
|
||
1. Create an `AGSAnalysisOverlay` and add it to your scene view's analysis overlay collection: `sceneView.analysisOverlays.add(analysisOverlay)`. | ||
2. Create a `AGSLocationDistanceMeasurement`, specifying the `startLocation` and `endLocation`. These can be the same point to start with. Add the analysis to the analysis overlay: `analysisOverlay.analyses.add(locationDistanceMeasurement)`. The measuring line will be drawn for you between the two points. | ||
3. The `measurementChangedHandler` callback will fire if the distances change. You can get the new values for the `directDistance`, `horizontalDistance`, and `verticalDistance` from the parameters provided by the callback. The distance objects contain both the scalar value and unit of measurement. | ||
1. Create an `AGSAnalysisOverlay` object and add it to the analysis overlay collection of the `AGSSceneView` object. | ||
2. Specify the start location and end location to create an `AGSLocationDistanceMeasurement` object. Initially, the start and end locations can be the same point. | ||
3. Add the location distance measurement analysis to the analysis overlay. | ||
4. The `measurementChangedHandler` callback will fire if the distances change. You can get the new values for the `directDistance`, `horizontalDistance`, and `verticalDistance` from the parameters provided by the callback. The distance objects contain both the scalar value and unit of measurement. | ||
|
||
## Relevant API | ||
- `AGSAnalysisOverlay` | ||
- `AGSLocationDistanceMeasurement` | ||
## Relevant API | ||
|
||
* AGSAnalysisOverlay | ||
* AGSLocationDistanceMeasurement | ||
* AGSMeasurementChangedEvent | ||
|
||
## Additional information | ||
The `AGSLocationDistanceMeasurement` analysis only performs planar distance calculations. This may not be appropriate for large distances where the Earth's curvature needs to be taken into account. | ||
|
||
The `AGSLocationDistanceMeasurement` analysis only performs planar distance calculations. This may not be appropriate for large distances where the Earth's curvature must be considered. | ||
|
||
## Tags | ||
Analysis, 3D | ||
|
||
3D, analysis, distance, measure |
18 changes: 12 additions & 6 deletions
18
arcgis-ios-sdk-samples/Analysis/Distance measurement analysis/README.metadata.json
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
File renamed without changes
31 changes: 25 additions & 6 deletions
31
arcgis-ios-sdk-samples/Analysis/Line of sight (geoelement)/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,18 +1,37 @@ | ||
# Line of sight (geoelement) | ||
|
||
This sample demonstrates how to perform a dynamic line of sight analysis between two moving GeoElements (an observer whose height above ground can be modified interactively, and a moving taxi). | ||
Show a line of sight between two moving objects. | ||
|
||
 | ||
 | ||
|
||
## Use case | ||
|
||
A line of sight between `AGSGeoElement`s (i.e. observer and target) will not remain constant whilst one or both are on the move. | ||
|
||
An `AGSGeoElementLineOfSight` is therefore useful in cases where visibility between two `AGSGeoElement`s requires monitoring over a period of time in a partially obstructed field of view (such as buildings in a city). | ||
|
||
## How to use the sample | ||
|
||
Use the slider to adjust the height of the observer. | ||
A line of sight will display between a point on the Empire State Building (observer) and a taxi (target). | ||
The taxi will drive around a block and the line of sight should automatically update. | ||
The taxi will be highlighted when it is visible. You can change the observer height with the slider to see how it affects the target's visibility. | ||
|
||
## How it works | ||
|
||
An `AGSGeoElementLineOfSight` is created using the `init(observerLocation:targetLocation:)` initializer that takes observer and target geo-elements (in this case, `AGSGraphic` objects in an `AGSGraphicsOverlay` that's added to the scene view). As a result of the analysis, a line is rendered between the observer and target with green color representing visible segment and red color representing obstructed segment. An analysis overlay is used to render the results of visual analysis on the scene view. | ||
1. Instantiate an `AGSAnalysisOverlay` and add it to the `AGSSceneView`'s analysis overlays collection. | ||
2. Instantiate an `AGSGeoElementLineOfSight`, passing in an `AGSGeoElement` (feature or graphic) for both the observer and the target. Add the line of sight to the analysis overlay's `analyses` array. | ||
3. To get the target visibility when it changes, observe the target visibility changing on the `AGSGeoElementLineOfSight` instance. | ||
|
||
## Relevant API | ||
|
||
* AGSAnalysisOverlay | ||
* AGSGeoElementLineOfSight | ||
* AGSLineOfSight.targetVisibility | ||
|
||
## Offline data | ||
|
||
The line width used to render analysis results is set using the `setLineWidth()` method on the base class for the line of sight analysis called `AGSLineOfSight`. This setting is applied to all line of sight analyses in the view. | ||
This sample uses the [Taxi](https://www.arcgis.com/home/item.html?id=3af5cfec0fd24dac8d88aea679027cb9) CAD Drawing. It is downloaded from ArcGIS Online automatically. | ||
|
||
The height of the observer above the ground is modified using a `UISlider` and the taxi's location is modified on a `Timer`. As the observer and taxi graphics are moved, the line of sight analysis automatically updates to reflect their positions. | ||
## Tags | ||
|
||
3D, line of sight, visibility, visibility analysis |
18 changes: 15 additions & 3 deletions
18
arcgis-ios-sdk-samples/Analysis/Line of sight (geoelement)/README.metadata.json
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
File renamed without changes
27 changes: 22 additions & 5 deletions
27
arcgis-ios-sdk-samples/Analysis/Line of sight (location)/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,13 +1,30 @@ | ||
# Line of sight (location) | ||
|
||
This sample demonstrates how to interactively place a line of sight between two locations. | ||
Perform a line of sight analysis between two points in real time. | ||
|
||
 | ||
 | ||
|
||
## Use case | ||
|
||
A line of sight analysis can be used to assess whether a view is obstructed between an observer and a target. Obstructing features could either be natural, like topography, or man-made, like buildings. Consider an events planning company wanting to commemorate a national event by lighting sequential beacons across hill summits or roof tops. To guarantee a successful event, ensuring an unobstructed line of sight between neighboring beacons would allow each beacon to be activated as intended. | ||
|
||
## How to use the sample | ||
|
||
Tap on the map to set the observer location. Tap and hold to drag the line of sight target. A red segment on the line means the view between observer and target is obstructed, whereas green means the view is unobstructed. | ||
|
||
## How it works | ||
|
||
`AGSLocationLineOfSight` is created using the `init(observerLocation:targetLocation:)` initializer that takes observer and target locations. As a result of the analysis, a line is rendered between the observer and target with green color representing visible segment and red color representing obstructed segment. Analysis overlay is used to render the results of visual analysis on the scene view. | ||
1. Create an `AGSAnalysisOverlay` and add it to the scene view. | ||
2. Track the screen taps using the `AGSGeoViewTouchDelegate`. | ||
3. Create an `AGSLocationLineOfSight` with the map points. | ||
4. Update the target location when needed. | ||
|
||
## Relevant API | ||
|
||
* AGSAnalysisOverlay | ||
* AGSLocationLineOfSight | ||
* AGSSceneView | ||
|
||
The line width used to render analysis results is set using the `setLineWidth()` method on the base class for the line of sight analysis called `AGSLineOfSight`. This setting is applied to all line of sight analyses in the view. | ||
## Tags | ||
|
||
`AGSGeoViewTouchDelegate` is used for capturing user's interaction on map and updating the `observerLocation` and `targetLocation`. The observer location is set in the `geoView(_:didTapAtScreenPoint:mapPoint:)` method when user taps on the map. The target location is updated in the `geoView(_:didLongPressAtScreenPoint:mapPoint:)` method when user performs long-pressed gesture at a specified location and in the `geoView(_:didMoveLongPressToScreenPoint:mapPoint:)` method when user drags the target location during a long press interaction. | ||
3D, line of sight, visibility, visibility analysis |
18 changes: 15 additions & 3 deletions
18
arcgis-ios-sdk-samples/Analysis/Line of sight (location)/README.metadata.json
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
File renamed without changes
Oops, something went wrong.