symbology automation using arcpy

12
MINIPROJECT ON SYMBOLOGY AUTOMATION USING ARCPY Presented by: Jyoti Dhakal (07) Archana K.C (09) Megha Shrestha (27) Sushmita Timilsina (32)

Upload: qust04

Post on 19-Aug-2014

125 views

Category:

Engineering


2 download

DESCRIPTION

Easy and simple programming for symbology automation in Arc GIS

TRANSCRIPT

Page 1: Symbology Automation using ArcPy

MINIPROJECT ON

SYMBOLOGY AUTOMATION

USING ARCPY

Presented by:

Jyoti Dhakal (07)

Archana K.C (09)

Megha Shrestha (27)

Sushmita Timilsina (32)

Page 2: Symbology Automation using ArcPy

Contents

Introduction

Objectives

Method used

Core code

Page 3: Symbology Automation using ArcPy

Introduction GIS is a system of collecting, preparing, processing,

analysing, interpreting, evaluating and disseminating

geographical data to information.

“Python is an easy to learn, powerful language with high-

level data structures and a simple but effective approach to

object-oriented programming. Python’s elegant syntax and

dynamic typing make it an ideal language for scripting in

many areas and on most platforms.”

Page 4: Symbology Automation using ArcPy

Why python in Arc GIS

Use scripting to develop, execute, and share geo-

processing workflows

Improves productivity

Page 5: Symbology Automation using ArcPy

OBJECTIVE

To automate the Symbology process in Arc GIS no

matter what type the input is

Page 6: Symbology Automation using ArcPy

Module used

arcpy.mapping()

arcpy.mapping provides ability to automate updating of

map documents components such as layers, layout elements

without the need of opening every single documents.

Page 7: Symbology Automation using ArcPy

GUI

Python provides various options for developing graphical

user interfaces (GUIs). We are using Tkinter for our mini

project:

Tkinter: Tkinter is the Python interface to the Tk GUI

toolkit shipped with Python.

Page 8: Symbology Automation using ArcPy

Methods used mxd=arcpy.mapping.MapDocument(r"Current")

mxd.save() #saving map document

arcpy.mapping.ListDataFrames(mxd)

arcpy.RefreshActiveView()

arcpy.mapping.ListLayers(mxd, '*', change_view)

Page 9: Symbology Automation using ArcPy

Contd…

arcpy.mapping.InsertLayer(change_view, refLayer,

insertLayer, "BEFORE")

arcpy.Describe()

arcpy.ApplySymbologyFromLayer_management()

Page 10: Symbology Automation using ArcPy

CORE CODE

if type == "Polygon":

arcpy.ApplySymbologyFromLayer_management(ins_lyr, r"E:\kam

haru\4th year 2nd sem\python\mini_projectdata\Zones.lyr")

elif type == "Polyline":

arcpy.ApplySymbologyFromLayer_management(ins_lyr, r"E:\kam

haru\4th year 2nd sem\python\mini_projectdata\Roads.lyr")

elif type == "Point":

arcpy.ApplySymbologyFromLayer_management(ins_lyr, r"E:\kam

haru\4th year 2nd sem\python\mini_projectdata\Settlements.lyr")

Page 11: Symbology Automation using ArcPy

APPLICATION

This program will be highly applicable when we

are doing same process again and again several

time for similar type of data to obtain similar type

of output

Page 12: Symbology Automation using ArcPy