Questions tagged [rasterization]

The process of turning a vector into its raster equivalent

Filter by
Sorted by
Tagged with
1
vote
1answer
840 views

Reverse gdal_rasterize (-i option) does not work

When I use: gdal_rasterize -b 1 -b 2 -b 3 -burn 255 -burn 255 -burn 255 polygon.shp tiff.tiff I get a new tiff with a white hole in it with the shape of the polygon shp. However, when I use the ...
9
votes
1answer
3k views

Processing vector to raster faster with R

I am converting vector to raster in R. However the process was too long. Is there possibility to put the script into multithread or GPU processing in order to do it more faster? My script to ...
5
votes
1answer
7k views

Rasterizing shapefiles with GDAL and Python?

I am trying to rasterize a shapefile, and write values from a specific column of the shapefile into the resulting GTiff. Here is what I've done so far, but that only creates a GTiff of zeros. from ...
14
votes
6answers
5k views

Convert line shapefile to raster, value=total length of lines within cell

I have a line shapefile representing a road network. I wish to rasterize this data, with the resulting values in the raster showing the total length of the lines that fall within the raster cell. The ...
12
votes
1answer
10k views

GDAL RasterizeLayer does not Burn All Polygons to Raster?

I am trying to burn a shapefile to a raster using GDAL's RasterizeLayer. I pre-create an area of interest raster from a different shapefile, given a specific pixel size. This AOI then serves as a base ...
7
votes
3answers
2k views

How to convert a point layer to a raster grid that shows the frequency of points per cell in QGIS

I have a point layer that shows the distribution of a species. Is it possible in QGIS to convert this point layer to a raster grid in which the value of each cell corresponds with the amount of points ...
4
votes
2answers
7k views

Converting point grid to raster using GRASS?

If I load the original .csv file, I then have a map of the African continent represented by 14069 data points covering it at 40x40km resolution. Each data point shows solar radiation means across the ...
13
votes
2answers
7k views

How to split shapefile per feature in Python using GDAL?

is it possible to split a shapefile per feature in python? (best would be a solution where i can temporarily save the resulting vector objects to the memory instead to disk). The reason: I want to ...
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 ...
9
votes
2answers
8k views

Convert several SpatialPointsDataFrames to raster

