I am trying to plot a raster with rasterio but somehow that data is being resampled, I think.
The map created does not show the detail in the data. See here: python plot
...compared to the original data (plotted with GIS): topo data
Any idea how to stop rasterio from interpolating/resampling the data?
Here is my code:
import rasterio
from rasterio.plot import show
import matplotlib.pyplot as plt
topo = rasterio.open('../topo_raster/nz100dem2ihs21.tif')
nz_mask_file = '../gis_data/NZ_mask.shp'
nzmask = gpd.read_file(nz_mask_file)
fig= plt.figure(dpi=300. )
ax = plt.axes( projection=ccrs.epsg(27200))
show(topo.read(1,masked=True), ax=ax,transform=topo.transform,interpolation='none',zorder=1,cmap='gist_gray')
nzmask.plot(ax=ax,facecolor="white", edgecolor='black', lw=linewidths_rr,zorder=0.5)
plt.savefig('../newzealand.png')
plt.clf()