Franklin

QGIS Python Programming Cookbook.

Author/Creator:
Lawhead, Joel.
Publication:
Olton Birmingham : Packt Publishing, Limited, 2015.
Format/Description:
Book
1 online resource (437 pages)
Status/Location:
Loading...

Options
Location Notes Your Loan Policy

Details

Subjects:
Python (Computer program language).
Form/Genre:
Electronic books.
Summary:
If you are a geospatial analyst who wants to learn more about automating everyday GIS tasks or a programmer who is responsible for building GIS applications,this book is for you. The short, reusable recipes make concepts easy to understand. You can build larger applications that are easy to maintain when they are put together.
Contents:
Intro
QGIS Python Programming Cookbook
Table of Contents
QGIS Python Programming Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Getting ready
How to do it…
How it works…
There's more…
See also
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Automating QGIS
Introduction
Installing QGIS for development
Getting ready
How to do it
Installing PyQGIS using the Debian package manager
Installing PyQGIS using the RPM package manager
Setting the environment variables
Setting the environment variables on Windows
Setting the environment variables on Linux
How it works…
There's more…
Finding the PyQGIS path on Windows
Finding the location of the QGIS Python installation on other platforms
Using the QGIS Python console for interactive control
How to do it…
How it works…
Using the Python ScriptRunner plugin
Getting ready
How to do it…
How it works…
Setting up your QGIS IDE
Getting ready
How to do it…
Adding the QGIS Python interpreter on Windows
Adding the PyQGIS module paths to the interpreter
Adding the PyQGIS API to the IDE
Adding environment variables
How it works…
Debugging QGIS Python scripts
How to do it…
Configuring QGIS
Configuring Eclipse
Testing the debugger
How it works…
Navigating the PyQGIS API
Getting ready
How to do it…
How it works…
There's more…
Creating a QGIS plugin
Getting ready
How to do it…
How it works…
There's more….
Distributing a plugin
Getting ready
How to do it…
How it works…
Creating a standalone application
Getting ready
How to do it…
How it works…
There's more...
Storing and reading global preferences
Getting ready
How to do it…
How it works…
There's more…
Storing and reading project preferences
Getting ready
How to do it…
How it works…
There's more…
Accessing the script path from within your script
Getting ready
How to do it…
How it works…
There's more…
2. Querying Vector Data
Introduction
Loading a vector layer from a file sample
Getting ready
How to do it...
How it works...
Loading a vector layer from a spatial database
Getting ready
How to do it...
How it works...
Examining vector layer features
Getting ready
How to do it...
How it works...
Examining vector layer attributes
Getting ready
How to do it...
How it works...
There's more...
Filtering a layer by geometry
Getting ready
How to do it...
How it works...
Filtering a layer by attributes
Getting ready
How to do it...
How it works...
Buffering a feature intermediate
Getting ready
How to do it...
How it works...
Measuring the distance between two points
Getting ready
How to do it...
How it works...
Measuring the distance along a line sample
Getting ready
How to do it...
How it works...
Calculating the area of a polygon
Getting ready
How to do it...
How it works...
Creating a spatial index
Getting ready
How to do it...
How it works...
Calculating the bearing of a line
Getting ready
How to do it...
How it works...
Loading data from a spreadsheet
Getting ready
How to do it...
How it works...
There's more...
3. Editing Vector Data
Introduction.
Creating a vector layer in memory
Getting ready
How to do it...
How it works...
There's more…
Adding a point feature to a vector layer
Getting ready
How to do it...
How it works...
Adding a line feature to a vector layer
Getting ready
How to do it...
How it works...
Adding a polygon feature to a vector layer
Getting ready
How to do it...
How it works...
Adding a set of attributes to a vector layer
Getting ready
How to do it...
How it works...
Adding a field to a vector layer
Getting ready
How to do it...
How it works...
Joining a shapefile attribute table to a CSV file
Getting ready
How to do it...
How it works...
There's more...
Moving vector layer geometry
Getting ready
How to do it...
How it works...
Changing a vector layer feature's attribute
Getting ready
How to do it...
How it works...
Deleting a vector layer feature
Getting ready
How to do it...
How it works...
Deleting a vector layer attribute
Getting ready
How to do it...
How it works...
Reprojecting a vector layer
Getting ready
How to do it...
How it works...
Converting a shapefile to KML
Getting ready
How to do it...
How it works...
Merging shapefiles
Getting ready
How to do it...
How it works...
There's more...
Splitting a shapefile
Getting ready
How to do it...
How it works...
Generalizing a vector layer
Getting ready
How to do it...
How it works...
Dissolving vector shapes
Getting ready
How to do it...
How it works...
Performing a union on vector shapes
Getting ready
How to do it...
How it works...
Rasterizing a vector layer
Getting ready
How to do it...
How it works...
4. Using Raster Data
Introduction
Loading a raster layer
Getting ready.
How to do it...
How it works...
Getting the cell size of a raster layer
Getting ready
How to do it...
How it works...
Obtaining the width and height of a raster
Getting ready
How to do it...
How it works...
Counting raster bands
Getting ready
How to do it...
How it works...
Swapping raster bands
Getting ready
How to do it...
How it works...
There's more...
Querying the value of a raster at a specified point
Getting ready
How to do it...
How it works...
Reprojecting a raster
Getting ready
How to do it...
How it works...
There's more...
Creating an elevation hillshade
Getting ready
How to do it...
How it works...
Creating vector contours from elevation data
Getting ready
How to do it...
How it works...
Sampling a raster dataset using a regular grid
Getting ready
How to do it...
How it works...
There's more...
Adding elevation data to line vertices using a digital elevation model
Getting ready
How to do it...
How it works...
There's more...
Creating a common extent for rasters
Getting ready
How to do it...
How it works...
Resampling raster resolution
Getting ready
How to do it...
How it works...
Counting the unique values in a raster
Getting ready
How to do it...
How it works...
Mosaicing rasters
Getting ready
How to do it...
How it works...
Converting a TIFF image to a JPEG image
Getting ready
How to do it...
How it works...
Creating pyramids for a raster
Getting ready
How to do it...
How it works...
Converting a pixel location to a map coordinate
Getting ready
How to do it...
How it works...
Converting a map coordinate to a pixel location
Getting ready
How to do it...
How it works...
Creating a KML image overlay for a raster
Getting ready
How to do it...
How it works...
There's more...
Classifying a raster
Getting ready
How to do it...
How it works...
Converting a raster to a vector
Getting ready
How to do it...
How it works...
Georeferencing a raster from control points
Getting ready
How to do it...
How it works...
Clipping a raster using a shapefile
Getting ready
How to do it...
How it works...
5. Creating Dynamic Maps
Introduction
Accessing the map canvas
Getting ready
How to do it...
How it works...
Changing the map units
Getting ready
How to do it...
How it works...
Iterating over layers
Getting ready
How to do it...
How it works...
Symbolizing a vector layer
Getting ready
How to do it...
How it works...
Rendering a single band raster using a color ramp algorithm
Getting ready
How to do it...
How it works…
Creating a complex vector layer symbol
Getting ready
How to do it…
How it works…
Using icons as vector layer symbols
Getting ready
How to do it…
How it works…
Creating a graduated vector layer symbol renderer
Getting ready
How to do it...
How it works...
Creating a categorized vector layer symbol
Getting ready
How to do it...
How it works...
Creating a map bookmark
Getting ready
How to do it...
How it works...
Navigating to a map bookmark
Getting ready
How to do it...
How it works...
Setting scale-based visibility for a layer
Getting ready
How to do it...
How it works...
Using SVG for layer symbols
Getting ready
How to do it...
How it works...
Using pie charts for symbols
Getting ready
How to do it...
How it works...
There's more...
Using the OpenStreetMap service
Getting ready.
How to do it...
Notes:
Description based on publisher supplied metadata and other sources.
Local notes:
Electronic reproduction. Ann Arbor, Michigan : ProQuest Ebook Central, 2021. Available via World Wide Web. Access may be limited to ProQuest Ebook Central affiliated libraries.
Other format:
Print version: Lawhead, Joel QGIS Python Programming Cookbook
ISBN:
9781783984992
9781783984985
OCLC:
908064603