Why isn't my heat layer valid and I don't get a .tif in this location (this location exists 100%)? Code below:
output = "D:/QGIS_Project_New/heat_map_last.tif" heat = QgsRasterLayer(output, "Heatmap") QgsMapLayerRegistry.instance().addMapLayers([heat]) if heat.isValid() is True: print "Layer was loaded successfully!" else: print "Unable to read basename and file path - Your string is invalid"
I get the "Unable.." print, why is that?
So my code for loading layers is working:
highway_layer = QgsVectorLayer("D:/Tomas/QGIS_Project_New/points_highway.shp","Highway","ogr") if highway_layer.isValid() is True: print " HIGHWAY Layer was loaded successfully!" else: print " HIGHWAY Unable to read basename and file path - Your string is invalid"
But when I try to create and save a layer on this location it is not working. Also I'm using python console in QGIS.