Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
ArcPy and ArcGIS: Geospatial Analysis with Python

You're reading from   ArcPy and ArcGIS: Geospatial Analysis with Python Use the ArcPy module to automate the analysis and mapping of geospatial data in ArcGIS

Arrow left icon
Product type Paperback
Published in Feb 2015
Publisher
ISBN-13 9781783988662
Length 224 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (14) Chapters Close

Preface 1. Introduction to Python for ArcGIS FREE CHAPTER 2. Configuring the Python Environment 3. Creating the First Python Script 4. Complex ArcPy Scripts and Generalizing Functions 5. ArcPy Cursors – Search, Insert, and Update 6. Working with ArcPy Geometry Objects 7. Creating a Script Tool 8. Introduction to ArcPy.Mapping 9. More ArcPy.Mapping Techniques 10. Advanced Geometry Object Methods 11. Network Analyst and Spatial Analyst with ArcPy 12. The End of the Beginning Index

Running the script in the Python Window


Open up the map document called MapAdjust.mxd if it is not open already. Open the Python Window and right click in the window. Select Load from the menu. When the file dialog opens, find the script called Chapter8_6_AdjustmapCURRENT.py and select it, making sure that the file paths within it are correct. Push OK and it will load in the Python Window. Push Enter once the script is loaded to run the script. It can take a few seconds or more for it to be obvious that the script is running.

Note

Note that the Python Window is not a great place to execute ArcPy scripts in most cases, as it is somewhat limited when compared to IDEs. Using it to load and execute a script that performs these map document adjustments is one of the best uses of the Python Window.

Once the script is running, the adjustments to the map document will begin to appear and repeat. This is a fascinating process, as the effects of running the script are visible in a manner that is not...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime