Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Sweet Spot for Spatial Analysis: Using Online Content

Similar presentations


Presentation on theme: "The Sweet Spot for Spatial Analysis: Using Online Content"— Presentation transcript:

1 The Sweet Spot for Spatial Analysis: Using Online Content
Charlie Frye, Caitlin Scopel, Michael Dangermond, ESRI

2 Why do Spatial Analysis with Online Services?
Your Desktop Web Device Never download data again No pre-processing Reduced risk of processing errors Increased productivity Large selection of Ready-To-Use layers Use the most current data Real-time or near-real-time services Historical data available in many cases too Living Atlas Online Content and Services

3 What You Will Learn Types of online content
The Living Atlas. What’s there, why it’s different from ArcGIS Online Content How to perform analysis with online content

4 What We Mean When We Say: “Analysis”
Input e.g. Temperature Data Transformation Geoprocessing Interpolation Model Output Map of projected Temperatures) No local data required Output can be to a desktop computer or your online account.

5 Online Content as Inputs to Analysis
Imagery Layer – Image service – raster data – probably good for analysis Map Image Layers - possibly good for analysis Cached – analysis is not possible Dynamic – possibly good for analysis Single layer – worth a try (depends on how it was served) Group layers – not possible Tile Layers – Map service – Cached – not for analysis Feature Layers – Map service, feature access enabled – vector data – good for analysis Designed for editing, draws slower than a dynamic map service

6 Other Online Analysis Concepts
Online Analysis Options Built-in Analysis Tools Enrichment Proximity Geoprocessing Services Geocoding Services 3d Time Series

7 ArcGIS Online and The Living Atlas
The Living Atlas is the BEST of ArcGIS Online Curated by Esri Employees Ready to use across the Platform The Collection is growing and changing on a daily basis…

8 Network Analysis Charlie Frye

9 Enrichment Charlie Frye

10 Time-Enabled Services
Michael Dangermond

11 Analysis With Near Real-Time Data
Caitlin Scopel

12 NAIP Imagery Services Charlie Frye

13 Elevation Services Charlie Frye

14 Working with an image service in python
Connect to online rasters, use them in python Set your destination environment. projection Snap raster Create a connection file which can be used to connect to a GIS server. Use the connection file to make an image server layer. Optional: Copy raster from the image server layer

15 Extracting your own raster from an image service
Example: Retrieving a piece of the landforms service from the landscape server for local analysis sr = arcpy.SpatialReference(54009) arcpy.env.outputCoordinateSystem = sr arcpy.mapping.CreateGISServerConnectionFile("USE_GIS_SERVICES", scratchFolder, service, serviceUrl, "ARCGIS_SERVER", '', '', userName, passWord, "SAVE_USERNAME") arcpy.management.MakeImageServerLayer(Url, imageLayer, extentLayer,"#","#","#","#","#",cellsize) service = "landscape7.ags" serviceUrl = " Url = os.path.join(tempFolder, "landscape7", "World_Landforms_Improved_Hammond_Method" + ".ImageServer“) imageLayer = Landforms extentLayer = str(ext.XMin) + " " + str(ext.YMin) + " " + str(ext.XMax) + " " + str(ext.YMax) cellsize = 30

16 CreateGISServerConnectionFile
Parameters out_folder_path = tempfile.mkdtemp(prefix="agd_") out_name = "landscape7.ags" server_url= " arcpy.mapping.CreateGISServerConnectionFile("USE_GIS_SERVICES", out_folder_path, out_name, server_url, "ARCGIS_SERVER", '', '', userName, passWord, "SAVE_USERNAME") out_folder_path = In this example Deniz and I had the output go into a temporary folder. You can create a temporary folder with python this way. You can make a little loop that copies data down into a temporary folder as TIFF images. out_name= "landscape7.ags“ this is the connection file that is created. .ags must be the file extension. serviceUrl = “ userName and passWord you can supply your server username and password here through variables, completely unsecurely, or build a form which pesters you for them each time you run the script. CreateGISServerConnectionFile (connection_type, out_folder_path, out_name, server_url, server_type, {use_arcgis_desktop_staging_folder}, {staging_folder_path}, {username}, {password}, {save_username_password})

17 MakeImageServerLayer
Parameters In_image_service = os.path.join(tempFolder, "landscape7", "World_Landforms_Improved_Hammond_Method" + ".ImageServer") out_imageserver_layer = "Landforms" template = str(ext.XMin) + " " + str(ext.YMin) + " " + str(ext.XMax) + " " + str(ext.YMax) arcpy.management.MakeImageServerLayer(in_image_service, out_imageserver_layer, template,"#","#","#","#","#",cellsize) service = "landscape7.ags" serviceUrl = " in_image_service = For the Url variable here we used os.path.join to pass a clean string made up of a temporary folder, the server landscape7, the service name which is the world landforms service, and dot imageserver at the end. The out_imageserver_layer here is just an output filename. For the template variable, build a little for loop which looks up that field in your feature layer or feature class. There is an extent object that you can get with a search cursor and then you get the xmin ymin xmax ymax properties from that extent object. The cellsize is just a value was the closest to native cellsize for this service in Mollweide projection. MakeImageServerLayer_management (in_image_service, out_imageserver_layer, {template}, {band_index}, {mosaic_method}, {order_field}, {order_base_value}, {lock_rasterid}, {cell_size}, {where_clause}, {processing_template})

18 Summary of service types with analysis context
Apps Service Type ArcGIS Online ArcGIS Desktop ArcGIS Pro Imagery Layer No Yes* Yes* Yes* Map Image Layer (Dynamic) Yes** No No Yes** Feature Layer Yes Yes Yes Yes * Web Mercator Projection must be managed ** For single layer dynamic map services

19 Thinking about web-based analysis
Think about how to use online content first rather than last. Online analysis is just as powerful, and sometimes more powerful than desktop analysis.

20 After the Conference… Download this presentation from Proceedings.esri.com or Or US:

21 Similar Technical Workshops
Tuesday 3:15-4:15: Rethinking How You Style Your Online Maps 3:15-4:30: Working with Feature Layers Wednesday 9:30-10:15: Working with Elevation Services 10:15-11:30: Understanding Earth: Spatial Analysis with Online Raster Content 1:30-2:45: Story Maps: Great Story Maps and How To Emulate Them 3:15-4:30: Participating in the Living Atlas of the World 3:30-4:15: Configure and Manage an ArcGIS Online Organization Thursday 10:15-11:30: ArcGIS Online Content: Living Atlas of the World 10:15-11:30: ArcGIS Online: Data Exploration with Smart Mapping

22 Please take our Survey Find your event in the Esri Events App
Your feedback allows us to help maintain high standards and to help presenters Find your event in the Esri Events App Find the session you want to review Scroll down to the bottom of the session Answer survey questions and submit

23

24

25


Download ppt "The Sweet Spot for Spatial Analysis: Using Online Content"

Similar presentations


Ads by Google