There are 100 SpatialPointsDataFrames in my Workspace. I loaded them on this way: filenames <- list.files(path="", pattern="XYhectareTravelTimes_ez+.*shp") for(i in ...
7
votes
3answers
2k views

Creating raster or vector raster from DEM point file?

i have a point shape of 75.000 elevation points in a regular 5 m grid. We now want to create a polygon grid with the elevation points as "centroids". Unfortunately, all attempts to do so fail: I ...
4
votes
1answer
436 views

raster::rasterize set wrong values with enclosed polygons

Similarly to this post rasterize (R package raster) fail to rasterize island polygons? the rasterize function in the raster package is giving me problems with enclosed polygons. In my case, some ...
0
votes
1answer
3k views

What is the difference between the “feature to raster” and “polygon to raster” tools when converting a polygon to a raster?

I am currently trying to get a group on connected polygons that are within the same feature to a raster so I can reclassify it for cost analysis. I noticed that ArcGIS for Desktop has a "feature to ...
0
votes
3answers
11k views

How to rasterize a vector map?

I am looking for a way to create a raster grid from a vector map. I have a map consisting of shapefiles which I want to export as a raster with UTM coordinates. I was thinking of something using the ...
7
votes
2answers
5k views

Issue Trying to create Zonal Statistics using Gdal and Python.

I am trying to create zonal statistics using Python and Gdal. I have a polygon shapefile and a raster file, and in order to do so, I am using a piece of code I found in StackExchange. The raster and ...
3
votes
1answer
127 views

Rasterizing Shapefiles onto TIFF loses style

I have two contour shapefiles, one for 2ft and one for 10ft contours. I want to put these on a TIFF file I have of the aerial. I achieved this by going to Raster > Conversion > Rasterize and using ...
3
votes
3answers
6k views

How to convert file .shp to .tif using ogr or python or gdal

I need to convert files. I'm trying to use gdal_rasterize gdal_rasterize -b 1 -burn 0 -l file file.shp work.tif and the output is the following: ERROR 10: Pointer 'hDS' is NULL in '...
1
vote
1answer
1k views

syntax error when using gdal in python console QGIS

When I run the following code in the python console in QGIS I get a syntax error: import osgeo.gdal gdal_rasterize [-b 1] [-burn 255] [-a Pixelkost] [-te 170000.2 168000.27 177999.8 177999.8] <...
5
votes
1answer
748 views

Area-weighted rasterising of polygon data

I'm looking for any GIS tool to do detailed rasterising of polygons. I've checked GDAL's gdal_rasterize command (and API), and ArcGIS's Polygon to Raster tool, but they only rasterise 1 attribute per ...
3
votes
2answers
289 views

Creating raster layer from dictionary in PyQGIS?

In a dictionary such as below, I have a series of x,y coordinates as key and distance measured as values in dictionary. I want to convert this dictionary to a raster layer with PyQGIS, Can I do it? ...
5
votes
1answer
6k views

convert vector (point shape) to raster (tif) using python gdal lib in qgis

I'm trying to convert a vectorlayer (point- shapefile) to a raster-dataset (tiff) using python gdal-library in qgis. On Graphical UserInterface I simple choose the menue "raster->conversion->...
2
votes
1answer
2k views

How to set the output extents of rasterization in QGIS

I am trying to rasterize a bunch of vector based shape files in QGIS. All these files are covering certain types of ground use in a city (houses, street, open field,...). I need these files to be ...
5
votes
2answers
715 views

GDAL (or other open-source) equivalent of Arc's Point To Raster Tool

I'm trying to convert a python script that relies on arcpy into one that only relies on open source modules, but I'm having some trouble. The bulk of my processing lies in one Arc tool "Point to ...
4
votes
1answer
11k views

How to convert a regular point grid to raster? [duplicate]

Possible Duplicate: How to convert a point grid to a raster? I´d like to convert a regular grid (25 meter) of points (XYZ) to a raster. I have tried the GRASS-tool r.in.xyz but I always get a ...
3
votes
2answers
511 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 ...
2
votes
0answers
134 views

Is elevation MCDA possible in QGIS? [closed]

Taking into account topology and existing building heights, would it be possible to do a MCDA and examine where densifying through new construction would be most profitable*, assuming that new ...
2
votes
1answer
255 views

Rasterize points in a map : result is not leasible. How to make the raster (points) bigger?

I have a vector layer (points) that I rasterized based on one attribute of the vector layer. I chose the GRASS GIS 7 command : v.to.rast.attribute. The raster layer appears in the map, but is not very ...
1
vote
2answers
388 views

Problem with contour lines thickness in bigger zoom levels

I'm a beginner user of GDAL tools. I'd like to rasterize contour lines into Tiff file (for example such region: N47E006), everything works for quite small zoom levels e.g. 10... but the problem is ...
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....
3
votes
1answer
827 views

Rasterize Point layer Error: Wrong value for -outsize parameter

I am trying to create a Euclidean distance raster from a point layer (in QGIS 3.0.3). From reading up on this topic in this forum I found that I should rasterize the point layer first. I also ...
3
votes
1answer
797 views

Calling gdalogr:rasterize algorithm in python console in QGIS?

I'm trying to rasterize a simple line-vector layer. I can do it by using QGIS GUI, but I want to do the same with python console. Unfortunately it always gives back an "Error: Wrong number of ...
2
votes
2answers
2k views

rasterize produces a raster full of NA values

I am having trouble converting a polygon to a raster. The desired raster is created, however all its values are equal to NA. require(rgdal) require(raster) #download a shapefile with 2010 census ...
2
votes
0answers
76 views

QGIS rasterize a styled layer [closed]

I disabled information from a vector layer with a styledefinition. Is it possible to rasterize only the styled information in QGIS?
2
votes
1answer
1k views

Elevation data from 3D shapefile of buildings to raster DEM

I have acquired LoD2 building models in the 3DShape format (Polygon ZM). This LoD2 data needs to be prepared for a R-script of solar irradiation calculations on roof surfaces, but which can only ...
2
votes
1answer
3k views

Rasterize vector layers with different extents into identical raster grids with QGIS

I am working on a quite simple spatial potential analysis using QGIS. I have some ArcGIS knowledge, but I am new to QGIS. My task is to identify the functional inner city of a region based on ...
2
votes
1answer
859 views

Rasterization of point vector in QGis: how to align the resulting raster to an existing one?

I have a point shapefile, with no associated .prj file, that I have to rasterize. Each point should be transformed into a pixel of 30x30 size aligned to the pixels of a Landsat image (the point file ...
2
votes
2answers
939 views

r raster package rasterize failing:no slots

I'm having trouble rasterizing a shapefile using the raster package in R. shp<-shapefile(ZoneShape); lcRas<-raster(lcRaster); r<-raster(ncol=ncol(lcRas), nrow=nrow(lcRas), crs=CRS); res(r)&...
1
vote
0answers
116 views

Rasterize (R package raster) fails to rasterize island polygons? [duplicate]

I am having problem in rasterizing a polygon shapefile: "island" polygons (I mean polygons which are totally included into a larger one) are ignored and do not appear in the raster. My code is: seg &...
1
vote
0answers
160 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
5k views

gdal_rasterize error: “attempt to create 0x0 dataset is illegal..”

I'm trying to use gdal_rasterize to convert a polygon shapefile into a raster, where the value comes from the 'COVTYPE' attribute. I try calling gdal rasterize like so (I'm calling from within a ...
1
vote
1answer
157 views

Adding a field with a unique value to vector layer in kml file (need this to burn values with gdal.RasterizeLayer)

I would like to create a field ID in my kml file, with a unique value so that I can use gdal.RasterizeLayer to burn the value to an image like this: gdal.RasterizeLayer(target_ds, [1], source_layer, ...
1
vote
1answer
2k views

Creating raster layer from data frame in R?

I have created a data frame which I need to convert to an image. This particular data frame is measured 174, 209, 36366 (nrow, ncol, ncell) respectively. This data frame is created and stored in R and ...
1
vote
1answer
187 views

How can one create a binary image from a FeatureCollection in Google Earth Engine?

I have been trying to find a solution for this for quite some time now based on ee.FeatureCollection.reduceToImage, but I don't seem to be able to find it... Suppose you have a region of interest ...
0
votes
1answer
216 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
84 views

Rasterize and union problem

i've done the union first and then rasterized it. But now i want instead of that, to rasterize each one and then merge it as one. How do i do that? I mean without the union first off. on<-union(...