Tuesday, March 14, 2017

QGIS Python Programming Cookbook - SECOND EDITION

The second edition of the "QGIS Python Programming Cookbook" is out today from Packt Publishing!  And after my second publishing experience writing about QGIS, I can enthusiastically say it is one of the greatest open source projects, GIS software, and Python APIs out there.  It really sets a standard for quality software development.  GIS is a tool that helps people make better decisions to make the world a better place, and QGIS puts that potential in more people's hands than any other GIS software.

As with all of my books, I've tried to walk a very tricky line. I created a QGIS Python book reference book that will stand on its own if it's the only book you have.  But I also try to create content that is very different from the official documentation and book, as well as complement other third-party books out there.  QGIS is rich enough,
and updated and released with such frequency, that I don't think one book can do it justice.  While many operations in QGIS are straight-forward and easy to understand, some things can be quite complex.  For example, the Map Composer, raster operations, tinkering with various types of settings, and working with plug-ins through Python can be more difficult to understand.  And having more than one example from different sources can be invaluable in software development.  So I carefully picked examples and explanations that I felt were not easily found on the Internet for the most part, lacked documentation, or were complex enough that the over 170 examples should enrich your knowledge of QGIS regardless of you're starting from. At the very least, I hope it encourages more people to use my favorite GIS package.

Sunday, October 16, 2016

Cutting a Line Shapefile with a Point Shapefile using Shapely

Shapely works with geometric classes.  Sometimes you want those geometries to come from
shapefiles.  That's where PyShp comes in.  In this example on GIS Stack Exchange, we take a line shapefile and a point shapefile with points on or near the line segments, and split those lines at the location of the nearest point.  At a minimum, the point must be inside the envelope of the line segment:

Wednesday, October 12, 2016

Reproject a Polygon Shapefile using PyShp and PyProj

Via the blog "Geospatiality": In this post I will use the PyShp library along with the PyProj library to
reproject the local authority boundaries of Ireland, in Shapefile format, from Irish Transverse Mercator to WGS 84 using Python.

Tuesday, October 4, 2016

3D Multipatch Shapefile in Pure Python

Via GIS StackExchange...

3D cube shown in Esri ArcScene generated using PyShp
and the obscure "MultiPatch" shapefile type in pure Python