Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Python Geospatial Development
Python Geospatial Development

Python Geospatial Development: Develop sophisticated mapping applications from scratch using Python 3 tools for geospatial development , Third Edition

eBook
$9.99 $43.99
Paperback
$54.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Python Geospatial Development

Chapter 2. GIS

The term GIS generally refers to geographic information systems, which are complex computer systems for storing, manipulating, and displaying geospatial data. GIS can also be used to refer to the more general geographic information sciences, which is the science surrounding the use of GIS systems.

In this chapter, we will look at:

  • The central GIS concepts you will have to become familiar with: location, distance, units, projections, datums, coordinate systems, and shapes
  • Some of the major data formats you are likely to encounter when working with geospatial data
  • Some of the processes involved in working directly with geospatial data

Core GIS concepts

Working with geospatial data is complicated because you are dealing with mathematical models of the Earth's surface. In many ways, it is easy to think of the Earth as a sphere on which you can place your data. That might be easy, but it isn't accurate—the Earth is more like an oblate spheroid than a perfect sphere. This difference, as well as other mathematical complexities that we won't get into here, means that representing points, lines, and areas on the surface of the Earth is a rather complicated process.

Let's take a look at some of the key GIS concepts you will have to become familiar with as you work with geospatial data.

Location

Locations represent points on the surface of the Earth. One of the most common ways of measuring location is through the use of latitude and longitude coordinates. For example, my current location (as measured by a GPS receiver) is 38.167446 degrees south and 176.234436 degrees east. What do these numbers mean...

GIS data formats

A GIS data format specifies how geospatial data is stored in a file (or multiple files) on disk. The format describes the logical structure used to store geospatial data within the file(s).

Note

While we talk about storing information on disk, data formats can also be used to transmit geospatial information between computer systems. For example, a web service might provide map data on request, transmitting that data in a particular format.

A GIS data format will typically support:

  • Geospatial data describing geographical features.
  • Additional meta-data describing this data, including the datum and projection used, the coordinate system and units that the data is in, the date this file was last updated, and so on.
  • Attributes providing additional information about the geographical features that are being described. For example, a city feature may have attributes such as name, population, average temperature, and so on.
  • Display information, such as the color or line style to use when...

Working with GIS data manually

Let's take a brief look at the process of working with GIS data manually. Before we can begin, there are two things you need to do:

  • Obtain some GIS data
  • Install the GDAL library and its Python bindings so that you can read the necessary data files

Obtaining the data

Let's use the US Census Bureau's web site to download a set of vector maps for the various US states. The main site for obtaining GIS data from the US Census Bureau can be found at http://www.census.gov/geo/www/tiger.

To make things simpler, though, let's bypass the web site and directly download the file we need from http://www2.census.gov/geo/tiger/TIGER2014/STATE/tl_2014_us_state.zip.

The file, tl_2014_us_state.zip, should be a ZIP-format archive. After uncompressing the archive, you should have a directory containing the following files:

  • tl_2014_us_state.dbf
  • tl_2014_us_state.prj
  • tl_2014_us_state.shp
  • tl_2014_us_state.shx

These files make up a shapefile containing the outlines of all...

Summary

In this chapter, we discussed many of the core concepts that underlie GIS development, examined some of the more common GIS data formats, and got our hands dirty exploring US state data downloaded from the US Census Bureau web site.

We saw that locations are often, but not always, represented using coordinates, learned that calculating the distance between two points requires you to take into account the curvature of the Earth's surface, and discovered why you must always be aware of the units used by geospatial data.

We then learned about map projections, which represent the three-dimensional shape of the Earth's surface as a two-dimensional plane, and saw that there are three main classes of map projection: cylindrical, conic, and azimuthal. We discovered that datums are mathematical models of the Earth's shape, and learned that the three most common datums in use are called NAD 27, NAD 83, and WGS 84.

We next examined the concept of coordinate systems and saw that...

Left arrow icon Right arrow icon

Key benefits

  • Build web applications based around maps and geospatial data using Python 3.x
  • Install and use various toolkits and obtain geospatial data for use in your programs
  • This practical, hands-on book will teach you all about geospatial development in Python

Description

