creating mosaic datasets and publishing image services ... · creating mosaic datasets and...

23
Creating Mosaic Datasets and Publishing Image Services using Python Jie Zhang & Melanie Harlow

Upload: others

Post on 18-Aug-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: creating mosaic datasets and publishing image services ... · Creating Mosaic Datasets and Publishing Image Services using Python Jie Zhang & Melanie Harlow . ... Provides dynamic

Creating Mosaic Datasets and Publishing Image Services using

Python Jie Zhang & Melanie Harlow

Page 2: creating mosaic datasets and publishing image services ... · Creating Mosaic Datasets and Publishing Image Services using Python Jie Zhang & Melanie Harlow . ... Provides dynamic

Overview

• ArcGIS 10.1 • Mosaic dataset • Raster product (NEW) • Image service • Using Python

- To create - To publish - To use

Page 3: creating mosaic datasets and publishing image services ... · Creating Mosaic Datasets and Publishing Image Services using Python Jie Zhang & Melanie Harlow . ... Provides dynamic

What is the mosaic dataset?

• A geodatabase data model used to catalog and process your collections of imagery

- Stored as a table and viewed as a table or image

• Indirect pixel management - Images can remain in their native format on disk or be

loaded into the geodatabase

• Unlimited size* • Provides dynamic mosaicking and

on-the-fly processing • License to create/edit – Standard or Advanced

Page 4: creating mosaic datasets and publishing image services ... · Creating Mosaic Datasets and Publishing Image Services using Python Jie Zhang & Melanie Harlow . ... Provides dynamic

Building a mosaic dataset

Simple workflow 1. Create mosaic dataset 2. Add imagery (raster type) 3. Optionally, edit properties and functions

Page 5: creating mosaic datasets and publishing image services ... · Creating Mosaic Datasets and Publishing Image Services using Python Jie Zhang & Melanie Harlow . ... Provides dynamic

Creating mosaic datasets in python

• Mosaic Dataset toolset - Create Mosaic Dataset tool - Add Rasters To Mosaic Dataset tool

• All tools are accessible through arcpy

• Useful python API - Iterator

- ListRasters - Cursors from arcpy.da

- arcpy.da.SearchCursor - arcpy.da.UpdateCursor

Page 6: creating mosaic datasets and publishing image services ... · Creating Mosaic Datasets and Publishing Image Services using Python Jie Zhang & Melanie Harlow . ... Provides dynamic

Customizing mosaic datasets

1. Customize raster type (art.xml) 2. Add / join / calculate fields 3. Edit properties 4. Edit raster function (rft.xml) 5. Pyramids, statistics, overviews, color correction,

seamlines 6. Create referenced mosaic dataset

Page 7: creating mosaic datasets and publishing image services ... · Creating Mosaic Datasets and Publishing Image Services using Python Jie Zhang & Melanie Harlow . ... Provides dynamic

Raster products – NEW

• Simplifies using sensor data - Quick and easy visualization of common band

combinations - Simple drag-n-drop, less clicking

• Key metadata - Sensor name - Acquisition date - Wavelength

• Function templates - Multispectral, Pansharpen

• Temporary function raster dataset

Page 8: creating mosaic datasets and publishing image services ... · Creating Mosaic Datasets and Publishing Image Services using Python Jie Zhang & Melanie Harlow . ... Provides dynamic

Data discovery & mosaic dataset customization

Page 9: creating mosaic datasets and publishing image services ... · Creating Mosaic Datasets and Publishing Image Services using Python Jie Zhang & Melanie Harlow . ... Provides dynamic

What is an image service?

• It is imagery or raster data made available by a server to a client application

Page 10: creating mosaic datasets and publishing image services ... · Creating Mosaic Datasets and Publishing Image Services using Python Jie Zhang & Melanie Harlow . ... Provides dynamic

What can you do with an image service?

• Use it as an image (visual analysis) • Use it as raster data (pixel analysis) • Access it as a catalog (mosaic dataset)

