Chapter 8. Using spatial reference systems

 

This chapter covers

  • Understanding spatial reference systems
  • Transforming data using OSR
  • Transforming data using pyproj
  • Great-circle calculations using pyproj

Most people are familiar with the concept of using latitude and longitude to specify a location on the earth’s surface. Would you be surprised to learn that many other coordinate systems are also used, and that these different spatial reference systems are used for different purposes? To make things even more complicated, the earth isn’t a perfect sphere, and multiple models, called datums, are used to represent the planet’s shape. Given this, coordinates from any system, including latitude and longitude, aren’t absolute—a set of coordinates can specify a slightly different location depending on the datum used.

Because so many coordinate systems exist, it’s unlikely that all of your data will use the one you need, so the ability to convert data between them is critical. Not only that, but it’s impossible to transform data from one spatial reference system to another if you don’t know which system they currently use, so you must ensure that this information is documented or risk rendering your data unusable. To effectively work with coordinate systems, you need to understand why so many of them exist in the first place and how to select an appropriate one for your purposes, so we’ll start with background information and then move on to transforming data.

8.1. Introduction to spatial reference systems

8.2. Using spatial references with OSR

8.3. Using spatial references with pyproj

8.4. Summary

sitemap