Cargando…

ArcPy and ArcGIS - Second Edition.

Use Python modules such as ArcPy, ArcREST and the ArcGIS API for Python to automate the analysis and mapping of geospatial data. About This Book Perform GIS analysis faster by automating tasks. Access the spatial data contained within shapefiles and geodatabases and transform between spatial referen...

Descripción completa

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Toms, Silas
Otros Autores: O'Beirne, Dara
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Birmingham : Packt Publishing, 2017.
Edición:2nd ed.
Temas:
Acceso en línea:Texto completo
Tabla de Contenidos:
  • Cover ; Copyright; Credits; Foreword; About the Authors; About the Reviewers; www.PacktPub.com; Customer Feedback; Table of Contents; Preface; Chapter 1: Introduction to Python for ArcGIS; Python as a programming language; Interpreted language; Standard (built-in) library; Glue language; Wrapper modules; The basics of Python programming; Import statements; Variables; For loops; If/Elif/Else statements; While statements; Comments; Data types; Strings; Integers; Floats; Data containers; Zero-based indexing; Lists; Tuples; Dictionaries; Other important concepts; Indentation; Functions; Keywords.
  • NamespacesImportant Python modules; The OS (operating system) module; The sys (Python system) module; The CSV, XLRD, and XLWT modules; Commonly used built-in functions; Standard library modules; How Python executes a script; What is a Python script?; Python interpreter; Where is the Python interpreter located?; Which Python interpreter should be used?; How does the machine know where the interpreter is?; Make Python scripts executable when clicked; Integrated Development Environments (IDEs); IDLE; PythonWin; Atom, Notepad++, and Sublime Text; IDE summary; Python folder structure.
  • Where modules resideInstalling a third-party module; Using Python's sys module to add a module; The sys.path.append method; Summary; Chapter 2: Creating the First Python Script; Prerequisites; ModelBuilder; Creating a model and exporting to Python; Modeling the Select and Buffer tools; Adding in the Intersect tool; Tallying the analysis results; Exporting the model and adjusting the script; The Automatically generated script; File paths in Python; String manipulation; String manipulation method 1: string addition; String manipulation method 2: string formatting #1.
  • String manipulation method 3: string formatting #2The ArcPy tools; The Intersect tool; Adjusting the script; Adding the CSV module to the script; Accessing the data: using a cursor; Exceptions and tracebacks; Overwriting files; The final script; Summary; Chapter 3: ArcPy Cursors
  • Search, Insert, and Update; Python functions
  • avoid repeating code; Technical definition of functions; The first function; Functions with parameters; Using functions to replace repetitive code; The createCSV function; Creating an XLS using XLWT; The data access module; Search cursors; Attribute field interactions.
  • Update cursorsUpdating the shape field; Adjusting a point location; Deleting a row using an Update cursor; Using an Insert cursor; Inserting a polyline geometry; Inserting a polygon geometry; Summary; Chapter 4: ArcPy Geometry Objects and Cursors; ArcPy geometry object classes; ArcPy Point objects; ArcPy Array objects; ArcPy Polyline objects; ArcPy Polygon objects; Polygon object buffers; Other Polygon object methods; The AsShape method; Generic geometry object; ArcPy PointGeometry objects; Rewriting the bus stop analysis; Adding to the analysis; Summary; Chapter 5: Creating a Script Tool.