I need 135 raster values of raster from 15 points.
So, I want 3×3 pixels (9 raster values) from each point.
To make them, I tried "Rasterize" to convert points as shown below. (In this QGIS session, there are 2 layers, Point layer(Input layer) & Raster layer (Output extent).)
But, after trying, I couldn't find the 9 pixels even at maximum zoom scale.
Should I change the parameters of Rasterize or think out another way?
For your information,
1.Properties of my raster data are shown below.
2.The points were made by clicking on the map.
If my sentences confuse you, I'm sorry for it.
Best Answer
You can't rasterize a point as it has no dimensions. First create a polygon around your point, then rasterize this.
Version 1 (straightforward)
Menu Processing / Toolbox / Geometry by expression
- see also here for how to use it) with this expression:Output raster size units
toGeoreferenced units
and use a projected CRS (units in meters).Version 2 (less straightforward)
There is another option, however, not so straightforward (depending on the spatial distribution / extent of your points). You'll get 30 * 30 meter polygons all over the extent of your point layer, whereas in the solution above, you create polygons only where you have points.
Create a grid (
Menu Vector / Research Tools / Create Grid
), set it to Rectangle (polygon) with grid extent from your point layer (and in the same, projected CRS), horizontal and vertical spacing to 30. If your points are far away, you'll get a huge grid with a lot of cells (that's why the other option is faster).Use
Menu Vector / Data Management Tools / Join attributes by location
to select the cells that contain a point. Create a new attribute for them with field calculator that contains the value to be used for rasterization.Rasterize the grid.