Revision e6e6f64f
Added by Jim Regetz over 13 years ago
- ID e6e6f64f5f21f0ee5ae2f4f5c659152975abd788
terrain/boundary/boundary.Rnw | ||
---|---|---|
12 | 12 |
% |
13 | 13 |
% To extract R code from within R: |
14 | 14 |
% Stangle("<filename.Rnw>", annotate=FALSE) |
15 |
\documentclass[8pt]{article} |
|
16 |
\usepackage{fancyhdr} |
|
15 |
\documentclass{article} |
|
17 | 16 |
\usepackage[font=small,labelfont=bf]{caption} |
18 | 17 |
\usepackage[font=normalsize,singlelinecheck=false]{subfig} |
19 |
|
|
20 |
|
|
21 |
\title{SRTM/ASTER boundary analysis} |
|
22 |
\author{Jim Regetz} |
|
23 |
\date{Last update: 08 Jul 2011} |
|
24 |
|
|
25 |
%\SweaveOpts{echo=true} |
|
18 |
\usepackage{enumitem} |
|
26 | 19 |
\usepackage[utf8]{inputenc} |
27 | 20 |
\usepackage{a4wide} |
28 | 21 |
\usepackage{verbatim} |
... | ... | |
31 | 24 |
\usepackage{color} |
32 | 25 |
\usepackage{xspace} |
33 | 26 |
|
34 |
\pagestyle{fancy} |
|
35 |
\rfoot{} |
|
36 |
\cfoot{\Large\thepage} |
|
37 |
\renewcommand {\headrulewidth}{0pt} |
|
38 |
\renewcommand {\footrulewidth}{0pt} |
|
39 |
|
|
40 |
% define degree command for convenience |
|
41 |
\newcommand{\N}{\ensuremath{^\circ\mbox{N}}\xspace} |
|
42 |
\newcommand{\W}{\ensuremath{^\circ\mbox{W}}\xspace} |
|
43 |
|
|
27 |
% shrink list item spacing |
|
28 |
\setlist{noitemsep} |
|
44 | 29 |
|
45 | 30 |
% set some listings options |
46 | 31 |
\lstset{ |
47 |
basicstyle=\small\ttfamily,
|
|
32 |
basicstyle=\footnotesize\ttfamily,
|
|
48 | 33 |
stringstyle=\ttfamily, |
49 | 34 |
commentstyle=\itshape\ttfamily, |
50 | 35 |
showstringspaces=false, |
51 | 36 |
} |
52 | 37 |
|
38 |
% define degree command for convenience |
|
39 |
\newcommand{\N}{\ensuremath{^\circ\mbox{N}}\xspace} |
|
40 |
\newcommand{\W}{\ensuremath{^\circ\mbox{W}}\xspace} |
|
41 |
|
|
42 |
% add page numbers, but no headers |
|
43 |
\thispagestyle{plain} |
|
44 |
|
|
45 |
\title{SRTM/ASTER boundary analysis} |
|
46 |
\author{Jim Regetz} |
|
47 |
\date{Last update: 12 Jul 2011} |
|
48 |
|
|
53 | 49 |
\begin{document} |
54 | 50 |
|
55 | 51 |
\maketitle |
... | ... | |
98 | 94 |
|
99 | 95 |
\paragraph{To do (possibly)} |
100 | 96 |
\begin{itemize} |
101 |
\item add constant offset to ASTER? or maybe a modeled offset (e.g., as |
|
102 |
a function of elevation)? |
|
97 |
\item add constant offset to ASTER? |
|
103 | 98 |
\item smooth ASTER? |
104 | 99 |
\end{itemize} |
105 | 100 |
|
106 | 101 |
\clearpage |
107 | 102 |
|
103 |
%----------------------------------------------------------------------- |
|
108 | 104 |
\section{Terrain layer production methodology} |
105 |
%----------------------------------------------------------------------- |
|
109 | 106 |
|
110 | 107 |
For the purposes of assessing artifacts associated with the 60\N boundary |
111 | 108 |
between SRTM and ASTER, I used a narrow band along the 60\N boundary in |
... | ... | |
116 | 113 |
to a $\sim$30k ($2^{15}$) limit to the input raster dimension size in |
117 | 114 |
the pre-built GRASS \texttt{r.terraflow} module I used. |
118 | 115 |
|
119 |
\begin{figure}%[htp] |
|
120 |
\caption{Focal area} |
|
121 |
\centering |
|
122 |
<<echo=FALSE,results=hide,fig=TRUE,height=5,width=7>>= |
|
123 |
par(omi=c(0,0,0,0)) |
|
124 |
library(raster) |
|
125 |
library(maps) |
|
126 |
demdir <- "/home/regetz/media/temp/terrain/dem/" |
|
127 |
dem <- raster(file.path(demdir, "fused_300straddle.tif")) |
|
128 |
map("world", xlim=c(-140,-70), ylim=c(40, 70), fill=TRUE, col="grey", |
|
129 |
mar=c(4,0,0,0)) |
|
130 |
grid(col="darkgray") |
|
131 |
axis(1) |
|
132 |
axis(2) |
|
133 |
box() |
|
134 |
plot(extent(dem), col="red", add=TRUE) |
|
135 |
arrows(-110, 57, -113, 59.7, col="red", length=0.1) |
|
136 |
text(-110, 57, labels="focal region", col="red", font=3, pos=1) |
|
137 |
@ |
|
138 |
\label{focal-area} |
|
139 |
\end{figure} |
|
140 |
|
|
141 |
\begin{figure} |
|
142 |
\caption{SRTM/ASTER DEM fusion configurations} |
|
143 |
\centering |
|
144 |
\subfloat[Simple fusion]{ |
|
145 |
\label{blend-simple} |
|
146 |
<<echo=FALSE,results=hide,fig=TRUE, height=3, width=6>>= |
|
147 |
par(omi=c(0,0,0,0), mar=c(4,4,0,2)+0.1) |
|
148 |
plot(0, xlim=c(-150, 150), ylim=c(0, 1), type="n", xaxt="n", yaxt="n", |
|
149 |
bty="n", xlab="Latitude", ylab=NA) |
|
150 |
rect(0, 0, 150, 0.75, col="red", density=5, angle=45) |
|
151 |
rect(-150, 0, 0, 0.75, col="blue", density=5, angle=135) |
|
152 |
# axis(1, at=seq(-120, 120, by=60), labels=seq(59.9, 60.1, by=0.05)) |
|
153 |
axis(1, at=seq(-150, 150, by=75), labels=c(59.875, NA, 60, NA, 60.125)) |
|
154 |
text(-150, 0.9, labels="SRTM", pos=4, col="blue") |
|
155 |
text(150, 0.9, labels="ASTER", pos=2, col="red") |
|
156 |
@ |
|
157 |
}\\ |
|
158 |
\subfloat[Multiresolution spline]{ |
|
159 |
\label{blend-multires} |
|
160 |
<<echo=FALSE,results=hide,fig=TRUE, height=3, width=6>>= |
|
161 |
par(omi=c(0,0,0,0), mar=c(4,4,0,2)+0.1) |
|
162 |
plot(0, xlim=c(-150, 150), ylim=c(0, 1), type="n", xaxt="n", yaxt="n", |
|
163 |
bty="n", xlab="Latitude", ylab=NA) |
|
164 |
rect(-75, 0, 0, 0.75, col="lightgray") |
|
165 |
rect(-75, 0, 150, 0.75, col="red", density=5, angle=45) |
|
166 |
rect(-150, 0, 0, 0.75, col="blue", density=5, angle=135) |
|
167 |
#axis(1, at=seq(-150, 150, by=60), labels=seq(59.875, 60.125, by=0.05)) |
|
168 |
#axis(1, at=0, labels=60, col="red", cex=0.85) |
|
169 |
#axis(1, at=seq(-120, 120, by=60), labels=seq(59.9, 60.1, by=0.05)) |
|
170 |
axis(1, at=seq(-150, 150, by=75), labels=c(59.875, NA, 60, NA, 60.125)) |
|
171 |
text(-150, 0.9, labels="SRTM", pos=4, col="blue") |
|
172 |
text(-37.5, 0.8, labels="overlap", pos=3, font=3) |
|
173 |
text(150, 0.9, labels="ASTER", pos=2, col="red") |
|
174 |
@ |
|
175 |
}\\ |
|
176 |
\subfloat[Gaussian weighted average]{ |
|
177 |
\label{blend-gaussian} |
|
178 |
<<echo=FALSE,results=hide,fig=TRUE, height=3, width=6>>= |
|
179 |
par(omi=c(0,0,0,0), mar=c(4,4,1,2)+0.1) |
|
180 |
curve(exp(-0.001*x^2), from=-150, to=0, xlim=c(-150, 150), col="red", |
|
181 |
xaxt="n", bty="n", xlab="Latitude", ylab="Weighting") |
|
182 |
curve(1+0*x, from=0, to=150, add=TRUE, col="red") |
|
183 |
curve(1-exp(-0.001*x^2), from=-150, to=0, add=TRUE, col="blue") |
|
184 |
#axis(1, at=seq(-150, 150, by=60), labels=seq(59.875, 60.125, by=0.05)) |
|
185 |
#axis(1, at=0, labels=60, col="red", cex=0.85) |
|
186 |
#axis(1, at=seq(-120, 120, by=60), labels=seq(59.9, 60.1, by=0.05)) |
|
187 |
axis(1, at=seq(-150, 150, by=75), labels=c(59.875, NA, 60, NA, 60.125)) |
|
188 |
text(-100, 0.6, labels="gaussian\nblend") |
|
189 |
text(-140, 0.9, labels="SRTM", col="blue", pos=4) |
|
190 |
text(-140, 0.1, labels="ASTER", col="red", pos=4) |
|
191 |
@ |
|
192 |
} |
|
193 |
\end{figure} |
|
194 |
|
|
195 | 116 |
\paragraph{Elevation} This document includes latitudinal |
196 | 117 |
characterizations of terrain values based on three different variants of |
197 | 118 |
a fused ASTER/SRTM DEM. I also explored (and briefly describe below) two |
... | ... | |
294 | 215 |
Flow direction was calculated using the GRASS \texttt{r.terraflow} |
295 | 216 |
module; see code listing \ref{code-flowdir}. The default flow direction |
296 | 217 |
output of this module is encoded so as to indicate \emph{all} downslope |
297 |
neighbors, also known as the Multiple Flow Direction (MFD) model. However, to
|
|
298 |
simplify post-processing and summarization, the results here are based
|
|
299 |
on an alternative Single Flow Direction (SFD, \emph{a.k.a.} D8) model,
|
|
300 |
which indicates the neighbor associated with the steepest downslope
|
|
301 |
gradient. Note that this is equivalent to what ArcGIS GRID |
|
218 |
neighbors, also known as the Multiple Flow Direction (MFD) model. |
|
219 |
However, to simplify post-processing and summarization, the results here
|
|
220 |
are based on an alternative Single Flow Direction (SFD, \emph{a.k.a.}
|
|
221 |
D8) model, which indicates the neighbor associated with the steepest
|
|
222 |
downslope gradient. Note that this is equivalent to what ArcGIS GRID
|
|
302 | 223 |
\texttt{flowaccumulation} command does. I then recoded the output raster |
303 | 224 |
to use the same azimuth directions used by \texttt{gdaldem aspect}, as |
304 | 225 |
described above for aspect. |
305 | 226 |
|
306 |
% |
|
307 |
% Elevation differences between SRTM and ASTER |
|
308 |
% |
|
309 | 227 |
|
228 |
%----------------------------------------------------------------------- |
|
229 |
\section{Latitudinal mean terrain profiles} |
|
230 |
%----------------------------------------------------------------------- |
|
231 |
|
|
232 |
% first compute some values to use in the text |
|
310 | 233 |
<<echo=FALSE,results=hide>>= |
311 | 234 |
library(raster) |
312 | 235 |
demdir <- "/home/regetz/media/temp/terrain/dem/" |
... | ... | |
318 | 241 |
extent(d.srtm)))) |
319 | 242 |
@ |
320 | 243 |
|
321 |
\begin{figure} |
|
322 |
\caption{ASTER vs SRTM elevation comparisons} |
|
323 |
\centering |
|
324 |
\subfloat[Boxplots of the arithmetic difference in elevations (ASTER - |
|
325 |
SRTM), summarized across a series of ASTER elevation bins. Boxes |
|
326 |
include the median (horizontal band), 1st and 3rd quartiles (box |
|
327 |
extents), and $\pm$1.5$\times$IQR (whiskers). Gray numbers above each whisker |
|
328 |
indicates how many thousands of pixels are included in the |
|
329 |
corresponding summary. Dashed red line indicates the median difference |
|
330 |
across all pixels south of 60\N.]{ |
|
331 |
\includegraphics[width=\linewidth]{../dem/aster-srtm-bins.png} |
|
332 |
\label{aster-srtm-bins} |
|
333 |
}\\ |
|
334 |
\subfloat[Pixel-wise plot of ASTER vs SRTM for all values in the 150 |
|
335 |
latitudinal rows of overlap south of 60\N. Dashed blue line indicates |
|
336 |
the 1:1 diagonal, and the parallel red line is offset lower by the |
|
337 |
observed median difference between ASTER and SRTM |
|
338 |
(\Sexpr{delta.median}).]{ |
|
339 |
\includegraphics[width=\linewidth]{../dem/aster-srtm-scatter.png} |
|
340 |
\label{aster-srtm-scatter} |
|
341 |
} |
|
342 |
\label{aster-srtm} |
|
343 |
\end{figure} |
|
344 |
|
|
345 |
% |
|
346 |
% Latitudinal terrain profiles (means) |
|
347 |
% |
|
348 |
|
|
349 |
\begin{figure} |
|
350 |
\centering |
|
351 |
\caption{Mean elevation (m)} |
|
352 |
\includegraphics[page=1, trim=1in 1in 1in 1in, width=\linewidth]{../dem/elevation-assessment.pdf} |
|
353 |
\label{mean-elevation} |
|
354 |
\end{figure} |
|
355 |
\begin{figure} |
|
356 |
\centering |
|
357 |
\caption{Mean slope (degrees)} |
|
358 |
\includegraphics[page=1, trim=1in 1in 1in 1in, width=\linewidth]{../slope/slope-assessment.pdf} |
|
359 |
\label{mean-slope} |
|
360 |
\end{figure} |
|
361 |
\begin{figure} |
|
362 |
\centering |
|
363 |
\caption{Circular mean aspect (azimuth)} |
|
364 |
\includegraphics[page=1, trim=1in 1in 1in 1in, width=\linewidth]{../aspect/aspect-assessment.pdf} |
|
365 |
\label{mean-aspect} |
|
366 |
\end{figure} |
|
367 |
\begin{figure} |
|
368 |
\centering |
|
369 |
\caption{Circular mean flow direction} |
|
370 |
\includegraphics[page=1, trim=1in 1in 1in 1in, width=\linewidth]{../flow/flowdir-assessment.pdf} |
|
371 |
\label{mean-flowdir} |
|
372 |
\end{figure} |
|
373 |
|
|
374 |
\clearpage |
|
375 |
|
|
376 |
\section{Latitudinal mean terrain profiles} |
|
377 |
|
|
378 | 244 |
\paragraph{Elevation} ASTER, SRTM, and the Canada DEM all share a very |
379 | 245 |
similarly shaped mean elevation profile, but with differing heights |
380 | 246 |
(Figure \ref{mean-elevation}). SRTM tends to be highest, ASTER is |
... | ... | |
414 | 280 |
|
415 | 281 |
Note that the the Canada DEM tends to be flatter than both ASTER and |
416 | 282 |
SRTM (presumably because it is at least partially derived from |
417 |
contour-based data \textbf{\color{red}[todo: check!]}. Moreover, this figure makes it |
|
418 |
clear that the Canada DEM has some major artifacts at regular intervals. |
|
419 |
The spike especially at 60\N (which coincides with provincial boundaries |
|
420 |
across the entirety of western Canada) means we probably need to scuttle |
|
421 |
our plans to use this DEM as a reference dataset for boundary analysis. |
|
283 |
contour-based data \textbf{\color{red}[todo: check!]}. Moreover, this |
|
284 |
figure makes it clear that the Canada DEM has some major artifacts at |
|
285 |
regular intervals. The spike especially at 60\N (which coincides with |
|
286 |
provincial boundaries across the entirety of western Canada) means we |
|
287 |
probably need to scuttle our plans to use this DEM as a reference |
|
288 |
dataset for boundary analysis. |
|
422 | 289 |
|
423 | 290 |
The simple fused layer exhibits a dramatic spike in slope at the |
424 | 291 |
immediate 60\N boundary, undoubtedly associated with the artificial |
... | ... | |
481 | 348 |
the lower elevation ASTER to the north with higher elevation SRTM to the |
482 | 349 |
south. |
483 | 350 |
|
351 |
\paragraph{Flow direction} With the exception of edge effects at the |
|
352 |
margins of the input rasters, mean ASTER-derived flow is northward at |
|
353 |
all latitudes, and SRTM-derived flow is northward at nearly all |
|
354 |
latitudes (Figure \ref{mean-flowdir}). This seems reasonable considering |
|
355 |
that most pixels in this Canada test region fall in the Arctic drainage. |
|
356 |
For unknown reasons, the Canada DEM produces southward mean flow |
|
357 |
direction at numerous latitudes, and generally seems to have a slightly |
|
358 |
more eastward tendency. As was the case with aspect, note that a general |
|
359 |
north-south bias is evident (Figure \ref{rose-diag-flowdir}), again |
|
360 |
likely due to use of an unprojected raster at high latitudes. |
|
361 |
|
|
362 |
The various fused layer profiles look as one would expect (Figure |
|
363 |
\ref{mean-flowdir}), although the overall lack of latitudinal |
|
364 |
variability in mean flow direction in SRTM, ASTER, and all three derived |
|
365 |
layers makes it hard to say much more than that. |
|
366 |
|
|
367 |
%----------------------------------------------------------------------- |
|
368 |
\section{Informal correlation analysis} |
|
369 |
%----------------------------------------------------------------------- |
|
370 |
|
|
371 |
\paragraph{Elevation} |
|
372 |
Correlations between ASTER and SRTM are quite high, typically >0.999, |
|
373 |
and RMSEs are on the order of 10-15 meters (Figures \ref{corr-elevation} |
|
374 |
and \ref{rmse-elevation}). Spikes (downward for correlation, upward for |
|
375 |
RMSE) occur at some latitudes, which I speculate are associated with |
|
376 |
the observed extreme spikes in the ASTER DEM itself. As expected, the |
|
377 |
multiresolution spline and Gaussian weighted average both produce layers |
|
378 |
that gradually become less similar to ASTER and more similar to SRTM |
|
379 |
moving south from 60\N, but in slightly different ways. This gradual |
|
380 |
transition is less evident when considering associations with the Canada |
|
381 |
DEM (bottom panels of Figures \ref{corr-elevation} and |
|
382 |
\ref{rmse-elevation}), which in general is less correlated with SRTM, |
|
383 |
and even less with ASTER, than those two layers are with each others. |
|
384 |
|
|
385 |
\paragraph{Slope} |
|
386 |
The patterns of slope layer similarity are much like those described |
|
387 |
above for elevation, although the correlations are somewhat lower |
|
388 |
($\sim$0.94 between SRTM and ASTER (Figure \ref{corr-slope})). RMSEs |
|
389 |
between SRTM and ASTER are approximately 2 at all latitudes where the |
|
390 |
data co-occur (Figure \ref{rmse-slope}). Another difference, echoing a |
|
391 |
pattern previously noted in the profiles of mean slope itself, is that |
|
392 |
Gaussian weighted averaging produces a layer that exhibits a gradual |
|
393 |
transition from ASTER to SRTM, whereas the multiresolution spline yields |
|
394 |
an abrupt transition. Not surprisingly, the simple fused layer is even |
|
395 |
worse, producing not only a sudden transiton but also abberant values |
|
396 |
right at the fusion seam; note downward (upward) spikes in correlation |
|
397 |
(RMSE) at 60\N in the first column of plots in Figures \ref{corr-slope} |
|
398 |
and \ref{rmse-slope}. |
|
399 |
|
|
400 |
\paragraph{Aspect} |
|
401 |
Because aspect values are on a circular scale, I calculated modified |
|
402 |
versions of the Pearson correlation coefficient using the |
|
403 |
\textbf{circular} R package function \texttt{cor.circular}. I believe |
|
404 |
this implements the formula described by Jammalamadaka \& Sarma (1988): |
|
405 |
\begin{equation} |
|
406 |
r = \frac |
|
407 |
{\sum_{i=1}^{n} \sin(x_i-\bar{x}) \sin(y_i-\bar{y})} |
|
408 |
{\sqrt{\sum_{i=1}^{n} \sin(x_i-\bar{x})^2} |
|
409 |
\sqrt{\sum_{i=1}^{n} \sin(y_i-\bar{y})^2}} |
|
410 |
\label{eq-ccor} |
|
411 |
\end{equation} |
|
412 |
where $x_i$ and $y_i$ are aspect values (in radians) for pixel $i$, and |
|
413 |
$\bar{x}$ and $\bar{y}$ are circular means calculated as in Equation |
|
414 |
\ref{eq-cmean}. |
|
415 |
|
|
416 |
To calculate RMSEs for aspect, I did not use trigonometric properties in |
|
417 |
the same way as for computing correlation, but instead imposed a simple |
|
418 |
correction whereby all pairwise differences were computed using the |
|
419 |
shorter of the two paths around the compass wheel (Equation |
|
420 |
\ref{eq-circ-rmse}). For example, the difference between 0$^\circ$ and |
|
421 |
150$^\circ$ is 150$^\circ$, but the difference between 0$^\circ$ and |
|
422 |
250$^\circ$ is 110$^\circ$. |
|
423 |
|
|
424 |
\begin{eqnarray} |
|
425 |
\label{eq-circ-rmse} |
|
426 |
&RMSE = \sqrt{\frac{\sum_{i=1}^{n} (\Delta_i^2)}{n}}\\ \nonumber |
|
427 |
&\mbox{where } |
|
428 |
\Delta_i = \mbox{argmin} \left (|x_i-y_i|, 360-|x_i - y_i| \right ) |
|
429 |
\end{eqnarray} |
|
430 |
|
|
431 |
Circular correlations between SRTM and ASTER were surprisingly low, |
|
432 |
typically hovering around 0.5, but dipping down towards zero at numerous |
|
433 |
latitudes (Figure \ref{corr-flowdir}). The corresponding RMSE is close |
|
434 |
to 70 at all latitudes, surprisingly high considering that the maximum |
|
435 |
difference between any two pixels is 180$^\circ$ (Figure |
|
436 |
\ref{rmse-flowdir}). Comparison of SRTM and ASTER with the Canada DEM |
|
437 |
yields similar patterns. |
|
438 |
|
|
439 |
For both of the blended layers (multiresolution spline and Gaussian |
|
440 |
weighted average), aspect values calculated in the zone of ASTER/SRTM |
|
441 |
overlap appear to be \emph{less} similar to the component DEMs than |
|
442 |
those to data sources are to each other. As evident in the upper middle |
|
443 |
and upper right panels of Figure \ref{corr-flowdir}, correlations |
|
444 |
between fused aspect and aspect based on the original SRTM and ASTER |
|
445 |
images are substantially \emph{negative} for many latitudes in the zone |
|
446 |
of overlap. I don't have a good feel for what's going on here, although |
|
447 |
it part that may be because I don't have a great intuition for how the |
|
448 |
circular correlation statistic might be responding to patterns in the |
|
449 |
data. Note that the latitudinal profile of aspect RMSEs is less |
|
450 |
worrisome (upper middle and upper right panels of Figure |
|
451 |
\ref{rmse-flowdir}) and more closely resembles the profile of slope |
|
452 |
RMSEs discussed above, particularly as regards the more gradual |
|
453 |
transition in case of Gaussian weighted averaging compared to the |
|
454 |
multiresolution spline. |
|
455 |
|
|
456 |
\paragraph{Flow direction} |
|
457 |
As with aspect, circular correlation coefficients and adjusted RMSEs |
|
458 |
were calculated for each latitudinal band. Flow direciton correlations |
|
459 |
between SRTM and ASTER are slightly lower than for aspect, typically |
|
460 |
around 0.40 but spiking negative at a handful of latitudes (Figure |
|
461 |
\ref{corr-flowdir}). RMSEs hover consistenly around $\sim$75, slightly |
|
462 |
lower than was the case with aspect (Figure \ref{rmse-flowdir}). |
|
463 |
|
|
464 |
Aside from an expected artifact at the southern image edge, and an |
|
465 |
unexpected (and as-yet unexplained) negative spike at $\sim$59.95\N, the |
|
466 |
correlation profiles are fairly well-behaved for both blended layers, |
|
467 |
and don't show the same odd behavior as was the case for aspect. Again |
|
468 |
it is clear that the multiresultion spline results in a much more abrupt |
|
469 |
transition than does the Gaussian weighted average. The RMSE flow |
|
470 |
direction profiles echo this pattern (Figure \ref{rmse-flowdir}), and |
|
471 |
indeed look almost the same as those computed using aspect (Figure |
|
472 |
\ref{rmse-aspect}). |
|
473 |
|
|
474 |
%----------------------------------------------------------------------- |
|
475 |
% FIGURES |
|
476 |
%----------------------------------------------------------------------- |
|
477 |
|
|
478 |
\clearpage |
|
479 |
|
|
480 |
% |
|
481 |
% Figure: Boundary analysis region |
|
482 |
% |
|
483 |
\begin{figure}[h] |
|
484 |
\caption{Focal area} |
|
485 |
\centering |
|
486 |
<<echo=FALSE,results=hide,fig=TRUE,height=5,width=7>>= |
|
487 |
par(omi=c(0,0,0,0)) |
|
488 |
library(raster) |
|
489 |
library(maps) |
|
490 |
demdir <- "/home/regetz/media/temp/terrain/dem/" |
|
491 |
dem <- raster(file.path(demdir, "fused_300straddle.tif")) |
|
492 |
map("world", xlim=c(-140,-70), ylim=c(40, 70), fill=TRUE, col="grey", |
|
493 |
mar=c(4,0,0,0)) |
|
494 |
grid(col="darkgray") |
|
495 |
axis(1) |
|
496 |
axis(2) |
|
497 |
box() |
|
498 |
plot(extent(dem), col="red", add=TRUE) |
|
499 |
arrows(-110, 57, -113, 59.7, col="red", length=0.1) |
|
500 |
text(-110, 57, labels="focal region", col="red", font=3, pos=1) |
|
501 |
@ |
|
502 |
\label{focal-area} |
|
503 |
\end{figure} |
|
504 |
|
|
505 |
% |
|
506 |
% Figure: Fusion methods |
|
507 |
% |
|
508 |
\begin{figure} |
|
509 |
\caption{SRTM/ASTER DEM fusion configurations} |
|
510 |
\centering |
|
511 |
\subfloat[Simple fusion]{ |
|
512 |
\label{blend-simple} |
|
513 |
<<echo=FALSE,results=hide,fig=TRUE, height=3, width=6>>= |
|
514 |
par(omi=c(0,0,0,0), mar=c(4,4,0,2)+0.1) |
|
515 |
plot(0, xlim=c(-150, 150), ylim=c(0, 1), type="n", xaxt="n", yaxt="n", |
|
516 |
bty="n", xlab="Latitude", ylab=NA) |
|
517 |
rect(0, 0, 150, 0.75, col="red", density=5, angle=45) |
|
518 |
rect(-150, 0, 0, 0.75, col="blue", density=5, angle=135) |
|
519 |
# axis(1, at=seq(-120, 120, by=60), labels=seq(59.9, 60.1, by=0.05)) |
|
520 |
axis(1, at=seq(-150, 150, by=75), labels=c(59.875, NA, 60, NA, 60.125)) |
|
521 |
text(-150, 0.9, labels="SRTM", pos=4, col="blue") |
|
522 |
text(150, 0.9, labels="ASTER", pos=2, col="red") |
|
523 |
@ |
|
524 |
}\\ |
|
525 |
\subfloat[Multiresolution spline]{ |
|
526 |
\label{blend-multires} |
|
527 |
<<echo=FALSE,results=hide,fig=TRUE, height=3, width=6>>= |
|
528 |
par(omi=c(0,0,0,0), mar=c(4,4,0,2)+0.1) |
|
529 |
plot(0, xlim=c(-150, 150), ylim=c(0, 1), type="n", xaxt="n", yaxt="n", |
|
530 |
bty="n", xlab="Latitude", ylab=NA) |
|
531 |
rect(-75, 0, 0, 0.75, col="lightgray") |
|
532 |
rect(-75, 0, 150, 0.75, col="red", density=5, angle=45) |
|
533 |
rect(-150, 0, 0, 0.75, col="blue", density=5, angle=135) |
|
534 |
#axis(1, at=seq(-150, 150, by=60), labels=seq(59.875, 60.125, by=0.05)) |
|
535 |
#axis(1, at=0, labels=60, col="red", cex=0.85) |
|
536 |
#axis(1, at=seq(-120, 120, by=60), labels=seq(59.9, 60.1, by=0.05)) |
|
537 |
axis(1, at=seq(-150, 150, by=75), labels=c(59.875, NA, 60, NA, 60.125)) |
|
538 |
text(-150, 0.9, labels="SRTM", pos=4, col="blue") |
|
539 |
text(-37.5, 0.8, labels="overlap", pos=3, font=3) |
|
540 |
text(150, 0.9, labels="ASTER", pos=2, col="red") |
|
541 |
@ |
|
542 |
}\\ |
|
543 |
\subfloat[Gaussian weighted average]{ |
|
544 |
\label{blend-gaussian} |
|
545 |
<<echo=FALSE,results=hide,fig=TRUE, height=3, width=6>>= |
|
546 |
par(omi=c(0,0,0,0), mar=c(4,4,1,2)+0.1) |
|
547 |
curve(exp(-0.001*x^2), from=-150, to=0, xlim=c(-150, 150), col="red", |
|
548 |
xaxt="n", bty="n", xlab="Latitude", ylab="Weighting") |
|
549 |
curve(1+0*x, from=0, to=150, add=TRUE, col="red") |
|
550 |
curve(1-exp(-0.001*x^2), from=-150, to=0, add=TRUE, col="blue") |
|
551 |
#axis(1, at=seq(-150, 150, by=60), labels=seq(59.875, 60.125, by=0.05)) |
|
552 |
#axis(1, at=0, labels=60, col="red", cex=0.85) |
|
553 |
#axis(1, at=seq(-120, 120, by=60), labels=seq(59.9, 60.1, by=0.05)) |
|
554 |
axis(1, at=seq(-150, 150, by=75), labels=c(59.875, NA, 60, NA, 60.125)) |
|
555 |
text(-100, 0.6, labels="gaussian\nblend") |
|
556 |
text(-140, 0.9, labels="SRTM", col="blue", pos=4) |
|
557 |
text(-140, 0.1, labels="ASTER", col="red", pos=4) |
|
558 |
@ |
|
559 |
} |
|
560 |
\end{figure} |
|
561 |
|
|
562 |
% |
|
563 |
% Figure: Mean latitudinal profiles |
|
564 |
% |
|
565 |
\begin{figure} |
|
566 |
\centering |
|
567 |
\caption{Mean elevation (m)} |
|
568 |
\includegraphics[page=1, trim=1in 1in 1in 1in, width=\linewidth]{../dem/elevation-assessment.pdf} |
|
569 |
\label{mean-elevation} |
|
570 |
\end{figure} |
|
571 |
\begin{figure} |
|
572 |
\centering |
|
573 |
\caption{Mean slope (degrees)} |
|
574 |
\includegraphics[page=1, trim=1in 1in 1in 1in, width=\linewidth]{../slope/slope-assessment.pdf} |
|
575 |
\label{mean-slope} |
|
576 |
\end{figure} |
|
577 |
\begin{figure} |
|
578 |
\centering |
|
579 |
\caption{Circular mean aspect (azimuth)} |
|
580 |
\includegraphics[page=1, trim=1in 1in 1in 1in, width=\linewidth]{../aspect/aspect-assessment.pdf} |
|
581 |
\label{mean-aspect} |
|
582 |
\end{figure} |
|
583 |
\begin{figure} |
|
584 |
\centering |
|
585 |
\caption{Circular mean flow direction} |
|
586 |
\includegraphics[page=1, trim=1in 1in 1in 1in, width=\linewidth]{../flow/flowdir-assessment.pdf} |
|
587 |
\label{mean-flowdir} |
|
588 |
\end{figure} |
|
589 |
|
|
590 |
% |
|
591 |
% Figure: ASTER vs SRTM elevation patterns |
|
592 |
% |
|
593 |
\begin{figure} |
|
594 |
\caption{ASTER vs SRTM elevation comparisons} |
|
595 |
\centering |
|
596 |
\subfloat[Boxplots of the arithmetic difference in elevations (ASTER - |
|
597 |
SRTM), summarized across a series of ASTER elevation bins. Boxes |
|
598 |
include the median (horizontal band), 1st and 3rd quartiles (box |
|
599 |
extents), and $\pm$1.5$\times$IQR (whiskers). Gray numbers above each |
|
600 |
whisker indicates how many thousands of pixels are included in the |
|
601 |
corresponding summary. Dashed red line indicates the median difference |
|
602 |
across all pixels south of 60\N.]{ |
|
603 |
\includegraphics[width=\linewidth]{../dem/aster-srtm-bins.png} |
|
604 |
\label{aster-srtm-bins} |
|
605 |
}\\ |
|
606 |
\subfloat[Pixel-wise plot of ASTER vs SRTM for all values in the 150 |
|
607 |
latitudinal rows of overlap south of 60\N. Dashed blue line indicates |
|
608 |
the 1:1 diagonal, and the parallel red line is offset lower by the |
|
609 |
observed median difference between ASTER and SRTM |
|
610 |
(\Sexpr{delta.median}).]{ |
|
611 |
\includegraphics[width=\linewidth]{../dem/aster-srtm-scatter.png} |
|
612 |
\label{aster-srtm-scatter} |
|
613 |
} |
|
614 |
\label{aster-srtm} |
|
615 |
\end{figure} |
|
616 |
|
|
617 |
% |
|
618 |
% Figures: Aspect rose diagrams |
|
619 |
% |
|
484 | 620 |
\begin{figure}[h!] |
485 | 621 |
\caption{Binned frequency distributions of aspect within two selected |
486 | 622 |
latitudinal strips: (a) within the SRTM-ASTER blend zone, and (b) |
... | ... | |
516 | 652 |
\label{rose-diag-aspect} |
517 | 653 |
\end{figure} |
518 | 654 |
|
519 |
\paragraph{Flow direction} With the exception of edge effects at the |
|
520 |
margins of the input rasters, mean ASTER-derived flow is northward at |
|
521 |
all latitudes, and SRTM-derived flow is northward at nearly all |
|
522 |
latitudes (Figure \ref{mean-flowdir}). This seems reasonable considering |
|
523 |
that most pixels in this Canada test region fall in the Arctic drainage. |
|
524 |
As was the case with aspect, note that a general north-south bias is |
|
525 |
evident (Figure \ref{rose-diag-flowdir}, again likely due to use of an |
|
526 |
unprojected raster at high latitudes. |
|
527 |
|
|
528 |
The various fused layer profiles look as one would expect (Figure |
|
529 |
\ref{mean-flowdir}), although the lack of latitudinal variability in |
|
530 |
mean flow direction makes it hard to say much more than that. |
|
531 |
|
|
655 |
% |
|
656 |
% Figures: Flow direction rose diagrams |
|
657 |
% |
|
532 | 658 |
\begin{figure}[h!] |
533 | 659 |
\caption{Relative frequencies of D8 flow directions (indicated by |
534 | 660 |
relative heights of the blue spokes) within two selected |
... | ... | |
584 | 710 |
\end{figure} |
585 | 711 |
|
586 | 712 |
% |
587 |
% Latitudinal terrain profiles (correlations, RMSEs)
|
|
713 |
% Figures: Correlations and RMSEs
|
|
588 | 714 |
% |
589 |
\section{Informal correlation analysis} |
|
590 |
|
|
591 |
\paragraph{Elevation} |
|
592 |
|
|
593 |
\paragraph{Slope} |
|
594 |
|
|
595 |
\paragraph{Aspect} |
|
596 |
Circular analogues of the Pearson correlation coefficient were |
|
597 |
calculated using the \textbf{circular} R package function |
|
598 |
\texttt{cor.circular}. I believe this implements the formula described |
|
599 |
by Jammalamadaka \& Sarma (1988): |
|
600 |
\begin{equation} |
|
601 |
r = \frac |
|
602 |
{\sum_{i=1}^{n} \sin(x_i-\bar{x}) \sin(y_i-\bar{y})} |
|
603 |
{\sqrt{\sum_{i=1}^{n} \sin(x_i-\bar{x})^2} |
|
604 |
\sqrt{\sum_{i=1}^{n} \sin(y_i-\bar{y})^2}} |
|
605 |
\label{eq-ccor} |
|
606 |
\end{equation} |
|
607 |
|
|
608 |
where $x_i$ and $y_i$ are aspect values (in radians) for pixel $i$, and |
|
609 |
$\bar{x}$ and $\bar{y}$ are circular means calculated as in Equation |
|
610 |
\ref{eq-cmean}. |
|
611 |
|
|
612 |
\paragraph{Flow direction} |
|
613 |
As with aspect, circular correlation coefficients were calculated for |
|
614 |
each latitudinal band. |
|
615 |
|
|
616 | 715 |
\begin{figure} |
617 | 716 |
\centering |
618 | 717 |
\caption{Elevation associations between original and fused layers} |
... | ... | |
657 | 756 |
\caption{Flow direction associations between original and fused layers} |
658 | 757 |
\subfloat[Flow direction correlations]{ |
659 | 758 |
\includegraphics[page=3, trim=1in 1in 1in 1in, width=\linewidth]{../flow/flowdir-assessment.pdf} |
660 |
\label{corr-flow} |
|
759 |
\label{corr-flowdir}
|
|
661 | 760 |
}\\ |
662 | 761 |
\subfloat[Flow direction RMSEs]{ |
663 | 762 |
\includegraphics[page=2, trim=1in 1in 1in 1in, width=\linewidth]{../flow/flowdir-assessment.pdf} |
664 |
\label{corr-flow}
|
|
763 |
\label{rmse-flowdir}
|
|
665 | 764 |
} |
666 | 765 |
\end{figure} |
667 | 766 |
|
668 | 767 |
|
768 |
\clearpage |
|
669 | 769 |
\appendix |
670 |
|
|
770 |
%----------------------------------------------------------------------- |
|
671 | 771 |
\section{Code listings} |
772 |
%----------------------------------------------------------------------- |
|
672 | 773 |
|
673 |
\clearpage |
|
674 | 774 |
\lstinputlisting[language=R, caption={R wrapper code for multiresolution |
675 | 775 |
spline}, label=code-enblend]{../dem/enblend.R} |
676 | 776 |
|
Also available in: Unified diff
added correlations/RMSE discussion, plus many new edits