Closed Keeptg closed 4 years ago
I read the code again. The reason caused above error should be this:
Regardless of whether the DEM is projected or not, the xy-offset calculated by Nuth's method is always in meter. When the script execute xy shift sentence, it didn't check for projection. So, if the DEM is in geographic coordinate system, the coreglib.apply_xy_shift()
function will lead a totally wrong result, because it minus a meter offset value from a degree coordinate. Unfortunately, besides projecting the DEM before executing dem_align.py
, I haven't thought of any other way to fix this problem. Do you have any suggestion about this?
Thanks for the report @Keeptg, and for following up. I agree with your assessment. I would not recommend using geographic coords here, as you're mixing units (degrees and meters) and you will have scaling issues (variable length of a degree of longitude as a function of latitude, so the translation vector will be nonuniform across larger source DEM). If you reproject your source DEM to an appropriate local coordinate system, then dem_align should warp the reference DEM to match. Hope that helps!
Hello! I try to use
dem_align.py
co-register a SRTM DEM and a COPDEM (more details about COPDEM) by typingpython dem_align.py dem1_path dem2_path
. I've conformed that the two DEM is intersected (the SRTM DEM is larger than COPDEM, so COPDEM is 100% intersected with SRTM DEM).At the beginning, there are six consecutive errors:
But the script finished the first iteration and saved a "Nuth and Kaab plot" in the disk.
While at the beginning of the second iteration, a
Input images do not intersect
appeared and the script is over.Did I miss any thing?
I insalled
imview
,pygeotools
, anddemcoreg
by using git and pipMy
demcoreg
lib version is 0.5.0, andpygeotools
lib version is 0.6.0, andimview
lib version is 0.3.0My python version is 3.7.6
My operating system is Ubuntu 20.04