Posts

Connect the data points or not?

Image
  This graph shows 6 terrain parameters, which are only very indirectly related, plotted against the FUV (fraction of unexplained variance, 1-r squared).  It shows one test DEM (satellite radar derived) versus a reference DTM (lidar derived).  Low value is best, so ELEV (elevation) agrees very closely, whereas TPI does not. Because they are not related, some of my colleagues prefer the version on the bottom. I prefer the one on top because: With the lines, it is clear that the urban category is the best (largest FUV).  With the points, it is much less obvious. Despite the attempt to use both colors and different symbols, it is very hard to see all the values when they are close (say with RUFF, roughness).  With the lines, that is clear. Where lines cross, the relative rankings change and it's clear (say shrubs, between HILL, hillshade, and SLOPE). It might not be clear that all the categories are in fact present for the ELEV. As long at the graph is explained, I...

Comparing elevation arc second and UTM DTMs

Image
Two versions of a DTM, created by aggregation from a 1 m UTM grid in Glacier National Park, Montana.  At this latitude, almost 49N, the arc second spacing is about 20.35x30.89 m.  Visually the two appear identical, so they do a good job capturing the terrain.  The histogram shows they are indeed very similar. The points in the grids are not at the same locations.  At places they coincide, and at worst they are offset by about 10 m in x and 15 m in y.  In this heavily glaciated area, there are slopes up to 800%. To map the differences, one of the grids must be reinterpolated.  The maps above show both possible reinterpolations.  The maximum differences are about 80 m; 2.5 m captures 90% of the points from the 5th to the 95th percentiles.  The biggest differences are on the ridge tops and valleys, where the ridge crest and the steam location can be offset by up to 15 m depending on how the two grids line up at the location. These two DTMs "shou...

Slopes for Arc Second DEMs for another area

Image
  This graph is for Glacier National Park.  It has a lot more elevations, so with the same number of bins it has much smoother curves than the last example.   But what is more interesting, the MICRODEM example, using the different x and y spacing, is not the same as it was in the previous example compared to using GDAL and using a data spacing that is the average of the x and y spacings.  They match below about 30% slopes, and above about 80%, but in between there are some significant differences. Bottom line, software should adapt, and the coding is not that hard.  Most programs currently get it right.

Slopes for Arc Second DEMs when Software Allows only One Data Spacing

Image
 Arc second DEMs like the Copernicus DEM have rectangular pixels, with 1 second spacing which translates to different spacings in meters in the x and y directions.  Most software now uses a slope algorithm which correctly deals with the rectangular pixels, but some GIS programs still assume square pixels and requires the user to select a single spacing. MICRODEM can call two of those programs, and uses the average of the x and y spacings.  To test this selection, the x or the y spacing could also be used.  The two programs which use only one data spacing  produce identical results, so only one of the two was used. MICRODEM produces the same results for the slope algorithms as other programs that use different x and y spacings for the arc second DEMs. Slope histograms.  For this DEM, the 1x1" spacing is about 24.77x30.83 m.  When the average spacing is used, GDAL agrees with MICRODEM.  If the smaller x spacing is used, the slopes are steeper becaus...

Slopes from UTM and Geographic Grids

Image
 To test this, we started with a 1 m DTM and did mean aggregation to get a 1" geographic DTM and a 30 m UTM grid. We created slopes using 16 algorithm/GIS program combinations. The matrices show the Pearson correlation coefficient comparing each pair of slope grids.  The matrix is symmetrical about the white-colored principal diagonal. The dark green shows pairs that produce identical results, and correspond with the four algorithms (Evans, Horn, Zevenbergen and Thorne, and quadradic/Florinsky).  Differences in the r values reflect different results from each algorithm's computation of the directional derivatives. Within each of the four algorithms, at least two programs produce identical results.  The other programs differ, because they do not correctly compute different spacings in the NS and EW directions, and if they allow the user to input a scaling factor allow only a single degree to meter conversion.  In addition to the difference arising from the comput...

How to Compare Slope Computations

Image
 My comparison of slope computations has 21 combinations of algorithm and GIS program, requiring some thought on how to organize the results.  These four graphs show some preliminary results, without identifying any of the guilty parties. These results are for a one arc second DEM, for which some of the programs are not well equipped to handle. Rows and columns each have a slope grid produced by a different algorithm/program.  T he white principal diagonal is where a grid would be compared with itself.    We do not know the "correct" slopes, so we can only discuss differences. The results suggest that using a 5x5 window requires a lot more thought since the results are so different compared to the traditional 3x3 window. Pearson correlation coefficient between the slope grids computed by two methods.  Those in the top, dark green box in the legend, produce identical results.  This matrix is symmetrical. There can be a high correlation coefficient if th...

Changing Window Size for Slope Computations

Image
 I have been comparing slope algorithms, and the results from different software.  I have been looking at 4 algorithms, and a half dozen GIS programs.  Most use a 3x3 window, but one has an option for a 5x5 window.  It turns out I had implemented a 5x5 window in MICRODEM, but never really looked at the results. This uses a one arc second DEM with about 20,000 elevation postings, which accounts for the jagged histograms below.  This looks only at the three algorithms currently implemented in MICRODEM (the other program has similar results, perhaps not as extreme). The slopes computed with the 5x5 window are significantly smaller than those with a 3x3 window, and for this scale of DEM should probably not be used.  Perhaps your preferences might be different with a 1 m lidar-derived DEM.