Newer
Older

benjamin.jakimow@geo.hu-berlin.de
committed
def printTimeDelta(dt):
print(dt)
c = MapCanvas()
#c.activateMapTool('identifySpectralProfile')
#c.activateMapTool('identifyTemporalProfile')
#c.activateMapTool('identifyCursorLocationValues')
c.activateMapTool('moveCenter')

benjamin.jakimow@geo.hu-berlin.de
committed
c.sigDataLoadingFinished.connect(printTimeDelta)
c.show()
lyr1 = QgsRasterLayer(Img_2014_01_15_LC82270652014015LGN00_BOA)
lyr2 = QgsVectorLayer(exampleEvents, 'events', 'ogr')
c.layerModel().addLayerInfo(lyr2)
c.layerModel().addLayerInfo(lyr1)
for l in c.layerModel().visibleLayers():
print(l)
c.setDestinationCrs(lyr1.crs())
c.setExtent(lyr1.extent())
c.setCrs(QgsCoordinateReferenceSystem('EPSG:32632'))
c.setExtent(c.spatialExtentHint())