#GeoDev

Want to learn ArcPy? Buy this book!

Good programming language books are scarce. They become outdated pretty fast because of new software or programming language versions, or contain code errors or example code on disk doesn’t correspond with what’s written in the book, leaving you, the reader, confused and frustrated. Some books they’re badly written: too much information is covered in little text, or the organization of the materials is poorly thought-through. All books I’ve read on ArcPy more or less suffered from these shortcomings, except for one: “Programming ArcGIS with Python Cookbook”, written by Eric Pimpler. If you’re thinking of learning ArcPy, there´s no better to place to start than with this book.

Cookbook style format

Most programming books combine theory with practice, or come as a reference book with code snippets scattered throughout the main text. This book takes a more practical approach, being written in a cookbook style format that focuses primarily on the end results: a well-written, finished and working Python script that accomplishes a specific task. The 85+ “recipes” instruct you how to put together such as script and explain in plain English how the code functions when running the finished script.

This cookbook style format means that it’s a hands-on book, requiring a lot of activity from the reader: after all, you are the cook! You are instructed to reproduce example code in the ArcGIS Python window or IDE of your choice and run the code when finished. All scripts are deconstructed into small chunks and are built from the ground up, step by step. Of course you can cheat by copy-pasting it into an IDE directly from a PDF version of the book, but this is not a good idea – you learn more by typing code yourself (and then fix your own typos when the code doesn’t work). The author provided all scripts in a separate directory so you can always compare your own code with his, which is very handy.

The fact that all recipes are entire scripts rather than small code snippets (such as provided in the Help section of ArcGIS Desktop) give the book lots of added value. I should also point out that the scripts focus on one specific task at a time instead of combining multiple tasks. This makes this book a good choice for beginning coders.

What the book covers

The 85+ “recipes” are organized into thirteen chapters in such a way that things start off easy and get more complex later on. The author wisely chose to start with the Python window in ArcGIS Desktop, which is the best place to start working with ArcPy. The ArcPy mapping module is covered first so that you can see the results of your code directly in the map window. Other topics covered are fixing broken data paths, listing and describing data, as well as handling errors and exceptions. Finally, the book also covers creating Python add-ins, working with cursors and executing geoprocessing tools from scripts. The book starts with a short rundown of Python fundamentals for ArcGIS, so for more background on ArcPy and/or Python itself, you have to look elsewhere. The book ends with an appendix covering automation of python scripts and five Python recipes every GIS programmer should know. The book looks beyond the ArcPy site package : some scripts make use of the requests module, that needs to be installed separately from Python. The json module is covered as well.

Some practical information

The second edition of this book was published in July 2015. It was written for ArcGIS Desktop version 10.3. I personally used version 10.4 when running the scripts which worked fine in 95% of all scripts, which is a high percentage compared to other programming books on the market.

This book is available in paperback and a range of digital formats. With the book comes a ZIP file containing example code that can be downloaded from the publisher’s website (instructions are available in the book). A paperback version allows for a free download of the book, which comes in handy if you need to copy long URLs or file paths.

Conclusion

It should be clear by now that this book is a great start for every ArcPy novice. The recipes are clear, short and useful. They cover a broad range of geoprocessing tasks that get you up to speed quickly. The author focuses on one specific task at a time, keeping things simple. All code examples come with an answer sheet, so you can always check your code with a correctly working script. The example data and code are organized in a clarifying way and the same goes for the book content. There are some typos throughout the text but the publisher´s website has a special page where you can check for errata. Apart from some minor flaws, this book is an excellent source for new and experienced ArcPy programmers.

Say thanks for this article (1)
The community is supported by:
Become a sponsor
#GeoDev
#Business #Featured #GeoDev
Geo Addressing Decoded, Part 4: Exploring the Applications of Geo Addressing Solutions
Aleks Buczkowski 06.25.2024
AWESOME 2
#Business #GeoDev
3 Pathways For Integrating Planet Data Into Your GIS Workflow
Avatar for Sponsored Article
Sponsored Article 08.12.2024
AWESOME 1
#Business #Featured #GeoDev #Ideas #News
Bee Maps: Creating a Buzz in the World of Fresh, Affordable, and Real-Time Mapping Solutions
Nikita Marwaha Kraetzig 11.5.2024
AWESOME 4
Next article
#Business #Ideas

Google’s patent shows how Self-Driving taxis will determine pickup locations

Anyone who has used an app to hail a taxi know that it’s almost impossible to get the pickup location right, without having to call the driver and describe the exact location where you are standing. Now imagine a future where there is no driver! How exactly are you going to convey to our Self-driving taxi where you are waiting? In addition, autonomous vehicles may not be able to stop and drive in the same way we can.

Google’s latest patent “Determining Pickup and Destination Locations for Autonomous Vehicles” addresses this challenge. The system proposed by Google will assess your input location, and if its not ideal for the Self-driving car to pick you up, it will provide you with an alternative set of suggested pickup (and drop) locations taking into account your surrounding and the optimal walking distance to the suggested pickup location. Once the user selects one of the suggested pickup locations, the system will dispatch the autonomous vehicle to the defined location. If there was ever any doubt that Google was working on an alternative to Uber, the patent certainly puts them to rest.

Determining Pickup and Destination Locations for Autonomous Vehicles – Copyright PatentYogi

The technology behind autonomous cars is already there, however the practical challenges  will probably take longer to address and Google’s patent clearly shows how important maps are going to address those challenges.

Read on
Search