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

What is a Python script?


Let's start with the very basics of writing and executing a Python script. What is a Python script? It is a simple text file that contains a series of organized commands written in a formalized language. The text file has the extension .py, but other than that, there is nothing to distinguish it from any other text file. It can be opened using a text editor such as Notepad or Wordpad, but the magic that is Python does not reside in a Python script. Without the Python interpreter, a Python script cannot be run and the commands it contains cannot be executed.

How Python executes a script

Understanding how Python works to interpret a script and then execute the commands within is as important as understanding the Python language itself. Hours of debugging and error checking can be avoided by taking the time to set up Python correctly. The interpretive nature of Python means that a script will have to be first converted into bytecode before it can be executed. We will...

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