Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Merge pull request #202 from Esri/dev
Browse files Browse the repository at this point in the history
Version 2.1 for Military Tools 1.1
  • Loading branch information
kgonzago authored Jun 5, 2017
2 parents 907e73b + 2890c3a commit 5747382
Show file tree
Hide file tree
Showing 40 changed files with 1,862 additions and 941 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ NuGet.exe
*-old
*-sav
*-sav.*
*.sav

#############
## Python
Expand Down Expand Up @@ -35,6 +36,8 @@ develop-eggs
[Bb]in/
[Oo]bj/
*.vshost.*
*.VC.db
*.VC.opendb

#################
## Eclipse
Expand Down Expand Up @@ -181,4 +184,3 @@ Thumbs.db

# Folder config file
Desktop.ini

169 changes: 52 additions & 117 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,149 +1,84 @@
# visibility-addin-dotnet
ArcGIS Add-in provides the capability to quickly do line of sight analyses.

An ArcGIS Desktop add-in providing visibility tools. These tools use elevation data
paired with observer and target information to produce Linear Line of Sight (LLOS) and Radial Line of Sight (RLOS) information.

![Image of Visibility Add-In](visibility.png)

## Features

* Creates LLOS RLOS
* Inputs can be entered manually or via a known coordinate
* Addin for ArcMap 10.3.1
* Linear Lines of sight (LLOS)
* Radial Line of Sight (RLOS)
* Specifying observer and target locations by entering inputs manually or by clicking on the map
* Use one or multiple observers and one or multiple targets to perform analysis
* Add-in for ArcGIS Pro and ArcMap

## Sections

