GIS: The Futures So Bright, I Gotta Wear Shades
-
Upload
james-fee -
Category
Technology
-
view
196 -
download
1
Transcript of GIS: The Futures So Bright, I Gotta Wear Shades
Photo by sylvar - http://flic.kr/p/o8EML
Ph
oto
by d
rmacro
-h
ttp://flic.kr/p
/83
i2aa
Problems with Wizards
• Wizards cause us to conform
• Options are either preset or
confusing
• Lack of documenting the
process
With the Command Line• Freedom to work with the data as you want
• Better understanding of the commands
• Combined with scripting you have a recipe
for future work. AKA documentation!
The “New” Way
• Start up ArcCatalog (wait 2-4 min while it loads)
• Browse for toolbox (clicking through the endless tree)
• Open tool dialog
• Browse for input dataset
• Browse for any optional data for analysis
• Browse for an output location
• Fill out options
• Click OK and pray it doesn’t crash
Photo by TheNixer - http://flic.kr/p/yZvyU
Photo by TheNixer - http://flic.kr/p/yZvyU
The “Classic” Way
• Start up Command Prompt (about a second)
• Type simple command (BUILD, CLIP, etc)
• Hit Enter
• Tell everyone how hard it was
Scripting With GIS• AML
• SML
• Avenue
• Visual Basic for Applications *
• VBScript
• JavaScript
• Perl
• Tcl
• Python
Where is Python Used?
• GIS Applications (ArcGIS, QGIS, Safe FME,
Autodesk)
• Web Frameworks (WeoGeo.com, Google)
• Anywhere (Corel, Civilization, Gmail)
• Become the de-facto scripting language
ArcPy, the New Command
Line• Much like the Arc prompt and AML, ArcPy and Python
give us a powerful analysis and scripting method.
• ArcPy builds on the commands we learned 15 years ago.
• ArcPy is integrated in ArcMap
• Python can be extended to other GIS platforms such as
QGIS.
Python Scripting With ArcPyimport arcpy
from arcpy import env
env.workspace = "c:/workspace"
#variables
in_features = "soils.shp"
clip_features = "study_boundary.shp"
out_feature_class = "c:/workspace/output/study_area_soils.shp"
xy_tolerance = ""
# Execute Clip
arcpy.Clip_analysis(in_features, clip_features,
out_feature_class, xy_tolerance)
Export to KML
import arcpy
arcpy.CheckOutExtension(“3D”)
env.workspace = "c:/workspace"
# variables
in_feature = "c:/data/TIGER2009/04/ARIZONA/tl_2009_04_county.lyr"
out_feature = "c:/temp/output.kmz"
# Execute KML Export
arcpy.LayerToKML_conversion(in_feature, out_feature,1)
Where GIS is headed…
1. Mobile
2. Hosted
3. Specialized
4. Generalized
5. Scripted
6. 3D
7. Responsive