AMA-Labs / cal-notebooks

CEOS Analytics Laboratory notebooks and tools
0 stars 1 forks source link

NotGeoreferencedWarning: Dataset has no geotransform, gcps, or rpcs. The identity matrix will be returned. #9

Open jdh-ama opened 11 months ago

jdh-ama commented 11 months ago

Impacted notebook EAIL_Spectral_Products_L8

Code

fig, ax = plt.subplots(1, 2, figsize=(16, 8))
ax[0].imshow(ndvi2, cmap="Greens", vmin=0.0, vmax=1.0)
ax[1].imshow(ndvi2, cmap=ndvi_cmap, norm = ndvi_norm)
ax[0].set_title('NDVI Basic'), ax[0].xaxis.set_visible(False), ax[0].yaxis.set_visible(False)
ax[1].set_title('NDVI Custom Colormap'), ax[1].xaxis.set_visible(False), ax[1].yaxis.set_visible(False)
plt.show()

Warning

/env/lib/python3.10/site-packages/rasterio/warp.py:344: NotGeoreferencedWarning: Dataset has no geotransform, gcps, or rpcs. The identity matrix will be returned.
  _reproject(
JonDHo commented 6 months ago

I often get rid of this error by using the ignore features of the python warnings library