Geospatial development links your data to locations on the surface of the Earth. Writing geospatial programs involves tasks such as grouping data by location, storing and analyzing large amounts of spatial information, performing complex geospatial calculations, and drawing colorful interactive maps. In order to do this well, you’ll need appropriate tools and techniques, as well as a thorough understanding of geospatial concepts such as map projections, datums, and coordinate systems. This book provides an overview of the major geospatial concepts, data sources, and toolkits. It starts by showing you how to store and access spatial data using Python, how to perform a range of spatial calculations, and how to store spatial data in a database. Further on, the book teaches you how to build your own slippy map interface within a web application, and finishes with the detailed construction of a geospatial data editor using the GeoDjango framework. By the end of this book, you will be able to confidently use Python to write your own geospatial applications ranging from quick, one-off utilities to sophisticated web-based applications using maps and other geospatial data.

Who is this book for?

This book is for experienced Python developers who want to learn about geospatial concepts, obtain and work with geospatial data, solve spatial problems, and build sophisticated map-based applications using Python.

What you will learn

  • Access, manipulate, and display geospatial data from within your Python programs
  • Master the core geospatial concepts of location, distance, units, projections, and datums
  • Read and write geospatial data in both vector and raster format
  • Perform complex, real-world geospatial calculations using Python
  • Store and access geospatial information in a database
  • Use points, lines, and polygons within your Python programs
  • Convert geospatial data into attractive maps using Python-based tools
  • Build complete web-based mapping applications using Python

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : May 23, 2016
Length: 446 pages
Edition : 3rd
Language : English
ISBN-13 : 9781785288937
Category :
Languages :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : May 23, 2016
Length: 446 pages
Edition : 3rd
Language : English
ISBN-13 : 9781785288937
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 164.97
Learning Geospatial Analysis with Python-Second Edition
$54.99
Python Geospatial Analysis Cookbook
$54.99
Python Geospatial Development
$54.99
Total $ 164.97 Stars icon
Banner background image

Table of Contents

14 Chapters
1. Geospatial Development Using Python Chevron down icon Chevron up icon
2. GIS Chevron down icon Chevron up icon
3. Python Libraries for Geospatial Development Chevron down icon Chevron up icon
4. Sources of Geospatial Data Chevron down icon Chevron up icon
5. Working with Geospatial Data in Python Chevron down icon Chevron up icon
6. Spatial Databases Chevron down icon Chevron up icon
7. Using Python and Mapnik to Generate Maps Chevron down icon Chevron up icon
8. Working with Spatial Data Chevron down icon Chevron up icon
9. Improving the DISTAL Application Chevron down icon Chevron up icon
10. Tools for Web-based Geospatial Development Chevron down icon Chevron up icon
11. Putting It All Together – a Complete Mapping System Chevron down icon Chevron up icon
12. ShapeEditor – Importing and Exporting Shapefiles Chevron down icon Chevron up icon
13. ShapeEditor – Selecting and Editing Features Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
(3 Ratings)
5 star 66.7%
4 star 0%
3 star 0%
2 star 33.3%
1 star 0%
Sophie Milich Mar 08, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Helped me get a 100 on my programming midterm!!
Amazon Verified review Amazon
Manoj Joshi Oct 26, 2017
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is an outstanding book. I have spent days trying to understand how the geospatial design works, and this book is a life-saver. It's an incredible collection of concepts and examples. I have actually tried all the examples in the first 110 pages so far, and they work like a champ. Often the most important aspect for any software developer is the ability to install the packages. This book gives brief instructions that save time and just work at the first shot. Once you get past installation, the programming examples are a breeze. My suggestion is you must try to run each of these examples and fully understand the concepts before you move ahead. And yes, the concepts are very well explained. There are plenty of figures and pictures with lots of documentation about the source code. There is a detailed description of all the tools that you can use in python. I like the way the author has collected all information about mapping tools, and basic Math knowledge required for computing say the polygons and the layers. This includes explaining the maps and how cartographic methods work. I like the pointers to downloadable datasets. All the links work perfectly. There is a remarkable number of file formats that have been discussed. This book will be worth every penny you invest. A valuable life time resource.
Amazon Verified review Amazon
Fence Lizard Dec 22, 2016
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
I bought this book as an aid to learning Python-based geo processing. I have a strong programming background, and I've worked extensively with GIS, but I need to develop my ability to programmatically process rasters and vector data. As others have noted, this book would be helpful to someone completely new to GIS and geo-referenced data. The material on core GIS concepts is actually pretty good. But as a guide to Python geo-processing, the book is woefully inadequate. Essential libraries, such as GDAL, are introduced briefly, without enough depth to get someone past the most basic usage. That shallow approach is a running theme, and so while the newbie will receive a decent overview of the topics addressed, he won't pick up any but the most rudimentary skills. If you're interested in developing serious skills for Python geo-processing, look elsewhere.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.