Skip to content
Snippets Groups Projects
mapcanvas.py 37.2 KiB
Newer Older
    #c.activateMapTool('identifySpectralProfile')
    #c.activateMapTool('identifyTemporalProfile')
    #c.activateMapTool('identifyCursorLocationValues')
    c.activateMapTool('moveCenter')

    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())