Select to view content in your preferred language

Calculating statistical error of two DEMs

6614
5
12-10-2012 06:21 AM
CindyChu2
Emerging Contributor
I have two DEMs here with different elevations and I want to determine the statistical error of the outdated one.  How would I go about doing this?  Is there a calibration process?

Thank you! 🙂
0 Kudos
5 Replies
JeffreyEvans
Frequent Contributor
Given that you wish to call your second "more recent" DEM the "truth" the Root Mean Squared Error (RMSE) will give you want you want and allow you to map the error on a cell-by cell basis given a specified window. The equation is quite simple: RMSE=sqrt(mean((obs - pred)^2))

You will need to deiced on an appropriate window size where error is relevant to your question. The raster algebra would look something like this (version dependent):

sdiff = Square("obs" - "pred")
rmse = SquareRoot( FocalStatistics(sdiff, NbrRectangle(3,3,CELL), "MEAN", "") )

This will give you the RMSE given a 3x3 window.
0 Kudos
KendallJoseph
Emerging Contributor
Hi Prof. Evans,

I am interested in doing a similar analysis. Only, I don't think I am as advanced as your response assumes. Please excuse my response in this regard. So, just to clarify:

1. "obs" - would be the DEM I want to compare against "pred" - which is the DEM I'm using as my reference....right?

2. Focal Statistics would be for my "obs" DEM...right?

3. "NbrRectangle(3,3,CELL), "MEAN", "") )"....I lost regarding these terms. Have no idea what "NbrRectangle" is about. I'm guessing
"CELL" could be the raster derived from the Cell Statistics Tool within Spatial Analyst...? "MEAN" ...I don't know.

I would appreciated any help in this regard!

Thanks in advance!

KenJ
0 Kudos
KendallJoseph
Emerging Contributor
*Please excuse my ignorance
*I'm
0 Kudos
JeffreyEvans
Frequent Contributor
@KendallJoseph, this is quite literal syntax in ArcGIS 10 and later. Take a look at the help for FocalStatistics. Focal functions are nothing more than a moving window of NxN dimensions where some function is applied (i.e., mean)

The "obs" raster would be considered the observed or "true" data and "pred" would be the predicted or test data.

The first step is calculating the squared difference of observed and predicted and creating a raster ("sdiff").
sdiff = Square("obs" - "pred")

Then you calculate the focal mean of the squared difference raster and take the square-root.
rmse = SquareRoot( FocalStatistics(sdiff, NbrRectangle(3,3,CELL), "MEAN", "") )

As the FocalStatistics help indicates, the NbrRectangle argument refers to the definition of the window used in the focal function and the next argument "MEAN" is the statistic that will be used in the focal function. For efficiency, in not having to create an extra raster, I nested the focal function in SquareRoot.

Hopefully this clarifies things.

Best,
Jeff
0 Kudos
KendallJoseph
Emerging Contributor
Jeff (as you've referred to yourself),

I GOT THROUGH!! Thanks so much! I couldn't believe it was that simple! I feel dumb! I read that same help for FocalStatistics you sent, only for 10.1, and that's where I got confused. I was trying to figure out initially how to build that equation you suggested within Raster Calculator, when those terms other than "Focal Statistics" in the equation  are already functions of "Focal Statistics".

I'm getting some really huge values for my comparisons though. Up to 2020.31! Does that sound realistic? I got that particular value when I compared a 15m resolution DEM derived from a Topographic map re-sampled to 30m, (as my "true"), and an ASTER derived DEM of 30m resolution (as my test dataset). This comparison was done for the entire land mass of Trinidad though.

Do you think, considering difference in currency of the datasets and development that would have taken place over the years, and perhaps errors in georeferencing etc, that a value for RMSE could be so high?


Thanks in advance (again)!

Kendall
0 Kudos