Created
December 19, 2018 15:43
-
-
Save diogooliveira-dsg/ab2021e9ab13cf4489092649f5e1dc51 to your computer and use it in GitHub Desktop.
Get Image CRS from image in the path
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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() | |
| t.writerow([root,file,x.crs().description()]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment