
An elevation model for example will often just have one layer representing the elevation of the earth’s surface for a particular location. Source: Colin Williams, NEON.ĭata Tip: For more information on rasters, how they work, and the types of data stored in rasters, see this chapter on using raster data from the earth data science intermediate textbook. Each cell is the same size in the x and y direction. A raster is composed of a regular grid of cells. That area is defined by the spatial resolution of the raster. Each pixel represents an area of land on the ground. However, the raster files that you will work with are different from photographs in that they are spatially referenced.

You’ve looked at and used rasters before if you’ve looked at photographs or imagery in a tool like Google Earth. A raster file is composed of regular grid of cells, all of which are the same size. Each pixel value represents an area on the Earth’s surface making the data spatial. Raster or “gridded” data are stored as a grid of values which are rendered on a map as pixels. Be able to plot spatial raster data using EarthPy in Python.īefore starting this lesson, read the What is a Raster section of this page of the Earth Lab website to familiarize yourself with the concept of raster data.Open raster data using Rioxarray in Python.Learning ObjectivesĪfter completing this lesson, you will be able to: In this lesson, you will learn fundamental concepts related to working with raster data in Python, including understanding the spatial attributes of raster data, how to open raster data, and how to visually plot the data.
