9
votes
Accepted
What could be causing these crazy pixel values when I rasterize a polygon?
You set all values to zero and you specify nodata value as zero. So you get an empty raster, all pixels have nodata. Since there is no min and max value in the image to show in the legend, QGIS ...
7
votes
Shifting existing points (shapefile) to the highest raster pixel value in 5m buffer
Here's an approach that will work, but whether it works for you is going to come down to the size of your raster dataset, which you haven't included in the question.
First convert your raster data to ...
5
votes
Defining raster extent to limit labeled area in QGIS
You can set the data defined "Show label" in the "Rendering" category with the expression intersects(layer_property('smaller_layer', 'extent'), $geometry) to do this.
Without ...
5
votes
Accepted
Defining raster extent to limit labeled area in QGIS
You can use Rule-based labeling with this expression as the rule filter
within(
$geometry,
layer_property('raster', 'extent')
)
4
votes
What are the QGIS words for my 4 types of data?
If your goal is to add data to QGIS there are 3 main type :
Raster data : data stored in "picture" format (png, jpeg, tiff, ...)
this is for image/picture (like satellite/aerial view) or ...
3
votes
Accepted
Assign a CRS to a raster in R
The raster tells you its extent (the coordinate values at the corners) are:
extent : 3388038, 3611062, 5266712, 5517788 (xmin, xmax, ymin, ymax)
Then you do this:
crs(r) <- st_crs(4326)$wkt # ...
3
votes
Generate points from raster image in QGIS
Quick and dirty, but effective solution:
By the way: you can improve the results if you increase the contrast between points and all other pixels before (in a graphic software). You could create a ...
3
votes
Calculating volume of fill needed using QGIS
Solution: reproject
You use a CRS that is not suitable for measurements. Reproject to a local CRS, e.g. the UTM zone valid for your area of interest. See also here for backround.
Details: why you get ...
2
votes
Accepted
Setting path for QgsLayoutItemPicture using PyQGIS
You can use QgsLayoutItemPicture.setMode() (see here for available formats):
project = QgsProject.instance()
manager = project.layoutManager()
layout = QgsPrintLayout(project)
layout....
2
votes
Accepted
Color Vector Line Using Different Data Layer QGIS
You can split your original lines into smaller lines using the "Split lines by maximum length" tool from the Processing Toolbox. The default is 10m, but the best length is going to depend on ...
2
votes
Accepted
Nothing to summarize if you provide a single RasterLayer; see cellStats
The min.RSS function is doing a sum on a raster, and that returns a raster, and optim wants a global single value, I assume this is a sum over cells.
I would take the values of the cells and convert ...
2
votes
Accepted
Differences in extracted values after projecting raster
When you use the "pipe" operator, it puts the thing on the left as the first argument of the function call on the right. You are doing:
NDVI_2005 <- NDVI_2005 %>%
projectRaster(...
1
vote
Accepted
Rasterizing raster layers with style
You can export the project/map canvas as image: go to menu Project > Import/Export > Export Map to Image.... Make appropriate settings for resolution of the output raster an be sure to check the ...
1
vote
Shifting existing points (shapefile) to the highest raster pixel value in 5m buffer
There is no straight tool for this, but you can do bit of spatial data processing here. Here are few steps you can try out.
1 - Get coordinates of new locations.
Reclassify raster for greater than 0.8 ...
1
vote
Accepted
What are the mesh and raster layers in QGIS that are included when a GRIB2 file is imported?
You get the same data in two diffèrent format, mesh and raster.
the Raster Band 1 contain "Total precipitation [kg/(m^2)]" and Raster Band 2 contain "(prodType 0, cat 1, subcat193) [-]&...
1
vote
Generating points inside each polygon based on colorful raster layers data with QGIS
Solution: the principle
Create a multiple of random points per area (like 100 times more than you want), then get the raster value for each point. Then select top or bottom 1% of these points, based ...
1
vote
Accepted
Extract individual years from a time series raster
I think I found a tool to do it in Pro so, making sure that the layer is selected:
Go to the Multidimensional tab.
Click on the Data Management drop down menu and select Subset.
Under Dimension ...
1
vote
Loading multiband raster layer with pseudocolor style (not RGB) using PyQGIS
I found a solution to switch the renderer to a QgsSingleBandPseudoColorRenderer in a single line with default values by using the class widget QgsSingleBandPseudoColorRendererWidget:
raster_layer = ...
1
vote
How can I snap to an existing raster in QGIS?
I wrote some code, which is the best solution I'm aware of at this stage when nice alternatives aren't available (e.g having pixel coordinates that are all divisible by 10cm or something)
import numpy
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
raster × 9831qgis × 2755
r × 1744
arcgis-desktop × 1655
gdal × 885
python × 813
coordinate-system × 489
arcmap × 438
postgis × 397
clip × 396
arcpy × 392
geotiff-tiff × 386
dem × 373
raster-calculator × 356
vector × 343
polygon × 311
grass-gis × 291
shapefile × 275
pyqgis × 239
arcgis-10.0 × 215
rasterio × 205
arcgis-pro × 204
spatial-analyst × 180
geoserver × 176
arcgis-10.1 × 176