|
| 1 | +--- |
| 2 | +layout: single |
| 3 | +title: "What is Raster Data" |
| 4 | +excerpt: "Rasters are gridded data composed of pixels that store values. Learn more about the structure of raster data and how to use them to store data, such as imagery or elevation values." |
| 5 | +authors: ['Leah Wasser'] |
| 6 | +dateCreated: 2018-02-05 |
| 7 | +modified: 2020-02-14 |
| 8 | +category: [courses] |
| 9 | +class-lesson: ['intro-raster-python-tb'] |
| 10 | +permalink: /courses/use-data-open-source-python/intro-raster-data-python/fundamentals-raster-data/ |
| 11 | +nav-title: 'Intro to Raster Data' |
| 12 | +module-title: 'Fundamentals of Raster Data in Python' |
| 13 | +module-description: 'The GeoTIFF file format is often used to store raster data. Learn how to to open and explore raster data stored as GeoTIFF files in Python.' |
| 14 | +module-nav-title: 'Intro to Raster Data in Python' |
| 15 | +module-type: 'class' |
| 16 | +week: 3 |
| 17 | +course: 'intermediate-earth-data-science-textbook' |
| 18 | +chapter: 4 |
| 19 | +sidebar: |
| 20 | + nav: |
| 21 | +author_profile: false |
| 22 | +comments: false |
| 23 | +class-order: 1 |
| 24 | +order: 1 |
| 25 | +topics: |
| 26 | + remote-sensing: ['lidar'] |
| 27 | + earth-science: ['vegetation'] |
| 28 | + spatial-data-and-gis: ['raster-data'] |
| 29 | +redirect_from: |
| 30 | + - "/courses/earth-analytics-python/lidar-raster-data/lidar-raster-data/" |
| 31 | + - "/courses/use-data-open-source-python/intro-raster-data-python/fundamentals-raster-data/intro-raster-data/" |
| 32 | +--- |
| 33 | + |
| 34 | +{% include toc title="In This Chapter" icon="file-text" %} |
| 35 | + |
| 36 | +<div class='notice--success' markdown="1"> |
| 37 | + |
| 38 | +## <i class="fa fa-ship" aria-hidden="true"></i> Chapter Four - Fundamentals of Raster Data in Python |
| 39 | + |
| 40 | +In this chapter, 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 access its metadata, and how to explore the distribution of values in a raster dataset. |
| 41 | + |
| 42 | + |
| 43 | +## <i class="fa fa-graduation-cap" aria-hidden="true"></i> Learning Objectives |
| 44 | + |
| 45 | +After completing this chapter, you will be able to: |
| 46 | + |
| 47 | +* Open raster data using **Python**. |
| 48 | +* Be able to list and identify 3 spatial attributes of a raster dataset: extent, crs and resolution. |
| 49 | +* Explore and plot the distribution of values within a raster using histograms. |
| 50 | +* Access metadata stored within a GeoTIFF raster file via TIF tags in **Python**. |
| 51 | + |
| 52 | +## <i class="fa fa-check-square-o fa-2" aria-hidden="true"></i> What You Need |
| 53 | + |
| 54 | +You will need a computer with internet access to complete this lesson. |
| 55 | + |
| 56 | +{% include/data_subsets/course_earth_analytics/_data-colorado-flood.md %} |
| 57 | + |
| 58 | +</div> |
| 59 | + |
| 60 | +The <a href="{{ site.url }}/courses/use-data-open-source-python/data-stories/lidar-raster-data/lidar-intro/" target="_blank">data story on Lidar data</a> reviews the basic principles behind Lidar raster datasets. |
| 61 | + |
| 62 | +In this chapter, you will learn how to open and plot a lidar raster dataset in **Python**. You will also learn about key attributes of a raster dataset: |
| 63 | + |
| 64 | +1. Spatial resolution |
| 65 | +2. Spatial extent and |
| 66 | +3. Coordinate reference systems |
| 67 | + |
| 68 | + |
| 69 | +## What is a Raster? |
| 70 | + |
| 71 | +Raster or “gridded” data are stored as a grid of values which are rendered on a map as pixels. Each pixel value represents an area on the Earth’s surface. A raster file is composed of regular grid of cells, all of which are the same size. |
| 72 | + |
| 73 | +You've looked at and used rasters before if you've looked at photographs or imagery in a tool like Google Earth. However, the raster files that you will work with are different from photographs in that they are spatially referenced. Each pixel represents an area of land on the ground. That area is defined by the spatial **resolution** of the raster. |
| 74 | + |
| 75 | +<figure> |
| 76 | + <a href="{{ site.url }}/images/earth-analytics/raster-data/raster-concept.png" target="_blank"> |
| 77 | + <img src="{{ site.url }}/images/earth-analytics/raster-data/raster-concept.png" alt="Raster data concept diagram."></a> |
| 78 | + <figcaption>A raster is composed of a regular grid of cells. Each cell is the same |
| 79 | + size in the x and y direction. Source: Colin Williams, NEON. |
| 80 | + </figcaption> |
| 81 | +</figure> |
| 82 | + |
| 83 | + |
| 84 | +### Raster Facts |
| 85 | + |
| 86 | +A few notes about rasters: |
| 87 | + |
| 88 | +- Each cell is called a pixel. |
| 89 | +- And each pixel represents an area on the ground. |
| 90 | +- The resolution of the raster represents the area that each pixel represents on the ground. So, a 1 meter resolution raster, means that each pixel represents a 1 m by 1 m area on the ground. |
| 91 | + |
| 92 | +A raster dataset can have attributes associated with it as well. For instance in a Lidar derived digital elevation model (DEM), each cell represents an elevation value for that location on the earth. In a LIDAR derived intensity image, each cell represents a Lidar intensity value or the amount of light energy returned to and recorded by the sensor. |
| 93 | + |
| 94 | + |
| 95 | +<figure> |
| 96 | + <a href="{{ site.url }}/images/earth-analytics/raster-data/raster-resolution.png" target="_blank"> |
| 97 | + <img src="{{ site.url }}/images/earth-analytics/raster-data/raster-resolution.png" alt="Raster data resolution concept diagram."></a> |
| 98 | + <figcaption>Rasters can be stored at different resolutions. The resolution simply |
| 99 | + represents the size of each pixel cell. Source: Colin Williams, NEON. |
| 100 | + </figcaption> |
| 101 | +</figure> |
| 102 | + |
| 103 | + |
| 104 | +In the next lesson, you will learn how to open a lidar raster dataset in **Python**. |
| 105 | + |
0 commit comments