MEA582-001 Fall 2012 Jason Baker

thumbsshoesSoftware and s/w Development

Dec 11, 2013 (3 years and 6 months ago)

78 views

MEA582-001 Fall 2012 Jason Baker

Topic: Geospatial Analysis - Global, zonal and focal operations, & map algebra

Introduction
The purpose of this set of analyses is to perform a number of modifications and
calculations to raster datasets in order to better understand the data or to produce new
layers. We will use various tools to compute summaries of data, and raster algebra will be
used to modify or create new rasters.

Approach
In both programs, common tasks included using various methods (built-in operators or
calculate tools) to understand statistics about the rasters being investigated.
Reclassification tools were used in a number of ways, including combining aspects by
direction, and classifying land uses. NDVI was calculated in both programs, and this was
used to illustrate the important of using floating point operators rather than integers when
performing certain operations. We also used a variety of techniques to work with NULL
values to perform certain tasks like masking and working with areas (such as water)
which needed alternative consideration within the raster dataset. Small rasters were
combined into larger single rasters when appropriate to perform calculations on a larger
area. And zonal statistics were made to generalize about areas within datasets.

Results
In ArcGIS, a new field was added to the land cover raster, and was populated with the
area of each cell type in square meters. We then tabulated area, which produced a table
containing a field with zip codes, followed by a field for each of the seven land use types,
which was populated with the count of each type per zip code. We did similar
inspections of the land use data in GRASS, where we used summary data to look at
different resolutions, and found while the number of cells in each type classification
changed, the percentages were very close (though not exactly the same). We then used
reclassify to take aspect data and summarize it to eight directions (figure 1).

We then patched together four different rasters into a single combined raster. When this
was done, the display went from four different color scales (figure 3) to a single color
scale (figure 2) for the combined data set. The combined raster was then inspected in
ArcScene (figure 4). A similar process was taken in GRASS to combine rasters (figure
16) and visualized in NVIZ (figure 15).

We also computed a Normalized Difference Vegetation Index (NDVI) from landsat data,
in both ArcGIS (figure 5) and GRASS (figure 17). It is important that calculations
involving proportions or fractional data that floating point algebra is chosen, and not
integer. If integer calculations are done by mistake, the data may be rounded
inappropriately to the nearest integer (figure 6), or simply not correct.

The differences between the SRTM DSM and lidar-based NED DEMs were computed as
well using map algebra, in both ArcGIS (figure 7) and GRASS (figure 18). The GRASS
version was analyzed in further detail. Using the r.univar command, it appears the
mean level of the SRTM is about 3 meters higher. It also appears, looking at the map, that
the most of the differences between the two are positive, which would be consistent with
the SRTM values being higher. When the raster was edited to replace the zero values for
water with NULL, the height of the NED increased by about four meters.

Map algebra were also used in both GRASS and ArcGIS for a number of other functions.
We explored using Con and Pick to achieve the same goal of restricting land cover data
to a single class (figure 8), combining this with a raster of a different type (figure 9),
replacing certain values with NULL (figure 10) and using this to create a mask (figure
10). Similar results were achieved in GRASS by combining urban areas (figure 19) with
lakes (figure 20).

Further statistics were calculated in GRASS. We were able to determine the average
elevation value in individual zip code areas (figure 12) as an example of continuous data,
and a similar task with discrete data of finding the most common land use type (figure
13). We also used the nearest neighbor function for finding diversity of land use types
(figure 14). Using a distance of 7 cells, we saw a range of 1 to 18 different units; this is
higher than I would have expected, but I imagine the number would go down at a smaller
distance of analysis and up with a higher unit. Similarly, nearest neighbor can be used to
“smooth” a raster; I would imagine more gradual changes would occur for a higher
number of neighborhood size.

Discussion
I was unable to get mask creation or tilted planes working within GRASS. In both cases, I
encountered the same error, stating that “The system cannot find the file specified.”
However, unfortunately this error was not particularly verbose such that I could
determine which dataset GRASS was unable to find. I double-checked the names in both
cases, and used d.rast to verify that the files I was referencing indeed existed. I am
unfortunately not familiar enough with the r.mapcalc syntax to determine if there was
a syntactical error causing the problem.

I also noted that the “compute acreage” step in ArcGIS in fact seemed to calculate the
number of square meters, rather than the acreage, of each land use class, though dividing
by 4046.86 should yield the acres.

What I learned

As I’ve stated in previous assignments, most of my prior work in GIS has been with
vector data, so many of the explorations in raster analysis are new to me. One of the
challenges for me is that the datasets seem more abstract, and that I am frequently having
to stop and ask myself what the results I am looking at actually mean. For example, I
was unfamiliar with NDVI prior to this assignment, and spent some time in outside
sources reading about what the calculation meant and how it might be used. It seems like
the raster algebra tools in both applications could be very powerful to a trained user.


Figure 1: Aspect map reclassed by direction

Figure 2: Merged rasters

Figure 3: Rasters side-by-side before merging

Figure 4: Merged rasters displayed in ArcScene


Figure 5: NDVI calculation (floating point)

Figure 6: NDVI calculation (integer, not valid)

Figure 7: Differences between SRTM and NED

Figure 8: Limiting classes using Con / Pick

Figure 9: Combining lakes and land use

Figure 10: Setting null values

Figure 11: Creating a mask Figure 12: Average elevation values by zipcode



Figure 13: Most common land use type by zip code


Figure 14: Land use diversity

Figure 15: Combined raster visualized in nviz


Figure 26: Combined raster in GRASS

Figure 17: NDVI calculated in GRASS

Figure 18: SRTM and NED compared in GRASS

Figure 19: Urban areas


Figure 20: Urban areas and lakes