Using Anaconda Python 2.7 juypter gdal pydem in Windows I wanted to learn to do basic slope calculation.
I was given a TIFF that was UTM zone 55, it covers a small area in Qld Australia. Planning to use TIFF to learn PyDEM, I found out that I should convert UTM to use EPSG 4326. After which I went into Jupyter and typed
import os from pydem.dem_processing import DEMProcessor filename_geotiff = 'c:\Users\Bec\Documents\River\wgs2DEM_2m.tif' dem_proc = DEMProcessor(filename_geotiff) mag, aspect = dem_proc.calc_slopes_directions()
...which gives the error:
UserWarning: Latitude normalization has been prohibited in the newer versions of geopy, because the normalized value happened to be on a different pole, which is probably not what was meant. If you pass coordinates as positional args, please make sure that the order is (latitude, longitude) or (y, x) in Cartesian terms. ValueError: Latitude must be in the [-90; 90] range.
I tried ArcGIS 10.6 project raster and define project tool to convert, both changed the coordinate system, but left the extent still showing numbers as if it was UTM. Also tried doing it in ArcCatalog which did change the extent values but put the map in the wrong place.
The next plan was to get Python to do the transformation
from osgeo import gdal filename = r"Weany_Dem_2m_final_pit_removed.tif" input_raster = gdal.Open(filename) output_raster = r"wgsweany" gdal.Warp(output_raster,input_raster,dstSRS='EPSG:4326') --- TypeError: in method 'wrapper_GDALWarpDestName', argument 4 of type 'GDALWarpAppOptions *'
I looked at different gdalwarp options and I got more confused
import gdal gdal.VersionInfo()
Could someone suggest a simple way for me to transform the data so it will then work in PyDEM.