QGIS Python Programming Cookbook: Over 140 Recipes to Help You Turn Qgis from a Desktop Gis Tool into a Powerful Automated Geospatial Framework
A**U
very little to find in this book even for a ...
very little to find in this book even for a begginer! I am dissaponted as I expected to find more detains and more tips. The examples that you can find in the internet have more details.
R**N
Lots of Practical PyQGIS Coding Examples
I found this book well worth the money and valuable for my QGIS coding purposes.Pluses:• Introduces and explains the setup of a simple yet powerful PyQGIS development environment using the QGIS Script Runner plugin and the PyDEV Python IDE• Has 170+ practical PyQGIS coding examples that are well-explained• Applicable to Linux, Windows and MacOS environmentsMinuses:• Assumes quite a bit of prior QGIS experience and terminology—it’s not a book for beginners• The section on the PyQGIS API assumes you have experience understanding the QGIS C++ API, which in my case I do not. I wish I could find a good text that provides an explanation of — and examples of using— the PyQGIS API from a Python programmer’s point of view.• Ditto with the section on building QGIS plugins—it’s pretty much a Reader’s Digest rehash of the QGIS document on the same topic, glossing over subjects like resource files and the like. Again, maybe ‘resources’ is standard terminology for C++ programmers (icons, bitmaps, etc.), but it wouldn’t insult Python programmers’ intelligences to devote a line or two of explanations or examples for them.Again, well worth the money for my specific purposes.
N**G
One of two great PyQGIS resources!
The QGIS Python Programming Cookbook is the second great PyQGIS book published by Packt. The first one is Erik Westra’s Building Mapping Applications with QGIS. If you are new to PyQGIS and want to get started quickly I suggest you look into these two books, instead of the many convoluted, incomplete, and often outdated tutorials on the web or in other books. I personally started with Erik Westra’s book, which within in a few days, clarified a lot of thing to me. Then I looked into this book. Once you know the basics of PyQGIS and how it all works, this book is a great resource to boost your skills and learn many tricks. Because, let’s be honest, not everyone is capable of looking at the C++ QGIS documentation and translating it quickly into Python. Reading the documentation is not only a matter of translating C++ datatypes etc., which is actually the easy part, but it is more a matter of understanding how it all fits together. This is often not as clear as it is with other libraries, such as the much more intuitive ArcPy. This book fills in many of those gaps. The level of detail is very enjoyable, as many of the recipes describe each line of code in great detail, even sometimes when it seems unnecessary.After a general intro to PyQGIS and setting up environments and an IDE (Eclipse, using PyDev), Chapter 2 and 3 are all about vector data. From simply loading data, to querying data, to creating layers in memory, to adding and removing features, to joining attributes; it is all in there. If you work a lot with vector data these two chapters will either teach you how to accomplish many common tasks or they will inspire you to look into new things.Chapter 4 goes into raster data, and although that is not the focus of my work, it seems like if features some very useful recipes, such as swapping raster bands, reprojecting, building pyramids and classification. I know these are things that are commonly asked about in forums.Chapter 5 covers dynamic maps, which talks a lot about accessing and working with the canvas, most likely one of the most commonly used features when working with PyQGIS. It also goes into topics such as creating graduated symbol renderers (again, something that is asked on forums a lot), using charts, and building tools that directly use the canvas (such as a selection tool, or placing points on the map).Chapter 6 then talks about making static maps, so basically it is about doing in a programmatic way what you would manually do using the Print Composer. Again, this is not the focus of what I do but I can tell you that this is a fairly little talked about topic in other resources. I was not aware this was even possible until I looked into this book.Chapter 7 teaches you how to interact with users, that is, how to work with message bars and dialogs. But it also covers other very useful recipes, such as programming a progress bar or using radio buttons and checkboxes.Chapter 8 touches upon more advanced topics, such as NDVI, geocoding addresses, tracking a GPS device and performing nearest neighbor analysis or heat maps. Perhaps not the things you do on a daily basis, but nevertheless it is very convenient to have these recipes. Although not all are directly relevant to me I thought this was still an inspiring chapter as it showed me some possibilities of PyGIS that I had not thought about.The final chapter, Chapter 9, is a collection of random tips and tricks that do not directly fit any of the other chapters.All in all, I would say that this is most likely the most useful PyQGIS book out at this point, although if you are a complete beginner I highly suggest you look into Erik Westra’s book as well, which will teach you the necessary basics and many more advanced topics as well. If you own these two books you will not have to look into any other ones.The downsides? No serious downsides, but the only thing that might be missing is a chapter on PyQt. Although PyQt is used in a few recipes, I feel like that it is one of the most important parts if one works a lot with PyQGIS, especially once one is building plugins. Although not directly part of the QGIS API, I feel like a lot of readers would be incredibly thankful for an entire chapter on it.Another little piece of advice: this book should probably contain ’PyQGIS’ in the title, such as ‘PyQGIS Programming Cookbook’, because a lot of us actually browse the web for things like ‘PyQGIS book’, which usually returns some of the less useful resources.
J**H
and have found this book to a good resource. It's pretty straightforward and well-organized
I'm learning PyQGIS while working on a project, and have found this book to a good resource. It's pretty straightforward and well-organized. I like how it breaks down exercises into compact parts, a few paragraphs, with sciprts that dont rely upon variables or data referenced prior in the book. I also use the PyQGIS Developer Cookbook, which is also pretty great (and free!), but it does have a few typos here and there, and build scripts up with variables used much earlier. Perhaps because I'm a beginner to PyQGIS and Python, the Joel Lawhead books is more appealing. I especially like chapter 3's coverage of how to add a field to a vector layer, as well as chapt 8's workflow coverage, especially the part on collecting field data.With Open Source and technology, you'll still have to rely upon Stack Exchange and other online resources but it's nice to have a comprehensive book availabe too. Now, I just wish the amazing and wondeful QGIS development team would bring back the 'export as python script' option in Graphical Modeler. That way you could quickly see what your model looks like coded out, and reverse engineer your own code.I'm still working my way through this book, but it's proving to be useful, and probably worth checking out if you're working with PyQGIS.
A**R
Four Stars
Great book
A**I
genial
this book makes me understand qgis, i am a engineer, working in c++,QTi recommanded it, from the basic qgis to advanced information this book is helpfull
Trustpilot
3 weeks ago
2 weeks ago