Upgrade to Pro — share decks privately, control downloads, hide ads and more …

GEOG 400, Advanced GIS, Fall 2020; Week 3 Lectu...

Avatar for alan.kasprak alan.kasprak
September 07, 2020

GEOG 400, Advanced GIS, Fall 2020; Week 3 Lecture 1

Avatar for alan.kasprak

alan.kasprak

September 07, 2020
Tweet

More Decks by alan.kasprak

Other Decks in Education

Transcript

  1. GEOG 400: Advanced GIS - Raster Raster Bit Depth This

    is the first of two closely-related lectures Today we’ll talk about BIT DEPTH Next time, we’ll talk about CELL RESOLUTION
  2. BIT DEPTH CELL RESOLUTION Number of memory bits used to

    store color data for each pixel in a raster image All pixels require the same number of bits The number of bits determines the range of colors the image may have The dimension of the cell size representing the area covered on the ground Resolution is constant across a raster (with very few exceptions) Resolution balances the size of features that can be represented with file size, processing time “A 32-bit integer raster” “A 5-meter resolution raster”
  3. BIT DEPTH CELL RESOLUTION Number of memory bits used to

    store color data for each pixel in a raster image All pixels require the same number of bits The number of bits determines the range of colors the image may have The dimension of the cell size representing the area covered on the ground Resolution is constant across a raster (with very few exceptions) Resolution balances the size of features that can be represented with file size, processing time “A 32-bit integer raster” “A 5-meter resolution raster”
  4. BIT DEPTH What’s a bit? …much like a “bit” of

    salt, it’s a really small amount. Bit: short for ‘binary digit’: the smallest unit of measurement used to quantify computer data. It contains a single value, either 1 or 0 (or true/false, or +/-, or on/off. 0 0 1 0 1 0 0 0 0 1 0 0 1 0 …is 14 bits of information.
  5. BIT DEPTH What’s a bit? …much like a “bit” of

    salt, it’s a really small amount. Bit: short for ‘binary digit’: the smallest unit of measurement used to quantify computer data. It contains a single value, either 1 or 0 (or true/false, or +/-, or on/off. 0 0 1 0 1 0 0 0 0 1 0 0 1 0 …is 14 bits of information. The range of values that a raster file can store is determined by its “bit depth”
  6. BIT DEPTH The range of values that a raster file

    can store is determined by its “bit depth” How many values can we represent with: One bit? 0 or 1
  7. BIT DEPTH The range of values that a raster file

    can store is determined by its “bit depth” How many values can we represent with: One bit? 0 or 1 2 VALUES [ONE OR ZERO]
  8. BIT DEPTH The range of values that a raster file

    can store is determined by its “bit depth” How many values can we represent with: One bit? 0 or 1 Two bits? 2 VALUES [ONE OR ZERO]
  9. BIT DEPTH The range of values that a raster file

    can store is determined by its “bit depth” How many values can we represent with: One bit? 0 or 1 Two bits? 0,0 or 1,0 or 0,1 or 1,1 2 VALUES [ONE OR ZERO] 4 VALUES
  10. BIT DEPTH The range of values that a raster file

    can store is determined by its “bit depth” How many values can we represent with: One bit? 0 or 1 Two bits? 0,0 or 1,0 or 0,1 or 1,1 Three bits? 2 VALUES [ONE OR ZERO] 4 VALUES
  11. BIT DEPTH The range of values that a raster file

    can store is determined by its “bit depth” How many values can we represent with: One bit? 0 or 1 Two bits? 0,0 or 1,0 or 0,1 or 1,1 Three bits? 0,0,0 or 0,0,1 or 0,1,1 or 1,1,1 or 1,0,0 or 1,1,0 or 1,0,1 or 0,1,0 2 VALUES [ONE OR ZERO] 4 VALUES 8 VALUES
  12. BIT DEPTH The range of values that a raster file

    can store is determined by its “bit depth” 1 bit = 2 unique values 2 bits = 4 unique values 3 bits = 8 unique values The number of unique values = 2n where n is the bit depth of the data 4 bits = ? unique values 5 bits = ? unique values
  13. BIT DEPTH The range of values that a raster file

    can store is determined by its “bit depth” 1 bit = 2 unique values (0 or 1) 2 bits = 4 unique values (0,1,2,3) 3 bits = 8 unique values (0,1,2,3,4,5,6,7) The number of unique values = 2n where n is the bit depth of the data 4 bits = 16 unique values (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) 5 bits = 32 unique values (0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15…28,29,30,31) 8 bits = one byte, and 1 million bytes = 1 megabyte, and 1 million megabytes =1 terabyte.
  14. BIT DEPTH The number of unique values = 2n where

    n is the bit depth of the data That’s neat, but this is a class on rasters, isn’t it? It is, so we also need to talk about bit mapping (or at least note it’s a thing). A particular bit value (0 or 4 or 15 or 253…) The color of a pixel in your raster BIT MAPPING
  15. BIT DEPTH …and we also need to talk about the

    types of numbers. 1. INTEGERS are whole numbers, including zero 2. SIGNED INTEGERS are positive and negative whole numbers, including zero 3. FLOATING POINTS are numbers with decimal places 4. SIGNED FLOATING POINTS are positive and negative numbers with decimal places 1, 35, 0, 16, 4, 4872349876 -1, 35, 0, -16, -4, 4872349876 1.2, 45.5, 78.0, 8988972987.1, 23.0982340723987 1.2, 45.5, -78.0, 8988972987.1, -23.0982340723987
  16. But back to GIS…8 bit (256-value) data is really common:

    Hillshade data has 256 shades of gray (legend range will be 0 to 255) LANDSAT data has stacked red, green , blue bands (range is 0 to 255 for each of these shades) ESRI NASA
  17. USGS Digital Elevation Models are generally 32-bit floating point …but

    the hillshade we drape them over is 8 bit integer. Basin and range province, near Elko, Nevada
  18. USGS Digital Elevation Models are generally 32-bit floating point …but

    the hillshade we drape them over is 8 bit integer. Basin and range province, near Elko, Nevada
  19. USGS Digital Elevation Models are generally 32-bit floating point …but

    the hillshade we drape them over is 8 bit integer. Basin and range province, near Elko, Nevada
  20. For a 1,000 x 1,000 cell raster: 1 bit: 0.125

    MB 8 bit: 1 MB 16 bit: 2 MB 24 bit: 3 MB 32 bit: 4 MB Doubling bit depth doubles our file sizes (recall that it’s 2n) Bits are relatively cheap resolution is expensive
  21. Just because your raster looks like this… …doesn’t mean that’s

    all the data there is! One of your values is (almost) always reserved for NoData (-9999 or 3.4 x 1038 are common)
  22. Some common bit depth conversion tools… 3. Copy the Raster

    Be careful, because the values you get out don’t always make a ton of sense.