Skip to content

Instantly share code, notes, and snippets.

View dinizime's full-sized avatar

Felipe Diniz dinizime

  • Porto Alegre, Brasil
View GitHub Profile
@dinizime
dinizime / getCRSimage_from_path.pyqgis
Created December 20, 2018 10:07 — forked from diogooliveira-dsg/getCRSimage_from_path.pyqgis
Get Image CRS from image in the path
import os, csv
with open('E:/Teste_IMG/teste.csv','wb') as s:
t = csv.writer(s, delimiter=';', quotechar='|', quoting=csv.QUOTE_MINIMAL)
t.writerow(['root','file','crs'])
for root,dir,files in os.walk('F:/PROJETO-941_RS-VOO/LOTE_1/1_IMAGENS_AEROTRIANGULACAO/1_GEOTIFF/BLUE_77CM'):
for file in files :
if file.endswith('.tif'):
x=QgsRasterLayer(root+'/'+file,'k')
#print root+ file + x.crs().description()