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 Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
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
Estimated delivery fee Deliver to Colombia

Standard delivery 10 - 13 business days

$19.95

Premium delivery 3 - 6 business days

$40.95
(Includes tracking information)

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 Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Colombia

Standard delivery 10 - 13 business days

$19.95

Premium delivery 3 - 6 business days

$40.95
(Includes tracking information)

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 the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela