I need to import all the raster files in a folder in the QGIS 3.4 canvas. Each file is in a .asc format. How to do it using PyQGIS?
Asked
Active
Viewed 59 times
1 Answers
1
One option would be to get the current raster crs and then set the project default crs so the dialog does not show, see:
how to get the projection from a vectorlayer in qgis?
QGIS changing canvas CRS defaults to imported layer
Another option is if all the raster crs are the same you could set the QGIS default crs manually in the Settings>Options>CRS tab.
artwork21
- 35,114
- 8
- 66
- 134
-
Thanx. I just found out that the problem is relative only to QGIS 3., because in QGIS 2. it automatically assign the SRS to EPSG:4326 to rasters without any reference. This is not ideal, because I need EPSG:3003 but can be bearable, because the most important things is to avoid the popup asking me to set SRS for each file. Anyway Settings>Options>CRS doesn't solve the problem. – ilFonta Dec 31 '18 at 12:34