# Tag Info

1

You can also try gdal_rasterize instead: C:/OSGeo4W64/bin/gdal_rasterize.exe -ot Float32 -3d -tr 1 1 -of GTiff -te 239982.0 647659.0 240207.0 648667.0 -ts 225 1008 -a_nodata -9999 D:\Temp\19900928.vrt D:\Temp\199009.tif The '-tr 1 1' will set the resolution at 1m which is what you want. Only problem with gdal_rasterize though is that if there's no points ...

0

I must say that I do not understand the parameters which are documented in http://www.gdal.org/gdal_grid.html linear (Since GDAL 2.1) Linear interpolation algorithm. The Linear method performs linear interpolation by computing a Delaunay triangulation of the point cloud, finding in which triangle of the triangulation the point is, and by ...

1

coordinates(new_sp_grd) returns the center coordinates of each cell. Here is a simple example: library("sp") grid <- SpatialGrid(GridTopology(c(0, 0), c(1, 1), c(5, 4))) # get coordinates of center coordinates of each cell grid_ctr <- coordinates(grid) plot(grid, axes=TRUE) points(grid_ctr, col="red", pch=16)

0

Isn't this enough? x <- 1:(cd[1,1])*cc['x'] y <- 1:(cd[1,2])*cc['y'] grid_cells_centre <- data.frame(x=rep(x, length(y)), y=rep(y, each=length(x)))

0

I've just found out what's going on. You have to switch interval units from "millimeters" or "centimeters" to "units of map". Then the software will use the shp coordinate system to generate the grid.

2

It's difficult to get zoom to extent to work without gaps, as you've found. It gives "best fit" when the aspect ratios don't match. (Tip : when messing around with extents, use CtrlB to save extents on a saved layer, that way you can always get your extent back, even after closing QGIS) Snapping indexed grid to bounding box If you want to create a grid ...

2

I did something similar once but instead of creating a new layer for the map composer extent: I set up the extent from the composer Clicked the View extent in map canvas option: From the plugin, I selected the extent of the canvas: This allowed me to bypass having to create another 'mask' layer.

Top 50 recent answers are included