Questions tagged [rasterization]

The process of turning a vector into its raster equivalent

Filter by
Sorted by
Tagged with
2
votes
1answer
154 views

Rasterizing polygon grid in Python (geopandas & rasterio)

I am trying to rasterize a custom polygon grid with one or more columns. Preferably I'd like to create multi-band rasters from multiple GeoDataFrame columns (in polygon grid), but I have got stuck ...
1
vote
2answers
2k views

Rasterize a shapefile generate a black TIFF

I run the following codes in jupyter notebook to rasterize the shapefile: building.shp, but it generates a black TIFF, which in QGIS shows only 0 and nan values. Here are the source codes Could ...
0
votes
1answer
190 views

QGIS 3.4 - Rasterize creates layers with 1.79769e+ 308 min/max values

I have tried searching on here for my issues, read many threads, but to no avail. Essentially, I am trying to convert a line feature to a raster so that I can run proximity on it - because I want to ...
1
vote
1answer
184 views

QGIS 3.2 - Poor conversion from high-resolution vector to raster

I have a shapefile with polygons with several sizes, and I want to convert it to a raster with 30mx30m pixel resolution. Although I was able to obtain the raster with the pretended resolution (using ...
2
votes
3answers
796 views

Why are there strange horizontal lines in raster data?

I have a feature class (stored in a file geodatabase) containing information on land use for the Amazon rainforest. It is very detailed and looks like this I need to convert this shapefile to a ...
0
votes
0answers
34 views

Import multiple xyz files and rasterize them

How can I load multiple XYZ files in QGIS? I want to load about 100 files to create from each one a raster so we can overlay our network on them. Manually it's too much work. I tried to create a ...
2
votes
0answers
22 views

Rasterize a geometry using gdal.RasterizeLayer()

I am writing a processing script using QGIS 3.4. I need to rasterize a polygon using gdal.RasterizeLayer. The problem is the polygon is a list of QgsGeometry objects and not a layer. n = (2*radiusInt)...
0
votes
0answers
23 views

How to get pixel per meter in MATLAB

I have a vector shapefile which is in unit of 'Meter' presenting boundary of overall Germany. I am converting it into raster format based on each pixel representing 300 Meters respectively. After ...
1
vote
0answers
32 views

Getting TIFF with gdal_rasterize

How can I properly rasterize isolines with an absolute height value in QGIS 3? When using "gdal_rasterize" in the source code I got tiff with "holes", see image below
2
votes
1answer
46 views

Convert point layer to raster QGIS 3

I have a .csv-file containing x and y-coordinates as well as different variables with attributes (var1 to var3). The csv looks like that: Loading the data into QGIS with Add Layer → Add ...
1
vote
1answer
33 views

R: rasterize SpatialPolygonsDataFrame and keep factor field

I want to rasterize a SpatialPolygonsDataFrame and keep the values of a factor column. Consider the following code (from Processing vector to raster faster with R): library('raster') library('rgdal'...
0
votes
1answer
51 views

Raster from a set of Points keeping the resolution

I have a database with some points covering the earth surface and I want to build a raster (GeoTIFF using gdal_rasterize) which mantains the same spatial resolution of the input points (so without ...
3
votes
1answer
64 views

r.surf.contour for large area

I have a vector file containing contour with 2m accuracy, covering a large area (All Hong Kong). I tried to generate an elevation raster map with the file, by first rasterized the vector, using v.to....
2
votes
1answer
112 views

Rasterizing with target in QGIS?

With QGIS 2.18, the "rasterize" command offered the possibility of defining a raster target. I used this option to "update" a existing raster with the value of a polygon layer. I'm not able anymore ...
0
votes
0answers
23 views

Making grid files (minimum curvature) from point data in QGIS?

Is there any way to make a grid file from point data (shape file) in QGIS? I mean by grid a colored raster file like Geosoft .grd or ERMAPPER .ers file or like. Minimum curvature would be ...
3
votes
1answer
77 views

What does the vector to raster option in QGIS do, exactly?

I have a large point vector layer (a few million objects) with measured elevation values and have converted it to raster, using the raster>conversion>(vector to raster) option in QGIS. It seems to ...
1
vote
0answers
22 views

Converting vector to raster on-the-fly using GRASS?

EDIT: I later realized that, instead of creating multiple 256 x 256 tiles, I could just create a single image to overlay on the entire map. However, I'd still like to know if there are better ways to ...
2
votes
1answer
168 views

Generate tiles from leaflet polygons

I have a set of shapes drawn in Leaflet (using Leaflet.draw). I need to rasterize these into a tileset and export it because I need to use the images elsewhere. My initial idea was to go through ...
0
votes
1answer
201 views

Rasterize shapefile according to another big raster using gdal_rasterize

I want to rasterize a shapefile into a raster according to another raster (97284, 154208, 15001971072 (nrow, ncol, ncell)). Since the raster is very big, I am using gdal_rasterize following the ...
0
votes
0answers
24 views

Polygon to Raster conversion: Raster shifted ~10m horizontally. How to fix?

I converted a number of polygons into a raster. The cell size is correct but the raster has shifted ~10m horizontally. Is there an issue with my method or is there a tool I can use to fix this?
1
vote
1answer
40 views

Rasterize produces wrong result - R

I am trying to rasterize a polygon in R using teh rasterize function but the output is not correct. I am comparing the result with the output produced by the rasterize tool available in QGIS May data ...
1
vote
0answers
50 views

How to render vector data with muliple geometry types to georefrenced raster

I am using OSM vector data which has been converted into shapefiles. I have polygons representing buildings, landuse and lines representing roads as shown bellow: I want to assign some symbology to ...
3
votes
2answers
3k views

Rasterizing polygons with the function “gdal_rasterize” in R

I'm using the function gdal_rasterize in R (package gdalUtils) to convert a polygon shapefile into a raster. Here is my code: r.test <- gdal_rasterize(src_datasource="df.shp", dst_filename="test....
1
vote
1answer
363 views

gdal.rasterizeLayer in QgisPython results in Nan values

I have a vector layer projected in WGS84. I would like to use gdal.rasterizeLayer() from the python console to convert it to a raster. I would like to burn values from a field. I followed the gdal ...
0
votes
2answers
84 views

How to convert multiple shapefiles of different geometries into a georeferenced raster

I have multiple shapefiles extracted from OSM vector data, as shown in the image bellow: How can I render this into a raster of a specified resolution? Is there a way to do that using QGIS or ...
2
votes
1answer
54 views

Why does fasterize gives different output for multipolygons with and without internally resolved boundaries?

I was thrilled to be clued into the package fasterize, which speeds up the rasterization process in R tremendously. However, I cannot figure out why the fasterize() function outputs two different ...
0
votes
1answer
37 views

Rasterizing MULTIPLE vector layers in same “grid” so I can do a regression of sorts across pixel units?

For my research, I have collected a bunch of climatic data from my state in vector form. I also have my raster data, which is about 60 points around the state that have a binary assignment of yes/no. ...
15
votes
6answers
17k views

Burning stream network into DEM layer using ArcGIS Desktop?

I am working on a DEM that in an area where there is little relief. I would like to 'burn' the river network into the DEM so I can calculate flow accumulation and flow length accurately. I am ...
6
votes
0answers
2k views

Rasterize shapefile using another raster's size and resolution

Rasterizing a vector (shp) I face the following problem: I want my output file (the rasterized vector) to have the same resolution and dimensions as an existing raster. If I understand the interface ...
0
votes
0answers
29 views

Converting line vector layer to raster with pixellate.psp creating missing data?

The following example converts a line vector layer (road network) into a density raster. It seems to be working for others, but it looks like it's creating data gaps at my resolution (50m). library(...
0
votes
0answers
18 views

Using Polygon to raster (folder)?

I'm having a problem when trying to convert "Polygon to Raster (folder)" on ArcGIS 10.5 ( SDM Toolbox v2.3). Why are all output rasters much smaller than the input polygon?
0
votes
0answers
46 views

Rasterizing vector layer (polygon) in ArcGIS Desktop?

I am using ArcGIS Desktop 10.6. While rasterizing my vector layer, lots of noise creates, I remove most of them by applying different cell sizes and the best one is 45. The only problem left is the ...
0
votes
1answer
140 views

Rasterize vector to presence-absence raster incorrect in R

I want to create a presence-absence raster out of a shapefile (vector) with the rasterize command of the R-package in R. Until now I only get wrong results. The raster should just distinguish ...
1
vote
1answer
34 views

Rasterize the full area of a polygon, not only midpoints, using R [duplicate]

The default function in raster::rasterize is to see if a point is within a polygon and if yes, make a cell. This results in that some of the outer parts of the polygon is not covered by the new raster....
1
vote
1answer
91 views

Vector Rasterize error using QGIS?

I am attempting to convert vector files to raster format in QGIS using the Rasterize tool and am receiving the error: ERROR 1: Wrong value for -tr parameter. I have attached an image of the ...
1
vote
1answer
47 views

Rasterize point layer with weighted distance

I have a point layer representing wells in a region. i am able to rasterize it and write the well density into the raster as integer, so far so good. What I aim for is to create a raster with values ...
2
votes
2answers
220 views

gdal RasterizeLayer gives different extent to arcpy PolygonToRaster

I have an existing ArcPy script which uses PolygonToRaster_conversion to convert a polygon shapefile to raster (tiff). I am now exploring GDAL/OGR and have used the cookbook approach to carry out the ...
3
votes
2answers
487 views

QGIS - point to raster - Summing attributes as value of raster

I'm trying to produce a raster layer. The aim is to show the summed heat consumption of every cell (100*100m). I created an point layer with all buildings and an attribute with their heat ...
0
votes
1answer
62 views

How to perform shapefile/raster integrated functions

Description: I'm having trouble with some Raster/Shapefile manipulation. My problem is that I have a shapefile that I would like to use to update my rastervalues with. The shapefile has multiple ...
0
votes
0answers
82 views

Python Rasterize Sum Variable

I'm trying to reproduce the R rasterize function in python to streamline my code and am having issues with summing multiple points in the raster. Essentially I want to sum the value of my variable for ...
1
vote
0answers
133 views

Vector Rasterize Error

I am running QGIS 3.4.4 With GRASS 7.4.4 and I get an error while rasterizing a vector layer and I don't know why. The same error pops up while using GDAL->Rasterize(vector to raster) and while using ...
2
votes
1answer
50 views

QGIS3 saved Raster layer is “skewed” or aspect ratio is wrong

I'm trying to export two layers based on the current view or "extent": A black and white "raster" derived from some vector data A map layer (Bing, Google, osm, etc) The issue I'm having is that the ...
0
votes
0answers
37 views

Rasterizing a point layer without using an attribute field

I am following the "QGIS by Example" text book and a task requires that a point layer is rasterized using the following GDAL code gdal_rasterize -l layer name -burn 1 -a_nodata 0 -te coordinates - ...
1
vote
0answers
113 views

QGIS: error in conversion from vector to raster

I've having troubles with the raster conversion from a vector polygonal file. This is the error in the log window: INFO GDAL execution console output ERROR 1: Wrong value for -...
3
votes
1answer
446 views

Rasterize (vector to raster) QGIS 3.4

I am trying to rasterize a vector with the QGIS 3.4 rasterize tool (not saga or grass tools). I prefer using this tool cause it is much faster. The values which i would like to burn are found in the "...
1
vote
1answer
207 views

Inconsistencies in R rasterize polygons, packages raster and sf

I was trying to calculate species richness from IUCN distribution data in R, and I decided to check my results with two different methods, both of which rely on rasterize function from the raster ...
1
vote
0answers
141 views

Rasterizing shapefile with rasterio and gdal gives all cells 0 values [closed]

I am trying to rasterize my shapefile (20 polygons) with rasterio and fiona and turn the new raster into a mask for clipping. I need to rasterize my all polygons in my shapefile and turn on mask ...
1
vote
1answer
260 views

Convert a vector file to an RGB raster using gdal_rasterize without filling polygons

I am trying to convert a vector file that includes polygons to an RGB raster using gdal_rasterize without filling the polygons. Is there a way to do this? For example, I use the following command to ...
0
votes
1answer
65 views

Rasterize shapefile to overlay on map uisng QGIS (or any other suggestion)

I'm developing an app to display a map in QGIS. The map data is from Bing Map servers. I want to overlay a shapefile on the map. I want the same visual display we see on QGIS. Like this So my ...
0
votes
1answer
67 views

ArcMap “Polyline to Raster” output is empty greyscale raster

I have a polyline shapefile of streams that I am attempting to convert to a raster using the "Polyline to Raster" conversion tool. However, rather than outputting a raster with distinct stream pixels, ...