Skip to content

Commit 8013163

Browse files
authored
Merge pull request #648 from Esri/cwebb/ShowGeodesicSectorAndEllipse
[New] Show geodesic sector and ellipse
2 parents b350fa9 + 6f4d3af commit 8013163

File tree

5 files changed

+496
-0
lines changed

5 files changed

+496
-0
lines changed

Samples.xcodeproj/project.pbxproj

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@
308308
88FB70D92DD3DFA800EB76E3 /* AddOpenStreetMapLayerView.swift in Copy Source Code Files */ = {isa = PBXBuildFile; fileRef = 88FB70D72DD3DF3700EB76E3 /* AddOpenStreetMapLayerView.swift */; };
309309
9501BBEF2DF39DAB0054F4BD /* SetFeatureLayerRenderingModeOnSceneView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9501BBEE2DF39DA50054F4BD /* SetFeatureLayerRenderingModeOnSceneView.swift */; };
310310
9503056E2C46ECB70091B32D /* ShowDeviceLocationUsingIndoorPositioningView.Model.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9503056D2C46ECB70091B32D /* ShowDeviceLocationUsingIndoorPositioningView.Model.swift */; };
311+
951961AC2E00BC420088B0C2 /* ShowGeodesicSectorAndEllipseView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 951961AB2E00BC3C0088B0C2 /* ShowGeodesicSectorAndEllipseView.swift */; };
311312
951961AE2E00BD430088B0C2 /* SetMapImageLayerSublayerVisibilityView.swift in Copy Source Code Files */ = {isa = PBXBuildFile; fileRef = 95813E382DF88FD000342CBF /* SetMapImageLayerSublayerVisibilityView.swift */; };
312313
9525404E2DF904BA004090B9 /* SetFeatureLayerRenderingModeOnSceneView.swift in Copy Source Code Files */ = {isa = PBXBuildFile; fileRef = 9501BBEE2DF39DA50054F4BD /* SetFeatureLayerRenderingModeOnSceneView.swift */; };
313314
9529D1942C01676200B5C1A3 /* SelectFeaturesInSceneLayerView.swift in Copy Source Code Files */ = {isa = PBXBuildFile; fileRef = 954AEDED2C01332600265114 /* SelectFeaturesInSceneLayerView.swift */; };
@@ -334,6 +335,7 @@
334335
95F3A52B2C07F09C00885DED /* SetSurfaceNavigationConstraintView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95F3A52A2C07F09C00885DED /* SetSurfaceNavigationConstraintView.swift */; };
335336
95F3A52D2C07F28700885DED /* SetSurfaceNavigationConstraintView.swift in Copy Source Code Files */ = {isa = PBXBuildFile; fileRef = 95F3A52A2C07F09C00885DED /* SetSurfaceNavigationConstraintView.swift */; };
336337
95F891292C46E9D60010EBED /* ShowDeviceLocationUsingIndoorPositioningView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95F891282C46E9D60010EBED /* ShowDeviceLocationUsingIndoorPositioningView.swift */; };
338+
95FFEB442E06211B00543993 /* ShowGeodesicSectorAndEllipseView.swift in Copy Source Code Files */ = {isa = PBXBuildFile; fileRef = 951961AB2E00BC3C0088B0C2 /* ShowGeodesicSectorAndEllipseView.swift */; };
337339
D70082EB2ACF900100E0C3C2 /* IdentifyKMLFeaturesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D70082EA2ACF900100E0C3C2 /* IdentifyKMLFeaturesView.swift */; };
338340
D70082EC2ACF901600E0C3C2 /* IdentifyKMLFeaturesView.swift in Copy Source Code Files */ = {isa = PBXBuildFile; fileRef = D70082EA2ACF900100E0C3C2 /* IdentifyKMLFeaturesView.swift */; };
339341
D7010EBF2B05616900D43F55 /* DisplaySceneFromMobileScenePackageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7010EBC2B05616900D43F55 /* DisplaySceneFromMobileScenePackageView.swift */; };
@@ -725,6 +727,7 @@
725727
dstPath = "";
726728
dstSubfolderSpec = 7;
727729
files = (
730+
95FFEB442E06211B00543993 /* ShowGeodesicSectorAndEllipseView.swift in Copy Source Code Files */,
728731
885F89BA2E0B5F8900C2E456 /* ManageFeaturesView.swift in Copy Source Code Files */,
729732
889F9DB72E133D500025A98E /* ShowMagnifierView.swift in Copy Source Code Files */,
730733
88FB70D92DD3DFA800EB76E3 /* AddOpenStreetMapLayerView.swift in Copy Source Code Files */,
@@ -1187,6 +1190,7 @@
11871190
88FB70D72DD3DF3700EB76E3 /* AddOpenStreetMapLayerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddOpenStreetMapLayerView.swift; sourceTree = "<group>"; };
11881191
9501BBEE2DF39DA50054F4BD /* SetFeatureLayerRenderingModeOnSceneView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SetFeatureLayerRenderingModeOnSceneView.swift; sourceTree = "<group>"; };
11891192
9503056D2C46ECB70091B32D /* ShowDeviceLocationUsingIndoorPositioningView.Model.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShowDeviceLocationUsingIndoorPositioningView.Model.swift; sourceTree = "<group>"; };
1193+
951961AB2E00BC3C0088B0C2 /* ShowGeodesicSectorAndEllipseView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShowGeodesicSectorAndEllipseView.swift; sourceTree = "<group>"; };
11901194
9537AFD62C220EF0000923C5 /* ExchangeSetwithoutUpdates */ = {isa = PBXFileReference; lastKnownFileType = folder; path = ExchangeSetwithoutUpdates; sourceTree = "<group>"; };
11911195
9547085B2C3C719800CA8579 /* EditFeatureAttachmentsView.Model.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditFeatureAttachmentsView.Model.swift; sourceTree = "<group>"; };
11921196
954AEDED2C01332600265114 /* SelectFeaturesInSceneLayerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectFeaturesInSceneLayerView.swift; sourceTree = "<group>"; };
@@ -1780,6 +1784,7 @@
17801784
D722BD1E2A420D7E002C2087 /* Show extruded features */,
17811785
1C7B861B2DFB4EAF00B267EA /* Show extruded graphics */,
17821786
88129D782DD5034B001599A5 /* Show geodesic path between two points */,
1787+
951961AD2E00BC760088B0C2 /* Show geodesic sector and ellipse */,
17831788
00ABA94B2BF671FC00C0488C /* Show grid */,
17841789
D751017D2A2E490800B8FA48 /* Show labels on layer */,
17851790
1C293D562DD53523000B0822 /* Show labels on layer in 3D */,
@@ -2708,6 +2713,14 @@
27082713
path = "Set feature layer rendering mode on scene";
27092714
sourceTree = "<group>";
27102715
};
2716+
951961AD2E00BC760088B0C2 /* Show geodesic sector and ellipse */ = {
2717+
isa = PBXGroup;
2718+
children = (
2719+
951961AB2E00BC3C0088B0C2 /* ShowGeodesicSectorAndEllipseView.swift */,
2720+
);
2721+
path = "Show geodesic sector and ellipse";
2722+
sourceTree = "<group>";
2723+
};
27112724
9537AFC82C220ECB000923C5 /* 9d2987a825c646468b3ce7512fb76e2d */ = {
27122725
isa = PBXGroup;
27132726
children = (
@@ -4402,6 +4415,7 @@
44024415
D77BC5392B59A2D3007B49B6 /* StylePointWithDistanceCompositeSceneSymbolView.swift in Sources */,
44034416
D7084FA92AD771AA00EC7F4F /* AugmentRealityToFlyOverSceneView.swift in Sources */,
44044417
D75B58512AAFB3030038B3B4 /* StyleFeaturesWithCustomDictionaryView.swift in Sources */,
4418+
951961AC2E00BC420088B0C2 /* ShowGeodesicSectorAndEllipseView.swift in Sources */,
44054419
0072C8002DBAF08D001502CA /* AddItemsToPortalView.swift in Sources */,
44064420
E0D04FF228A5390000747989 /* DownloadPreplannedMapAreaView.Model.swift in Sources */,
44074421
88129D7A2DD5035A001599A5 /* ShowGeodesicPathBetweenTwoPointsView.swift in Sources */,
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Show geodesic sector and ellipse
2+
3+
Create and display geodesic sectors and ellipses.
4+
5+
![Image of show geodesic sector and ellipse](show-geodesic-sector-and-ellipse.png)
6+
7+
## Use case
8+
9+
Geodesic sectors and ellipses can be used in a wide range of analyses ranging from projectile landing zones to antenna coverage. For example, given the strength and direction of a cellular tower's signal, you could generate cell coverage geometries to identify areas without sufficient connectivity.
10+
11+
## How to use the sample
12+
13+
The geodesic sector and ellipse will display with default parameters at the start. Click anywhere on the map to change the center of the geometries. Adjust any of the controls to see how they affect the sector and ellipse on the fly.
14+
15+
## How it works
16+
17+
To create a geodesic sector and ellipse:
18+
19+
1. Create`GeodesicSectorParameters` and `GeodesicEllipseParameters` values.
20+
2. Use `center`, `axisDirection`, `semiAxis1Length`, and `semiAxis2Length` to set the general ellipse position, shape, and orientation.
21+
3. Use `sectorAngle` and `startDirection` to set the sector's shape and orientation.
22+
4. Use `maxPointCount` and `maxSegmentLength` to control the complexity of the geometries and the approximation of the ellipse curve.
23+
5. Use `geometryType` to change the result geometry type.
24+
6. Pass the parameters to the related static methods: `GeometryEngine.geodesicEllipse(parameters:)` and `GeometryEngine.geodesicSector(parameters:)`. The returned geometry type is that of the parameters.
25+
26+
## Relevant API
27+
28+
GeodesicEllipseParameters
29+
GeodesicSectorParameters
30+
GeometryEngine
31+
32+
## Additional information
33+
34+
To create a circle instead of an ellipse, simply set `semiAxis2Length` to `0` and `semiAxis1Length` to the desired radius of the circle. This eliminates the need to update both parameters to the same value.
35+
36+
## Tags
37+
38+
ellipse, geodesic, geometry, sector
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"category": "Visualization",
3+
"description": "Create and display geodesic sectors and ellipses.",
4+
"ignore": false,
5+
"images": [
6+
"show-geodesic-sector-and-ellipse.png"
7+
],
8+
"keywords": [
9+
"ellipse",
10+
"geodesic",
11+
"geometry",
12+
"sector",
13+
"GeodesicEllipseParameters",
14+
"GeodesicSectorParameters",
15+
"GeometryEngine"
16+
],
17+
"redirect_from": [],
18+
"relevant_apis": [
19+
"GeodesicEllipseParameters",
20+
"GeodesicSectorParameters",
21+
"GeometryEngine"
22+
],
23+
"snippets": [
24+
"ShowGeodesicSectorAndEllipseView.swift"
25+
],
26+
"title": "Show geodesic sector and ellipse"
27+
}

0 commit comments

Comments
 (0)