arcpy & raster processing in arcgis 10 - Montana Association of
Symbology Automation using ArcPy
-
Upload
qust04 -
Category
Engineering
-
view
130 -
download
2
description
Transcript of Symbology Automation using ArcPy
![Page 1: Symbology Automation using ArcPy](https://reader036.fdocuments.net/reader036/viewer/2022081122/53f4fb538d7f728e318b4a3b/html5/thumbnails/1.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022081122/53f4fb538d7f728e318b4a3b/html5/thumbnails/2.jpg)
Contents
Introduction
Objectives
Method used
Core code
![Page 3: Symbology Automation using ArcPy](https://reader036.fdocuments.net/reader036/viewer/2022081122/53f4fb538d7f728e318b4a3b/html5/thumbnails/3.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022081122/53f4fb538d7f728e318b4a3b/html5/thumbnails/4.jpg)
Why python in Arc GIS
Use scripting to develop, execute, and share geo-
processing workflows
Improves productivity
![Page 5: Symbology Automation using ArcPy](https://reader036.fdocuments.net/reader036/viewer/2022081122/53f4fb538d7f728e318b4a3b/html5/thumbnails/5.jpg)
OBJECTIVE
To automate the Symbology process in Arc GIS no
matter what type the input is
![Page 6: Symbology Automation using ArcPy](https://reader036.fdocuments.net/reader036/viewer/2022081122/53f4fb538d7f728e318b4a3b/html5/thumbnails/6.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022081122/53f4fb538d7f728e318b4a3b/html5/thumbnails/7.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022081122/53f4fb538d7f728e318b4a3b/html5/thumbnails/8.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022081122/53f4fb538d7f728e318b4a3b/html5/thumbnails/9.jpg)
Contd…
arcpy.mapping.InsertLayer(change_view, refLayer,
insertLayer, "BEFORE")
arcpy.Describe()
arcpy.ApplySymbologyFromLayer_management()
![Page 10: Symbology Automation using ArcPy](https://reader036.fdocuments.net/reader036/viewer/2022081122/53f4fb538d7f728e318b4a3b/html5/thumbnails/10.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022081122/53f4fb538d7f728e318b4a3b/html5/thumbnails/11.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022081122/53f4fb538d7f728e318b4a3b/html5/thumbnails/12.jpg)