Tarsier tutorial: Raster data

From CCoWS Wiki
Jump to: navigation, search

Outcomes

  • Learn about rasters
  • Get a raster
  • Import it into Tarsino, view it, and save it in Tarsier Raster Data format

What are raster data?

Raster data are gridded data such as images and gridded maps of landscape properties such as elevation. The grid is typically two-dimensional, with the dimensions representing coordinates such as latitutde and longitude.

Raster data and vector data are the most fundamental types of data used to represent landscapes. The same data can be stored in either vector or raster format, but depending on the type of information, one is usually a more efficient structure than the other. The key difference between these two data types are the way in which they obtain their spacial reference. Unlike vector data where each data point is given an x,y coordinate, rasters receive geographic reference by giving x,y coordinates to a single data point (usually the lower left grid cell corner). All the other data points are then referenced to that coordinate by specifying the structure of the grid: cell size, the number of rows and columns, and the projection (lat/long, utm, etc.).

Examples of data more appropriate for rasters include:

  • Maps of elevation/bathymetery (digital elevation models, DEMs)
  • Maps of precipitation
  • Satellite images
  • Aerial photos
  • Maps of land cover (also often represented as vector data)

Notice that most of these data are continuous and distributed throughout the landscape - i.e. every point on a landscape has an elevation and elevation varies continuously from point to point. Rasters are better suited for this kind of data, but if you wanted to map the 3500 ft contour line for example, a vector format would be more appropriate.

Another thing to consider is what you want to do with the data. Different analysis and visualization options are available for rasters and vectors. This is true for any GIS program including Tarsino.

You will find that Tarsier currently has more support for raster data both in terms of analysis and visualizations (is this true Fred?).

Obtaining raster data

Raster data are widely available on the web.

Useful Data Sources

Example: Topography of Kauai

Obtain a digital elevation model for a portion of the USA - e.g. Kauai

  1. Visit National Elevation Dataset (NED): http://ned.usgs.gov/
  2. Navigate to Seamless Data Distribution System (SDDS): http://seamless.usgs.gov/
    1. Select "Tools to Access Data" --> "Seamless Viewer"
    2. Warning: This server can be pretty slow. Be patient. Allow pop-ups. Use a small browser window.
  3. Select USA
  4. Zoom to Hawaiian Islands
  5. Zoom to Kauai - the northernmost island
  6. Click 'Download' on far right
  7. Select 'SRTM Finished 3 arc sec' i.e. the coarsest data available, since we just want a quick look
    1. If no options are shown, click "Modify Data Request", select what you want, and then click "Save and Return to Summary"
    2. How do arc seconds translate to meters? It depends on where you are on the planet. At the equator, one arc second is about 30 meters. Away from the equator, its less if you're talking longitude (east-west distances), but the same if you're talking latitude (north-south distances).
  • If higher resolution is needed, then select 1/3 arc sec' in all locations, or up to 1/9 arc sec' in select locations for the best data available (do this by clicking "modify data request"
  1. Select 'Download' tool on far left
  2. Use tool to define the smallest rectangle that includes the entire island
  3. A pop-up window appears. Before clicking 'Download' consider which file format you want:
    1. ArcMap Grid File Format - native ESRI ArcGIS format - can only be ready by ESRI products (pretty much)
    2. GeoTIFF File Format
    3. BIL File Format - Band-Interleaved binary format
    4. Grid Float File Format - This appears to be like the common Arc ASCII Grid format, but binary and in two files: 'flt' and 'hdr' (see .flt). Tarsier can import this format.
  4. Which one should I choose?
    1. ArcMap? Works fine, but its not ideal because you need to use ArcGIS software to convert it to .asc format. If you select ArcMap Grid, and you want to import to Tarsier, then you'll need to Convert Arc Grid file format to Arc ASCII Grid format
    2. GeoTIFF? These work in Tarsier, but apparently not in the 32-bit version that USGS is using.
    3. BIL? ...maybe
    4. Grid Float? Yes! Use this format.
  5. To select a different format to ArcMap Grid, click 'Modify data request'.
  6. Once the Grid flat format is chosen, click 'Download'
  7. Save zip to local machine and extract to folder

Importing raster data into Tarsier format

  1. Open Tarsier, select File-->Open and open the file.
  2. Locate the *.flt file, if your file is not showing you might need to change the file type filter to .flt(its the drop-down box under the file name). Once the file is selected click open.
  3. Once opened in Tarsier, save in Tarsier format.
    1. Save file as *.tra, File->Save As.
      1. The Tarsier Save Dialog should come up. The top yellow box is the raster viewer file*.trv. The second box is your raster file*.tra. Go to the second box and click the browse button. Browse to an appropriate folder and give the file a name. Click the 'Save All' Button.
  4. By the way, DEMS from USGS Seamless server are often (always?) in a Lat/Lon grid. Tarsier will resample this to a UTM grid autoimatically using the Raster resampler tool

Viewing raster data

TarsierRasterKauaiRainbow.jpg
  1. Open a the .tra file or the .trv
    1. The .tra is just the raster data, and the the viewer for the raster data. So when you open a .tra, you get default viewer. If you change the view settings (colors, zoom etc), you can save these in a .trv and re-open them later. Each .trv is associated with a .tra (and also a second .tra that can be used as a mask, but this is almost never done anymore).
  2. Zoom in and out:
    1. + and - Icons in main-window toolbar
  3. Change the color scheme:
    1. Menu --> Raster --> Color scheme
      1. Select 'Custom', then 'Rainbow'
  4. Save an image of your raster
    1. Menu --> Raster --> Grab image to file
      1. Saves a .jpg and a .bmp of how the raster looks on your screen
  5. Etc.:
    1. ...

Manipulating raster data

You can modify and analyze your raster data in many ways using the operations listed on the Raster menu (For more complex saveable analyses, separate Tarsier Analysis Modules should be used).

For example, you might notice that the Kauai SRTM DEM has 'NoData' holes in it, presumably because it was too for the radar to penetrate (the Kauai highlands are the rainiest place on earth I believe).

To fill the holes, you could select:

  • Menu --> Raster --> Tools --> Grow out all NoData.

There are some negative values in the data. Let's change them to NoData, then grow them out:

  1. Menu --> Raster --> Algebra --> Lo truncate
    1. For 'Set a truncation minimum', enter -1
  2. Menu --> Raster --> Algebra --> Replace --> -1, -9999 (-9999 means NoData to Tarsier)
  3. Menu --> Raster --> Tools --> Grow out all NoData

List of raster manipulations:

  1. Algebra etc.
    1. ...<things like 'multiply'>
    2. ...many more
  2. Tools
    1. Grow out all NoData. Iteratively fills NoData cells with values from adjacent non-NoData cells, until there are no more NoData cells. Good for roughly filling holes in raster layers.
    2. ...many more

Who has taken this tutorial?

Please enter your user name at the bottom of this list, and the date:

  • Nick M
  • ryanf
  • jonathan
  • jessicari
  • Brian
  • Alberto
  • Pam K-D 11/19/10

Next

Links