This week I have started to study PyQGis[2], then I have tried to write a python script to load several raster into the QGis layer . My filenames contain date as a part of name, so, instead to load all files in the folder, I have built the file name as a join of two string, the path of the folder and date (extracted from a fixed range -> 01-01-2006 to 01-31-2006). Then I have extracted the maximum and minimum value from this raster, and the value in some fixed point of a shape file. import datetime import time startdate = datetime.date(2006,1,1) enddate = datetime.date(2006,1,31) minValue=0 maxValue=0 #load my point myShapeFile = QgsVectorLayer("/myPath/stazioni.shp", \ "stazioni", "ogr") myPoint = myShapeFile.getFeatures() #iterate to load all raster for i in range((enddate-startdate).days + 1): currentdate = startdate + datetime.timedelta(days=i) tt=time.strftime("%m-%d", currentdate.timetuple()) fileName=""
Coding in the Deep End, Above and Beneath the Surface layer.
'The Giacobbe Candidates' navigates through coding in R, Julia, and Python, and hydrological modeling with the GEOframe framework