I re-wrote this post from an original one and need new answers please!
I'm using Qgis 2.18.15 to extract 1' contours from a DEM created from my drone using photogrammetry software.
My main question is how can I reduce the error in calculating these contours?
The steps to do this:
Upload the geotiff DEM CRS ESPG:3857(meters)
Next I re-project the data to the local code EPSG: 32048 which is in feet.
(PROBLEM) The DEM's from the software always come in without any values z values.
(SOLUTION) Raster's (properties > styles) set Render Type: Singleband Grey. Set min and max to 0 - 255. Contrast enhancement: Stretch to MinMax I'm not sure why but I've changed the values many times and this range always seems to encompass all of the data in the DEM. Is there a reason for these values like some kind of default?
Next I need to re-scale this raster so I find a scale factor between the QGIS DEM and the original data from the software. The min max range specified in the software is 7.41ft to 65.29ft.
I set this to have a 0 min so the range becomes 65.29' - 7.41' = range 0 to 57.88. So for a scale factor I take 57.88 / 255 = 0.226980392156. I plug this into the raster calculator and get this:
(PROBLEM) The range of values should be the same as the feet found above (0 to 57.88) but after being scaled it comes in as 0.457592 to 57.8223.
The math here using the raster calculator does not make sense.
255 x 0.226980392156 = 57.88 not 57.8223 and 0 x 0.226980392156 = 0 not 0.457592
Continuing with the values I extract 1' contours now that it is scaled
Why does the scale factor math using the raster calculator not make sense? Also, is there a way to explain the min max range 0 to 255 that I've found works well when the DEM comes in without z values?
I need to be as accurate as possible with this data and I know there are multiple places in this process which can skew the data.