Page 11: creating mosaic datasets and publishing image services ... · Creating Mosaic Datasets and Publishing Image Services using Python Jie Zhang & Melanie Harlow . ... Provides dynamic

Image service source data

• Data sources - Raster datasets - Mosaic datasets

- Requires ArcGIS Server Image Extension

- Raster or mosaic layers - To control rendering - Preset some layer properties - Predefined query

Page 12: creating mosaic datasets and publishing image services ... · Creating Mosaic Datasets and Publishing Image Services using Python Jie Zhang & Melanie Harlow . ... Provides dynamic

How can you access an image service?

• ArcGIS Desktop • ArcGIS Explorer • Web APIs (Silverlight, Flex, JavaScript) • ArcGIS.com • REST, SOAP • WMS, WCS, KML • 3rd Party Applications

Page 13: creating mosaic datasets and publishing image services ... · Creating Mosaic Datasets and Publishing Image Services using Python Jie Zhang & Melanie Harlow . ... Provides dynamic

Publishing an image service

• New publishing workflow • Register databases • Share from data source • Requires service definition (.sd)

Page 14: creating mosaic datasets and publishing image services ... · Creating Mosaic Datasets and Publishing Image Services using Python Jie Zhang & Melanie Harlow . ... Provides dynamic

Publishing interface

Page 15: creating mosaic datasets and publishing image services ... · Creating Mosaic Datasets and Publishing Image Services using Python Jie Zhang & Melanie Harlow . ... Provides dynamic

Publishing interface – Capabilities

Page 16: creating mosaic datasets and publishing image services ... · Creating Mosaic Datasets and Publishing Image Services using Python Jie Zhang & Melanie Harlow . ... Provides dynamic

Publishing interface – Operations

Page 17: creating mosaic datasets and publishing image services ... · Creating Mosaic Datasets and Publishing Image Services using Python Jie Zhang & Melanie Harlow . ... Provides dynamic

Publishing interface – Parameters

Page 18: creating mosaic datasets and publishing image services ... · Creating Mosaic Datasets and Publishing Image Services using Python Jie Zhang & Melanie Harlow . ... Provides dynamic

Publishing interface – Parameters

Page 19: creating mosaic datasets and publishing image services ... · Creating Mosaic Datasets and Publishing Image Services using Python Jie Zhang & Melanie Harlow . ... Provides dynamic

Service REST Admin API – Create Service

• Service administration - Create service - Edit service configuration - Delete service

• Generate token to use admin API • URL sample 1:

- http://skye:6080/arcgis/admin/services/createService?service=....&token=....

• URL sample 2: - http://skye:6080/arcgis/admin/services/Portland_wNDVI.I

mageServer/edit?service=...&token=...

Page 20: creating mosaic datasets and publishing image services ... · Creating Mosaic Datasets and Publishing Image Services using Python Jie Zhang & Melanie Harlow . ... Provides dynamic

REST requests through Python

• Requires service definition (.sd) or JSON file • Make REST calls in python packages

- urllib2 - json

Page 21: creating mosaic datasets and publishing image services ... · Creating Mosaic Datasets and Publishing Image Services using Python Jie Zhang & Melanie Harlow . ... Provides dynamic

Publish and use image services in Python

Page 22: creating mosaic datasets and publishing image services ... · Creating Mosaic Datasets and Publishing Image Services using Python Jie Zhang & Melanie Harlow . ... Provides dynamic

Summary

• Find imagery using raster product • Create and edit a mosaic dataset • Publish and edit the properties of an image service • Using the REST admin API to publish and edit the

service in Python - JSON

• Use an image service as a data source

• Resourcesbeta.arcgis.com/imagery

Page 23: creating mosaic datasets and publishing image services ... · Creating Mosaic Datasets and Publishing Image Services using Python Jie Zhang & Melanie Harlow . ... Provides dynamic