ESRI Developer Summit 2008ESRI Developer Summit 2008 11ESRI Developer Summit 2008ESRI Developer Summit 2008 11
Matt Funk, Clark Crawford and Sekhar KafleMatt Funk, Clark Crawford and Sekhar KafleESRI Defense SolutionsESRI Defense Solutions
Developing Defense Applications using Military Developing Defense Applications using Military Analyst and Military Overlay Editor (MOLE)Analyst and Military Overlay Editor (MOLE)
ESRI Developer Summit 2008ESRI Developer Summit 2008 22
Schedule
• 75 minute session– 60 – 65 minute lecture– 10 – 15 minutes Q & A following the lecture
• Cell phones and pagers
• Please complete the session survey – we take your feedback very seriously!
ESRI Developer Summit 2008ESRI Developer Summit 2008 33
Introductions
• Who are we?– Defense Solutions
• Who are you?– Defense/Intel Developers?– Non-Defense Developers?– ArcGIS Desktop?– ArcGIS Engine?– ArcGIS Server?– .NET?– Java?– Non-Windows (Linux/Unix)?
ESRI Developer Summit 2008ESRI Developer Summit 2008 44
Session agendaSession agenda
•• Demo Application Part I (Windows)Demo Application Part I (Windows)•• What we used and how we did itWhat we used and how we did it
–– Coordinate tool and Coordinate conversion APICoordinate tool and Coordinate conversion API–– MOLE SymbolsMOLE Symbols–– Distance measures and GeodesyDistance measures and Geodesy–– Terrain Analysis toolsTerrain Analysis tools
•• Defense Solutions and ArcGIS Server Defense Solutions and ArcGIS Server
ESRI Developer Summit 2008ESRI Developer Summit 2008 44
ESRI Developer Summit 2008ESRI Developer Summit 2008 55
Session agendaSession agenda
•• Demo Application Part I (Windows)Demo Application Part I (Windows)•• What we used and how we did itWhat we used and how we did it
–– Coordinate tool and Coordinate conversion APICoordinate tool and Coordinate conversion API–– MOLE SymbolsMOLE Symbols–– Distance measures and GeodesyDistance measures and Geodesy–– Terrain Analysis toolsTerrain Analysis tools
•• Defense Solutions and ArcGIS Server Defense Solutions and ArcGIS Server
ESRI Developer Summit 2008ESRI Developer Summit 2008 55
ESRI Developer Summit 2008ESRI Developer Summit 2008 66
DEMONSTRATION 1
ESRI Developer Summit 2008ESRI Developer Summit 2008 77
Migrating from 9.2 to 9.3
• For 9.2 use MA and MOLE libraries– MilitaryAnalyst– MOLE
• For 9.3 use Defense Solutions library– DefenseSolutions
• Migration document available in ArcGIS 9.3
DefenseSolutions reference in Visual Studio
ESRI Developer Summit 2008ESRI Developer Summit 2008 88
Session agendaSession agenda
•• Demo Application Part I (Windows)Demo Application Part I (Windows)•• What we used and how we did itWhat we used and how we did it
–– Coordinate Tool and Coordinate conversion APICoordinate Tool and Coordinate conversion API•• Coordinate ToolCoordinate Tool•• Coordinate conversion APICoordinate conversion API
–– MOLE SymbolsMOLE Symbols–– Distance measures and GeodesyDistance measures and Geodesy–– Terrain Analysis toolsTerrain Analysis tools
•• Defense Solutions and ArcGIS Server Defense Solutions and ArcGIS Server
ESRI Developer Summit 2008ESRI Developer Summit 2008 88
ESRI Developer Summit 2008ESRI Developer Summit 2008 99
Coordinate ToolCoordinate Tool
• Coordinate Tool (9.2 & 9.3)
– Existing coordinate conversion interface
– DD, DMS, UTM, MGRS– 200+ datums– Input variant– Output point & strings– Simple to implement– Few coordinate
arrangements
ESRI Developer Summit 2008ESRI Developer Summit 2008 99
ESRI Developer Summit 2008ESRI Developer Summit 2008 1010
Coordinate conversion API
• Coordinate conversion (9.3)–– DMS, DD, UTM, MGRS, DMS, DD, UTM, MGRS,
USNGUSNG–– ArcGIS ArcGIS datumsdatums and spatial and spatial
referencesreferences–– Set precisionSet precision–– Parse input with Parse input with regexregex–– Format outputFormat output–– ExtensibleExtensible
ESRI Developer Summit 2008ESRI Developer Summit 2008 1111
Coordinate conversion APIChaining
D
A
C
B
Parallel Chaining
DD
DMS
UTM
Your Format
A
B
C
D
Series Chaining
DD
DMS
UTM
Your Format
ESRI Developer Summit 2008ESRI Developer Summit 2008 1212
Session agendaSession agenda
•• Demo Application Part I (Windows)Demo Application Part I (Windows)•• What we used and how we did itWhat we used and how we did it
–– Coordinate tool and Coordinate conversion APICoordinate tool and Coordinate conversion API–– MOLE SymbolsMOLE Symbols
•• OverviewOverview•• Feature layersFeature layers•• Cached GraphicsCached Graphics•• Export GraphicsExport Graphics•• Basic SymbolsBasic Symbols
–– Distance measures and GeodesyDistance measures and Geodesy–– Terrain Analysis toolsTerrain Analysis tools
•• Defense Solutions and ArcGIS Server Defense Solutions and ArcGIS Server
ESRI Developer Summit 2008ESRI Developer Summit 2008 1212
ESRI Developer Summit 2008ESRI Developer Summit 2008 1313
MOLE SymbolsMOLE Symbols
MIL-STD-2525B Change 1• DoD standard• Guidelines for unit, equipment, function• Criteria for modern battlefield scenario• Common Warfighting Symbology
APP6-A• NATO standard • Joint manual with 2525B• Same logic and structure• Same SIC in most cases
ESRI Developer Summit 2008ESRI Developer Summit 2008 1313
ESRI Developer Summit 2008ESRI Developer Summit 2008 1414
MOLE SymbolsMOLE Symbols
ESRI Developer Summit 2008ESRI Developer Summit 2008 1414
• Force Elements –Units, Equipment, and Installations
• Tactical Graphics – Operational GraphicsMilitary Operations
ESRI Developer Summit 2008ESRI Developer Summit 2008 1515
Symbol ID Code (SIC)
SS
GG
GG
PP
UU
CC
II
ZZ
--
--
FF
--
FF
UU
SS
Coding Scheme
Affiliation
Battle dimension
Status
Function ID
Echelon Size
Country Code
Order of Battle
ESRI Developer Summit 2008ESRI Developer Summit 2008 1616
Feature MOLE Symbol+ 15 Char Symbol ID =
Symbol ID Code (SIC)
ESRI Developer Summit 2008ESRI Developer Summit 2008 1717
MOLE developer scenarios
• Multiple development scenarios for ease of customization and performance level
• 9.2 and 9.3– Approach 1: Feature Layers– Approach 2: Cached Graphics/Display Lists– Approach 3: Export Graphics
• New for 9.3– Approach 4: Basic Symbols
ESRI Developer Summit 2008ESRI Developer Summit 2008 1818
MOLE Approach 1: Feature Layers
• Approach– Load an IFeatureLayer
containing MOLE data
– Attach it to a MOLE ForceElementLayer (and MOLE renderer)
– Add the ForceElementLayer to the map/globe
•For coarse-grained control, Desktop ArcGIS integration, or 3D.
ESRI Developer Summit 2008ESRI Developer Summit 2008 1919
MOLE Approach 1: Feature Layers
• Advantages
– Requires less code
– Scalable (Shapefiles to SDE)
• Disadvantages
– Less control over the appearance of individual FEGraphics
– Performance constrained by dataset (shapefile, PGDB, etc.)
ESRI Developer Summit 2008ESRI Developer Summit 2008 2020
MOLE Approach 2: Cached Graphics/Display Lists
• For fast, dynamic update of the display
• Approach: Cached Graphics– FEGraphicFactory.Make() to create force/tactical elements– ICachedGraphic.Draw in the IActiveViewEvent’s AfterDraw
• Approach: Display Lists– FEGraphicFactory.Make() to create force/tactical elements – Add to ForceElementDisplayList– ForceElementDisplayList in IActiveViewEvent’s AfterDraw
ESRI Developer Summit 2008ESRI Developer Summit 2008 2121
MOLE Approach 2: Cached Graphics/Display Lists
• Advantages– Optimum speed – DisplayLists manage graphics together
• Disadvantages– Requires most low-level ArcObjects programming of all
approaches– Only works in 2D– DisplayLists perform slower at 9.2
ESRI Developer Summit 2008ESRI Developer Summit 2008 2222
MOLE Approach 3: Export Graphics
•For interoperation with external frameworks, such as OpenGL
• Approach– Cached Graphic to ICreateBitmap or IExportGraphic
– Invoke export methods
– Use resulting imagery with the external framework
ESRI Developer Summit 2008ESRI Developer Summit 2008 2323
MOLE Approach 3: Export Graphics
• Advantages
– Allows MOLE graphics to be used in any context where imagery can be used
• Disadvantages
– Must interpret and organize the resulting image data
– All geographic information associated with the symbol is lost
ESRI Developer Summit 2008ESRI Developer Summit 2008 2424
MOLE Approach 4: Basic Symbols
• Interoperation within the ArcObjects symbology paradigm
• Approach– Anywhere you might use an ISymbol, use a MOLE symbol.
• IMoleMarkerSymbol, IMoleLineSymbol, IMoleFillSymbol
• Advantages– Easier to implement– Works well with ArcObjects cartographic framework– Good rendering performance
• Disadvantages– Less control over symbols– Only works in 2D
ESRI Developer Summit 2008ESRI Developer Summit 2008 2525
MOLE Basic Symbols
• MOLE Basic Symbols wraps the essentials for users who do not need all the customizations available in MOLE 9.2
• Existing MOLE interfaces still available at 9.3
ESRI Developer Summit 2008ESRI Developer Summit 2008 2626
Session agendaSession agenda
•• Demo Application Part I (Windows)Demo Application Part I (Windows)•• What we used and how we did itWhat we used and how we did it
–– Coordinate tool and Coordinate conversion APICoordinate tool and Coordinate conversion API–– MOLE SymbolsMOLE Symbols–– Distance measures and GeodesyDistance measures and Geodesy
•• Geodetic geometries and elementsGeodetic geometries and elements•• Measurement ToolMeasurement Tool
–– Terrain Analysis toolsTerrain Analysis tools
•• Defense Solutions and ArcGIS Server Defense Solutions and ArcGIS Server
ESRI Developer Summit 2008ESRI Developer Summit 2008 2626
ESRI Developer Summit 2008ESRI Developer Summit 2008 2727
Geodetic GeometriesGeodetic Geometries
ESRI Developer Summit 2008ESRI Developer Summit 2008 2727
• Geodetically correct geometry types– Follow correct path based on spatial reference
• Three Types– IGeoPolyline– IGeoPolygon– IGeoEllipse
• Graphic elements for display– IGeoPolylineElement– IGeoPolygonElement– IGeoEllipseElement
ESRI Developer Summit 2008ESRI Developer Summit 2008 2828
Geodetic GeometriesGeodetic Geometries
• Approach: GeoPolyline (same for GeoPolygon)– Instantiate object– Set Polyline property– Set symbol – Add geometry and symbol to GeoPolylineElement
• Approach: GeoEllipse– Instantiate object– Set center point, axes, and rotation– Set symbol– Add geometry and symbol to GeoEllipseElement
• Clone GeoGeometry object before using elsewhere in ArcObjects
ESRI Developer Summit 2008ESRI Developer Summit 2008 2929
Measurement ToolMeasurement Tool
• IMeasurementTool
• Return Distance and Direction between two points
• Returns endpoint coordinates given start point, distance, direction
• Result options:– Great Circle (Sphere)– Geodesy Line (Ellipsoid)– Rhumb Line (Line of constant
bearing)
ESRI Developer Summit 2008ESRI Developer Summit 2008 3030
Measurement ToolMeasurement Tool
• Approach– Instantiate IMeasurementTool– Set points and parameters– Use desired ConstructBy method– Get returned properties
• Advantages– Simple to use– GeoPolyline will trace path between points
ESRI Developer Summit 2008ESRI Developer Summit 2008 3131
Session agendaSession agenda
•• Demo Application Part I (Windows)Demo Application Part I (Windows)•• What we used and how we did itWhat we used and how we did it
–– Coordinate tool and Coordinate conversion APICoordinate tool and Coordinate conversion API–– MOLE SymbolsMOLE Symbols–– Distance measures and GeodesyDistance measures and Geodesy–– Terrain Analysis toolsTerrain Analysis tools
•• Programming with Terrain Analysis ToolsProgramming with Terrain Analysis Tools•• Linear Line of SightLinear Line of Sight
•• Defense Solutions and ArcGIS Server Defense Solutions and ArcGIS Server
ESRI Developer Summit 2008ESRI Developer Summit 2008 3131
ESRI Developer Summit 2008ESRI Developer Summit 2008 3232
Programming with Terrain Analysis Tools
• Terrain Analysis Geoprocessing tools in Military Analyst 9.3– Linear Line of Sight, Linear Line of Sight from Features– Radial Line of Sight– Highest / Lowest Point by Extent, Highest / Lowest Point by
Polygon
• Advantages– Distributed in script form (Python)– Works across DTED (raster) catalog tile boundaries
• Disadvantages– Performs slower than native ArcObjects
ESRI Developer Summit 2008ESRI Developer Summit 2008 3333
Terrain Analysis: Linear Line of Sight
• New Geoprocessing (GP) tool for Military Analyst 9.3
• Is target visible from observer?
• Approach:– Create a geoprocessor– Add Military Analyst toolbox– IVariantArray of parameters– Run the Linear Line of Sight– Get results from IGeoProcessorResult
ESRI Developer Summit 2008ESRI Developer Summit 2008 3434
ArcObjects: GetLineOfSight
• Approach:– If input is DTED Catalog, mosaic tiles– 3D IPoint for observer with elevation and offset– 3D IPoint for target with elevation and offset– ISurface.GetLineOfSight
– IGeoDatabaseBridge2.GetLineOfSight (for .NET)
• Advantages– Native ArcObjects, better performance
• Disadvantages– Need to preprocess inputs
ESRI Developer Summit 2008ESRI Developer Summit 2008 3535
Linear Line of Sight Pseudocode
1. Set Geoprocessor2. Read arguments3. Check 3D license4. Determine the analysis area5. Mosaic and clip surface
catalog6. Create observer & target
points7. Create 2D polyline8. Run 3D Line of Sight9. Set outputs and clean up
ESRI Developer Summit 2008ESRI Developer Summit 2008 3636
Session agendaSession agenda
•• Demo Application Part I (Windows)Demo Application Part I (Windows)•• What we used and how we did itWhat we used and how we did it
–– Coordinate tool and Coordinate conversion APICoordinate tool and Coordinate conversion API–– MOLE SymbolsMOLE Symbols–– Distance measures and GeodesyDistance measures and Geodesy–– Line of SightLine of Sight
•• Defense Solutions and ArcGIS Server Defense Solutions and ArcGIS Server
ESRI Developer Summit 2008ESRI Developer Summit 2008 3636
ESRI Developer Summit 2008ESRI Developer Summit 2008 3737
Session agendaSession agenda
•• Demo Application Part I (Windows)Demo Application Part I (Windows)•• What we used and how we did itWhat we used and how we did it
–– Coordinate tool and Coordinate conversion APICoordinate tool and Coordinate conversion API–– MOLE SymbolsMOLE Symbols–– Distance measures and GeodesyDistance measures and Geodesy–– Line of SightLine of Sight
•• Defense Solutions and ArcGIS Server Defense Solutions and ArcGIS Server –– MOLE development approachesMOLE development approaches–– Military Analyst functionsMilitary Analyst functions–– Defense Solutions Web ADFDefense Solutions Web ADF
ESRI Developer Summit 2008ESRI Developer Summit 2008 3737
ESRI Developer Summit 2008ESRI Developer Summit 2008 3838
Defense Solutions on ArcGIS Server
ArcObjectsArcObjects
ArcGIS Map ArcGIS Map ServerServer
Defense Defense Server Server Web Web
ServicesServices
Defense Defense Server Server LocalLocal
ArcGIS Server WEB ADFArcGIS Server WEB ADF
Defense Solutions WEB ADFDefense Solutions WEB ADF
ESRI Developer Summit 2008ESRI Developer Summit 2008 3939
Defense Solutions on Server: MOLE
MOLE Development Approaches
• Approach 1: Publish MOLE FeatureLayer using MXD as Map Service
• Approach 2: Add Basic Symbols as custom elements
• Approach 3: Use MOLE Server Extension to generate map image with symbol overlay
• Approach 4: MOLE Server Extension to generate individual symbol images
ESRI Developer Summit 2008ESRI Developer Summit 2008 4040
Defense Solutions on Server: MOLE
Approach 1:Publish MOLE FeatureLayer using MXD as Map Service
• Approach– Add MOLE FeatureLayer to MXD– Publish MXD as Map Service– Consume Map Service in client
• Advantages– No programming required– Use existing data sources (Shapefile, GDB, SDE, etc.)
• Disadvantages– Data must be static feature class, no dynamic data source– Difficult to modify symbols on client side
ESRI Developer Summit 2008ESRI Developer Summit 2008 4141
Defense Solutions on Server: MOLE
Approach 2:Add Basic Symbols as custom elements
• Approach– Set IMOLESymbols and geometry to IGraphicElement– Add to MapDescription– Export map image
• Advantages– Do not need Feature Class– Easy to construct symbols from any dynamic data source– Declutter symbols (leadering and stacking)
• Disadvantages– Can not query, identify, etc.– Requires ArcGIS Server Map Service
ESRI Developer Summit 2008ESRI Developer Summit 2008 4242
Defense Solutions on Server: MOLE
Approach 3:Use MOLE Server Extension to generate map image with symbol overlay
• Approach– Set IMOLESymbols and geometry to IGraphicElement– Add to MOLEDescription– Export transparent map image
• Advantages– Do not need Feature Class– Easy to construct symbols from any dynamic data source– Declutter symbols (leadering and stacking)– Do not need ArcGIS Server Map Service
• Disadvantages– Can not query, identify, etc.
ESRI Developer Summit 2008ESRI Developer Summit 2008 4343
Defense Solutions on Server: MOLE
Approach 4:MOLE Server Extension to generate individual symbol images
• Approach– Set IMOLESymbol to IGraphicElement– Add single symbol to MOLEDescription– Export symbol image
• Advantages– Do not need Feature Class– Easy to construct symbols from any dynamic data source– Do not need ArcGIS Server Map Service– Can be used in mashup, 3rd party client
• Disadvantages– Can not query, identify, etc.
ESRI Developer Summit 2008ESRI Developer Summit 2008 4444
MOLE Development Approach Summary
YESYESYESNOClient Editing
YESYESNONOMashup
NONOYESYESNeeds Map Service
NONONOYESQuery, Identify
NOYESYESYESDecluttering
YESYESYESNODynamic data
YESYESYESYESExisting data sources
NONONOYESNo programming
Individual ImagesSOE OverlayCustom SymbolsPublish MXD
ESRI Developer Summit 2008ESRI Developer Summit 2008 4545
Defense Solutions on Server: Military Analyst
• Geodetic Measurement– Distance and Azimuth calculation– Endpoint calculation
• Geodetic Geometries– Generate GeoPolyline and return as simple polyline– Generate GeoPolygon and return as simple polygon– Generate GeoEllipse and return as simple polygon
ESRI Developer Summit 2008ESRI Developer Summit 2008 4646
Defense Solutions on Server: Military Analyst
Geodetic Measurement
• Distance and Azimuth calculation– Input start point and endpoint– Output are distance and azimuth
• Endpoint calculation– Input are start point, distance and azimuth– Output is endpoint
ESRI Developer Summit 2008ESRI Developer Summit 2008 4747
Defense Solutions on Server: Military Analyst
Geodetic Geometries
• Generate GeoPolyline and return as simple polyline– Input simple polyline– Output geodetically correct polyline
• Generate GeoPolygon and return as simple polygon– Input simple polygon– Output geodetically correct polygon
• Generate GeoEllipse and return as simple polygon– Input center point, axes and rotation– Output geodetically correct ellipse as polygon
ESRI Developer Summit 2008ESRI Developer Summit 2008 4848
Defense Solutions Server: DS Web ADF
• Extends core ArcGIS Server Web ADF
• Contains custom API to access– Military Analyst Server Object Extension as GIS resources– MOLE Server Object Extension as GIS resources– Support as local and web service access
• Contains built-in tools and task– Military Analyst Task and MOLE Task
• .NET and Java support
ESRI Developer Summit 2008ESRI Developer Summit 2008 4949
DEMONSTRATION 2
ESRI Developer Summit 2008ESRI Developer Summit 2008 5050
In ConclusionIn Conclusion……
•• Slides and code will be available on EDNSlides and code will be available on EDN–– http://edn.esri.comhttp://edn.esri.com
•• Please fill out session surveys!Please fill out session surveys!
•• Still have questions?Still have questions?1.1.Tech talkTech talk2.2.““Ask a DeveloperAsk a Developer”” link on web pagelink on web page
ESRI Developer Summit 2008ESRI Developer Summit 2008 5050
ESRI Developer Summit 2008ESRI Developer Summit 2008 5151
Additional Resources
• ESRI Developer Network– http://edn.esri.com/
• EDN Code Exchange (Samples and Scripts) – http://edn.esri.com/index.cfm?fa=codeExch.gateway
• ESRI Support Center– http://support.esri.com/
ESRI Developer Summit 2008ESRI Developer Summit 2008 5252
Additional Defense Solutions Resources
• ESRI Defense– http://www.esri.com/defense
• Defense Solutions Homepage– http://www.esri.com/software/arcgis/defense-solutions– Downloads for MA and MOLE
• Defense Solutions Forum– http://forums.esri.com/forums.asp?c=5
• Introduction to ArcGIS Military Analyst 9.2– http://training.esri.com/acb2000/showdetl.cfm?DID=6&Product_I
D=898
ESRI Developer Summit 2008ESRI Developer Summit 2008 5353
Military Analyst and MOLE Samples
• Military Analyst:– MALocateCoordinates– MAGeodesyMapControl– Create a GeoEllipse object in ArcMap (VBA only)– Create a GeoPolygon object in ArcMap (VBA only)– Create a GeoPolyline object in ArcMap (VBA only)– Add a DTED Catalog to ArcMap (VBA only)– Add a RPF Catalog to ArcMap (VBA only)
• MOLE:– MOLESymbols– MOLEDisplay– MOLEGlobeControl– MOLEManualGroupDraw