Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

New answers tagged

2

Extracting cell values to vector points will allow us to further manipulate them through the Field Calculator. (1) Generate points (pixel centroids) inside polygons tool (Processing Toolbox > Vector creation) This tool takes a raster and a vector polygon layer, to generate a point (vector layer) at the center of each pixel. However, this tool does ...


0

I got it to work. I stripped the script down to just the basics and ran it in the QGIS Python Console and it ran through all the state Block Group shapefiles just as I'd expect. The Zonal Stats fields are now in the attribute tables. import os from PyQt4.QtGui import * from PyQt4.QtCore import * from qgis.core import * from qgis.utils import iface from qgis....


0

In your code you just create layer. To visualize it in qgis map, you have to add the layer to the map canvas. https://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/loadlayer.html QgsProject.instance().addMapLayer(layer) Or iface.addVectorLayer...


0

I tried to follow the advice above, my model now looks like this : The calculate value content: (thanks smiller) The zonal statistics as table content: I don't have errors anymore, my initial question has been then solved!


1

Your path contains a form feed escape sequence - \f. >>> "\f" '\x0c' >>> You need to use a raw string as your input. Raw strings ignore escape sequences. getFileName(r"C:\Users\fassi\Documents\Arcgis\NDVI_MODIS_per_decade") Note the r before the start of the string.


0

Based on both linked questions, I understand the issue to be You want to perform Zonal Statistics as Table with multiple input rasters and multiple corresponding output tables. Your current process overwrites the output table for each raster, so you'd like to get a unique name for each output table. The previous question's comments led you to use the ...


1

As you have not posted your error messages nor your configuration of your Zonal Statistics as Table element in the model, I can only guess as to what is going on here based on your question title. My guess is that your model is trying to repeatedly overwrite the output table and failing, because the output exists already. If this is the case, then you can ...


Top 50 recent answers are included