* [Requirements](#requirements)
* [Instructions](#instructions)
* [Developers](#developers)
* [ArcGIS for Desktop Users](#arcgis-for-desktop-users)
* [Workflows](#workflows)
* [One-to-one Linear Line Of Sight (LLOS)](#one-to-one-linear-line-of-sight-llos)
* [One-to-many Linear Line of Sight (LLOS)](#one-to-many-linear-line-of-sight-llos)
* [Many-to-many Linear Line Of Sight (LLOS)](#many-to-many-linear-line-of-sight-llos)
* [Many-to-one Linear Line Of Sight (LLOS)](#many-to-one-linear-line-of-sight-llos)
* [Radial Line Of Sight (RLOS)](#radial-line-of-sight-rlos)
* [Build Instructions](#build-instructions)
* [Running](#running)
* [Resources](#resources)
* [Issues](#issues)
* [Contributing](#contributing)
* [Licensing](#licensing)

## Requirements

## Developers
### Build Requirements

* Visual Studio 2013
* ArcGIS Desktop SDK for .NET 10.3.1
* Visual Studio 2015
* ArcGIS for Desktop
* ArcMap 10.3.1+
* ArcGIS Pro 1.4+
* ArcGIS Desktop SDK for .NET 10.3.1+
* [ArcGIS Desktop for .NET Requirements](https://desktop.arcgis.com/en/desktop/latest/get-started/system-requirements/arcobjects-sdk-system-requirements.htm)
* [ArcGIS Pro SDK](http://pro.arcgis.com/en/pro-app/sdk/) 1.4+

## ArcGIS for Desktop Users <a name="arcgis-for-desktop-users"></a>
### Run Requirements

* [ArcGIS Desktop 10.3.1](http://desktop.arcgis.com/en/arcmap/10.3/get-started/system-requirements/arcgis-desktop-system-requirements.htm)
* ArcGIS for Desktop
* ArcMap 10.3.1+
* ArcGIS Pro 1.4+
* 3D Analyst and Spatial Analyst extensions installed and licensed

## Instructions

###New to Github
### Build Instructions

* [New to Github? Get started here.](http://htmlpreview.github.com/?https://github.com/Esri/esri.github.com/blob/master/help/esri-getting-to-know-github.html)
* To Build Using Visual Studio `*`
* Open and build solution file
* To use MSBuild to build the solution
* Open a Visual Studio Command Prompt: Start Menu | Visual Studio 2015 | Visual Studio Tools | Developer Command Prompt for VS2015
* ` cd visibility-addin-dotnet\source`
* ` msbuild Visibility.sln /property:Configuration=Release `
* To run Unit test from command prompt: Open a Visual Studio Command Prompt: Start Menu | Visual Studio 2015 | Visual Studio Tools | Developer Command Prompt for VS2015
* ArcMap
* ` cd visibility-addin-dotnet\source\Visibility\ArcMapAddinVisibility.Tests\bin\Release `
* ` MSTest /testcontainer:ArcMapAddinVisibility.Tests.dll `
* ArcGIS Pro
* ` cd visibility-addin-dotnet\source\Visibility\ProAppVisibilityModule.Tests\bin\Release `
* ` vstest.console.exe ProAppVisibilityModule.Tests.dll /InIsolation /platform:x64 `
* Note: MsTest does not have a platform option (Pro must be run as x64), so must use VsTest

### Working with the Add-In
`*` Note : Assembly references are based on a default install of the SDK, you may have to update the references if you chose an alternate install option

## Development Environment
### Running

* Building
* To Build Using Visual Studio
* Open and build solution file
* To use MSBuild to build the solution
* Open a Visual Studio Command Prompt: Start Menu | Visual Studio 2013 | Visual Studio Tools | Developer Command Prompt for VS2013
* ` cd visibility-addin-dotnet\source\ArcMapAddinVisibility `
* ` msbuild ArcMapAddinVisibility.sln /property:Configuration=Release `
* To run Unit test from command prompt: Open a Visual Studio Command Prompt: Start Menu | Visual Studio 2013 | Visual Studio Tools | Developer Command Prompt for VS2013
* ` cd visibility-addin-dotnet\source\Visibility\ArcMapAddinVisibility.Tests\bin\Release `
* ` MSTest /testcontainer:ArcMapAddinVisibility.Tests.dll * `

* Note : Assembly references are based on a default install of the SDK, you may have to update the references if you chose an alternate install option

## Desktop Users
* Running the add-in
* To run from a stand-alone deployment
* ArcMap
* Install the add-in from the latest Release on Github (https://github.com/Esri/visibility-addin-dotnet/releases)
* Add the add-in command to a toolbar via menu option
* "Customize -> Customize mode"
* Select "Commands" Tab
* Select "Add-In Controls"
* Drag/Drop "Show Visibility" command onto a toolbar
* Close customize mode
* Open tool by clicking the "Show Visibility" command you just added
* Dockable visibility tool appears
* If you add this to a toolbar that you contstantly use the add-in will stay. To remove the add-in delete your [Normal.MXT](https://geonet.esri.com/thread/78692) file
## <a name="workflows"></a> Workflows - LLOS

### <a name="one-to-one-linear-line-of-sight-llos"></a> One-to-one Linear Line Of Sight (LLOS)
1. Add an elevation surface to the map.
* This may be a raster dataset, image service, or mosaic dataset.
2. Open the *Visibility Tools*
3. Select the **LLOS** tab
4. Select the **Input Surface** layer from the list
5. Use the **Observer Map Point Tool** to select an observer location on the map.
6. Use the **Target Map Point Tool** to select the target location on the map.
7. Optionally, type an **Observer Offset**, **Target Offset**, and select the offset units.
8. Select **OK**

### <a name="one-to-many-linear-line-of-sight-llos"></a> One-to-many Linear Line Of Sight (LLOS)
1. Add an elevation surface to the map.
* This may be a raster dataset, image service, or mosaic dataset.
2. Open the *Visibility Tools*
3. Select the **LLOS** tab
4. Select the **Input Surface** layer from the list
5. Use the **Observer Map Point Tool** to select an observer location on the map.
6. Use the **Target Map Point Tool** to select one or many target location on the map.
7. Optionally, type an **Observer Offset**, **Target Offset**, and select the offset units.
8. Select **OK**

### <a name="many-to-many-linear-line-of-sight-llos"></a> Many-to-many Linear Line Of Sight (LLOS)
1. Add an elevation surface to the map.
* This may be a raster dataset, image service, or mosaic dataset.
2. Open the *Visibility Tools*
3. Select the **LLOS** tab
4. Select the **Input Surface** layer from the list
5. Use the **Observer Map Point Tool** to select one or many observer location on the map.
6. Use the **Target Map Point Tool** to select one or many target location on the map.
7. Optionally, type an **Observer Offset**, **Target Offset**, and select the offset units.
8. Select **OK**

### <a name="many-to-one-linear-line-of-sight-llos"></a> Many-to-one Linear Line Of Sight (LLOS)
1. Add an elevation surface to the map.
* This may be a raster dataset, image service, or mosaic dataset.
2. Open the *Visibility Tools*
3. Select the **LLOS** tab
4. Select the **Input Surface** layer from the list
5. Use the **Observer Map Point Tool** to select many observer locations on the map.
6. Use the **Target Map Point Tool** to select one target location on the map.
7. Optionally, type an **Observer Offset**, **Target Offset**, and select the offset units.
8. Select **OK**

## Workflows - RLOS
Note that the input surface used for RLOS must be in a projected coordinate system (PCS), or the ArcMap Data Frame must be set to a PCS.

### <a name="radial-line-of-sight-rlos"></a> Radial Line Of Sight (RLOS)
1. Add an elevation surface to the map.
* This may be a raster dataset, image service, or mosaic dataset.
2. Open the *Visibility Tools*
3. Select the **RLOS** tab
4. Select the **Input Surface** layer from the list
5. Use the **Observer Map Point Tool** to select an observer location on the map.
6. Check **Symbolize Non-Visible Data in Output** to add non-visible areas to the output.
1. If unchecked the output will *only* show areas that are visible to the observers.
7. Optionally, type an **Observer Offset**, **Surface Offset**, and **Distance**, and select the appropriate units.
8. Additional options are **Horizontal Field of View** and **Vertical Field of View**, and select the appropriate units.
8. Select **OK**
* To download and run the pre-built add-in, see the instructions at [solutions.arcgis.com](http://solutions.arcgis.com/defense/help/visibility)

## Resources

* [ArcGIS 10.3 Help](http://resources.arcgis.com/en/help/)
* [ArcGIS for Defense Visibility Component](http://solutions.arcgis.com/defense/help/visibility/)
* [Military Tools for ArcGIS](https://esri.github.io/military-tools-desktop-addins/)
* [Military Tools for ArcGIS Solutions Pages](http://solutions.arcgis.com/defense/help/military-tools/)
* [ArcGIS for Defense Solutions Website](http://solutions.arcgis.com/defense)
* [ArcGIS for Defense Downloads](http://appsforms.esri.com/products/download/#ArcGIS_for_Defense)
* [ArcGIS 10.X Help](http://resources.arcgis.com/en/help/)
* [ArcGIS Pro Help](http://pro.arcgis.com/en/pro-app/)
* [ArcGIS Blog](http://blogs.esri.com/esri/arcgis/)
* ![Twitter](https://g.twimg.com/twitter-bird-16x16.png)[@EsriDefense](http://twitter.com/EsriDefense)
* [ArcGIS Solutions Website](http://solutions.arcgis.com/military/)

## Issues

Expand All @@ -155,20 +90,20 @@ Anyone and everyone is welcome to contribute. Please see our [guidelines for con

### Repository Points of Contact

#### Repository Owner: [Joe](https://github.com/jmccausland)
#### Repository Owner: [Kevin](https://github.com/kgonzago)

* Merge Pull Requests
* Creates Releases and Tags
* Manages Milestones
* Manages and Assigns Issues

#### Secondary: [Lyle](https://github.com/topowright)
#### Secondary: [Patrick](https://github.com/pHill5136)

* Backup when the Owner is away

## Licensing

Copyright 2016 Esri
Copyright 2016-2017 Esri

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -184,5 +119,5 @@ limitations under the License.

A copy of the license is available in the repository's [license.txt](license.txt) file.

[](Esri Tags: Military Analyst Defense ArcGIS ArcObjects .NET WPF ArcGISSolutions ArcMap ArcPro Add-In)
[](Esri Language: C#)
[](Esri Tags: Military Analyst Defense ArcGIS ArcObjects .NET WPF ArcGISSolutions ArcMap ArcPro Add-In Military-Tools-for-ArcGIS)
[](Esri Language: C-Sharp)
Binary file removed application/ArcMapAddinVisibility.esriAddIn
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
using ArcMapAddinVisibility.Models;
using ArcMapAddinVisibility.ViewModels;



namespace ArcMapAddinVisibility.Tests
{
[TestClass]
Expand All @@ -40,16 +38,26 @@ public class ArcMapAddinVisibilityTests
[TestCategory("ArcMapAddin")]
public static void MyClassInitialize(TestContext testContext)
{
bool blnBoundToRuntime = ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.EngineOrDesktop);
Assert.IsTrue(blnBoundToRuntime, "Not bound to runtime");
// TRICKY: Must be run as x86 processor (IntPtr.Size only obvious way to check)
// Check here, otherwise you just get a cryptic error on license call below
Assert.IsTrue(IntPtr.Size == 4,
"The ArcMap tests must be run as x86 Architecture");
// If the call above fails:
// In Studio: Test | Test Settings | Default Architecture | set to x86
// MSTest: (This defaults to x86)

if (ESRI.ArcGIS.RuntimeManager.ActiveRuntime == null)
ESRI.ArcGIS.RuntimeManager.BindLicense(ESRI.ArcGIS.ProductCode.EngineOrDesktop);
Assert.IsTrue(ESRI.ArcGIS.RuntimeManager.ActiveRuntime != null,
"No ArcGIS Desktop Runtime available");

IAoInitialize aoInitialize = new AoInitializeClass();
aoInitialize.Initialize(esriLicenseProductCode.esriLicenseProductCodeBasic);
aoInitialize.Initialize(esriLicenseProductCode.esriLicenseProductCodeStandard);
}

[TestMethod, Description("Tests converting Point to string")]
[TestCategory("ArcMapAddin")]
public void PointToStringConverterTest()
public void ArcMapPointToStringConverterTest()
{
var pointConverter = new IPointToStringConverter();
Assert.IsNotNull(pointConverter);
Expand All @@ -67,7 +75,7 @@ public void PointToStringConverterTest()

[TestMethod, Description("Tests creating AMGraphic object")]
[TestCategory("ArcMapAddin")]
public void CreateAMGraphicTest()
public void ArcMapCreateNullGraphicTest()
{
var amGraphic = new AMGraphic("tempGraphic", null);
Assert.IsNotNull(amGraphic);
Expand All @@ -80,7 +88,7 @@ public void CreateAMGraphicTest()
#region LLOSViewModel
[TestMethod, Description("Tests creating LLOSViewModel object")]
[TestCategory("ArcMapAddin")]
public void CreateLLOSViewModelTest()
public void ArcMapCreateLLOSViewModelTest()
{
var llosViewModel = new LLOSViewModel();
Assert.IsNotNull(llosViewModel);
Expand All @@ -91,34 +99,33 @@ public void CreateLLOSViewModelTest()
#region LOSBaseViewModel
[TestMethod, Description("Tests creating LOSBaseViewModel object")]
[TestCategory("ArcMapAddin")]
public void CreateLOSBaseViewModelTest()
public void ArcMapCreateLOSBaseViewModelTest()
{
var losBaseViewModel = new LOSBaseViewModel();
Assert.IsNotNull(losBaseViewModel);

Assert.IsNotNull(losBaseViewModel);
}
#endregion

#region RLOSViewModel
[TestMethod, Description("Tests creating RLOSViewModel object")]
[TestCategory("ArcMapAddin")]
public void CreateRLOSViewModelTest()
public void ArcMapCreateRLOSViewModelTest()
{
var rlosViewModel = new RLOSViewModel();
Assert.IsNotNull(rlosViewModel);
}

[TestMethod, Description("Tests creating a FeatureWorkspace")]
[TestCategory("ArcMapAddin")]
public void CreateFeatureWorkspaceTest()
public void ArcMapCreateFeatureWorkspaceTest()
{
var workspace = CreateFeatureWorkspace();
Assert.IsNotNull(workspace);
}

[TestMethod, Description("Tests creating an observers feature class")]
[TestCategory("ArcMapAddin")]
public void CreateObserversFeatureClassTest()
public void ArcMapCreateObserversFeatureClassTest()
{
var workspace = CreateFeatureWorkspace();
Assert.IsNotNull(workspace);
Expand Down Expand Up @@ -156,7 +163,7 @@ public void CreateObserversFeatureClassTest()

[TestMethod, Description("Tests start/stop edit operations")]
[TestCategory("ArcMapAddin")]
public void StartStopEditTest()
public void ArcMapStartStopEditTest()
{
IWorkspace workspace = CreateFeatureWorkspace() as IWorkspace;
Assert.IsNotNull(workspace);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@
<SpecificVersion>False</SpecificVersion>
<EmbedInteropTypes>False</EmbedInteropTypes>
</Reference>
<Reference Include="ESRI.ArcGIS.Editor, Version=10.4.0.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<EmbedInteropTypes>False</EmbedInteropTypes>
<Private>False</Private>
</Reference>
<Reference Include="ESRI.ArcGIS.Framework">
<Private>False</Private>
</Reference>
Expand Down
16 changes: 15 additions & 1 deletion source/Visibility/ArcMapAddinVisibility/CCUserControlProxy.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
using System;
// Copyright 2016 Esri
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

using System;
using System.Windows.Controls;
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.Geodatabase;
Expand Down
Binary file modified source/Visibility/ArcMapAddinVisibility/Config.Designer.cs
Binary file not shown.
Loading

0 comments on commit 5747382

Please sign in to comment.