Chapter 13. PostGIS raster

 

This chapter covers

  • Differences between raster and vector data
  • Using raster data in PostGIS
  • The future of raster storage in PostGIS

Up to this point, we’ve focused on spatial vector data, because most of the functionality built into PostGIS is for storing and analyzing vector data. But there’s another kind of spatial data that people commonly use: raster data. Vector data is used to represent shapes with no distinct difference in value from one part of the geometry to the other, aside from what you can encode in Z and M coordinates. Raster data, on the other hand, is a mosaic of pixels. Each pixel stores one or more different values. Areas of work where raster data is preferred over vector data include the following:

  • Fine or detailed categorical coverages like land cover or land use
  • Temperature, elevation, and all their derivatives
  • True color coverages—aerial and satellite photos

Raster data almost always originates from instrumental data-collection processes and often serves as the raw material for vector data. As such, there’s much more free raster data in the world than vector data. Although much vector data is generated from a raster form, it would be unfair to characterize raster data as just the raw material that makes mass production of vector data possible. Raster data is often used independently of vector data.

13.1. What is PostGIS raster?

13.2. Storing and loading raster data

13.3. Raster maintenance tables and functions

13.4. Commonly used functions

13.5. Combining raster processing with vector processing

13.6. Exporting raster data into other raster formats

13.7. Viewing raster data with MapServer

13.8. The future of PostGIS raster support

13.9. Summary