Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [rasterization]

The process of turning a vector into its raster equivalent

1
vote
1answer
28 views

Preserving uniqueness for overlapping points when converting from points to raster?

I'm trying to optimize outflow points based on lowest elevation within some tolerance. Using the SnapPourPoint function which does exactly this, but outputs a raster file. I've been converting this ...
3
votes
0answers
243 views

Object given is not a Python function - gdal.RasterizeLayer

I'm running into this error and I'm not quite sure what the error means. Novice here, operating out of jupyter environment, and trying to burn the vector layer of roads (road_lyr) into the raster ...
1
vote
1answer
38 views

Converting polyline to raster with varying cell value along shapes?

I have a polyline file with start and end elevations. I'm trying to convert this to a raster which will have as values a gradient between the start and end elevations along the line. Is there any ...
3
votes
2answers
295 views

Rasterizing vector layer with PostGIS?

I have a vector layer with 2498 features (houses) that I want to rasterize/produce a raster image from but can't figure out how: Column MARK_Z = is Meters above see-level for the base of each ...
2
votes
0answers
126 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 ...
3
votes
0answers
305 views

Problem Rasterize QGIS

I have a shapefile with one point (starting point of a rockfall) and want to rasterize this to do further calculations. When I rasterize it into a Zero-Raster-File (called "startgrd", which is DEM*0),...
1
vote
0answers
87 views

Rasterize solid 3D-building blocks with QGIS

Stockholm city provides 3D building blocks as open vector data. I want to rasterize these solid cubes to be able to perform a multi criteria analysis. But no matter which rasterize-command I try in ...
1
vote
1answer
370 views

Rasterizing lines with “gdal_rasterize” in R return no result and status 1

I am using gdal_rasterize in the gdalUtils package to convert lines in a Shapefile to a raster. library(gdalUtils) src <- "D:/Test/sample.shp" dst <- "D:/Test/raster.tif" raster <- ...
0
votes
1answer
584 views

mbtiles to geojson or geotiff

I have a remote sensing data in geotiff (input_data_rs.tif) format. I want to get corresponding ground truth from open source map (e.g. roads). I was able to download the mbtiles for the country. Is ...
1
vote
0answers
180 views

Different output from rasterize

I have to convert from vector to raster so I used the Raster/conversion/rasterize tool. On my first try I used the Width (1447) and Height (2538) from the reference raster layer (1985clasification) on ...
8
votes
1answer
2k 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
5k 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 ...
1
vote
1answer
52 views

Lining up cells from two raster datasets

I am using ArcGIS 10.4.1 to convert a polygon feature class to a raster dataset and I would like the cells to line up with an existing raster layer. I am running the feature to raster tool and using ...
5
votes
1answer
556 views

Calculating the percentage cover of multiple polygons

I am creating a habitat map for a woodland dependent species. I have multiple woodland polygons. Across the landscape the density of woodland varies widely and I would like to show that difference. I ...
5
votes
1answer
370 views

How to run gdal_rasterize with sql option?

I'm running gdal_rasterize via a python pipe. When using the -l option, the raster is created just fine but I can't manage to get -sql option to work. Well my raster will be created but consists only ...
1
vote
1answer
1k 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 ...
2
votes
1answer
636 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
0answers
143 views

Converting vector layer to raster with cell size same as other raster using QGIS?

I am a student and was taught by my professor in ArcMap but he wants us to repeat the process in QGIS. And i dont know how to set cell size in rasterize (vector to raster)in QGIS just like in ArcMap. ...
2
votes
0answers
37 views

Convert lat/lon points to gridded panel dataset?

Suppose I had a dataset that looked like df. Could someone show me how I would I summarize this panel dataset into a panel by km x km grids in R? df <- expand.grid(decade = seq(1940, 2010, 10), ...
0
votes
2answers
97 views

Rasterization of a polygon

I want to have a raster representation of the river, so that I could further analyse combining other raster data. I tried extract the DEM, polygon to raster and resample. But the results are not good ...
1
vote
1answer
303 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 ...
2
votes
0answers
407 views

QGIS GRASS: Error when converting vector to raster

I am trying to convert a vectorial layer (a grid of regular points with values, representing probabilities, associated to each point). I tried to use QGIS, but I got this error: ERROR 1: Attempt to ...
4
votes
2answers
1k views

Convert vector point data (shp) to raster (tif) using QGIS

Overall Question: How can I get the rendered tif image to keep the modifications seen in the image produced by map canvas? I am writing a standalone Python script. I have simplified my code below ...
5
votes
1answer
363 views

Rasterize in QGIS using point as centroid (not vertex)

I'm attempting to make the full switch from ArcGIS to QGIS, but there are a few snags I'm hitting along the way, one of which is in the GDAL "Rasterize" function. My process goes like this: I have a ...
3
votes
1answer
463 views

Understanding resolution when rasterizing in R?

I'm creeping into building surfaces - useful for a number of public health projects - and can't seem to make sense of what's happening with the resolution and raster building process to get what I ...
4
votes
1answer
346 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 ...
2
votes
1answer
88 views

Point to Raster Arcmap - incorrect pixelvalues?

I am having a problem using the arcmap point to raster tool. I have x/y coordinates for a set of data, and 1464 (2 months worth of hourly data) separate files to convert from an excel with X/Y/value ...
2
votes
1answer
217 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 ...
2
votes
0answers
183 views

Non-HTML circle text labels on Leaflet map

I need to save image of Leaflet map with polygon, multi-polygons, circles and text below every circle. I have geojson file with circle and polygon coordinates (lat and lng). I managed to get image of ...
1
vote
1answer
65 views

Storing Lat Long Ranges in Tables

Has anyone tried to store nation-wide lat/long ranges as a look-up table? For example: If you had a polygon dataset that covered the entire US (for example, county polygons). And you wanted to look ...
2
votes
0answers
78 views

Rasterizing Shapefile, using other shapefile as Mask

I have a shapefile (ShapeY) of European extend and want to rasterize each time only a certain area of the shape (ShapeX) (i have the shapes indicating the prevailing extend) with python and QGis. ...
2
votes
1answer
50 views

Error in rasterToPolygon trying to get several coverage layers

I have a very strange problem: I am trying to get a raster with coverage from 0 to 1 in each cell for types of vegetation, I started with a raster of vegetation type, but I needed a raster with 12 ...
1
vote
0answers
100 views

Polygon to Raster: Cells with multiple values

I'm trying to use R to rasterize a number of shapefiles and I'm having trouble dealing with cells on the edge of shapes, in other words the if a cell is partially covered by an NA value and partially ...
3
votes
0answers
193 views

QGIS create raster from CSV and find raster index [duplicate]

I have a CSV with about 2 Mio. entries with X and Y coordinates WGS84 and many attributes. The X and Y coordinate are the south west coordinate of 100 meter by 100 meter grid over a country. But the ...
2
votes
2answers
463 views

QGIS Convert vector classification map into raster

I tried to convert vector classification into raster file for accuracy analysis following these suggestions My vector data is like this: However, none works The first one, interpolation, resulting ...
2
votes
0answers
110 views

How to use GDAL RasterizeLayer (python binding) -where flag

I am trying to use GDAL RasterizeLayer python binding, but I can not find a way to use the -where flag. The 'pure' GDAL command I am trying to run is: gdal_rasterize -b 1 -burn 0.00001 -where 'DN=...
0
votes
2answers
93 views

Converting dimension feature into image using ArcObjects? [closed]

I have a task to convert dimension feature into image with ArcObjects. I need to get real image that I see in ArcMap (with right size and spatial reference, of course) instead of turning feature ...
1
vote
0answers
76 views

How to correctly rasterize a polygon which crosses 180E longitude?

I want to rasterize a polygon wich crosses 180E lon with gdal_rasterize. The polygon is in the WGS84 projection. I used the following command: gdal_rasterize -burn 1 -of GTiff -ot Byte -ts 1500 1500 ...
1
vote
0answers
101 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 &...
2
votes
2answers
2k 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
2answers
937 views

Failure of the code calling the function “rasterize” in R: NAs or no slots

I have some problems to convert a shapefile into a raster. I used the function rasterize (package raster) but all raster values are equal to NA. Following the answers to this question rasterize ...
4
votes
1answer
2k views

Rasterize vector file using gdal.RasterizeLayer() without losing attribute information in python

Is it possible to rasterize a vector file with gdal.RasterizeLayer(), saving attribute as Raster value ? Like gdal_rasterize can do with : gdal_rasterize -a attribute -ts rasterXsize rasterYsize -l ...
1
vote
0answers
87 views

Polygon to Raster tool while keeping less than maximum values

I'm trying to convert a very large, detailed polygon to a raster with a coarser resolution in ArcGIS 10.1 using the polygon to raster tool. The value field is a percentage and the cellsize must be the ...
0
votes
0answers
365 views

Rasterize layer with GDAL after attribute filtering

I am working with GDAL/OGR and I need to do the following task : I have a shapefile with many attributes. I performed a query over one of them, "type_of_building='Church'". I have done this with the ...
1
vote
1answer
288 views

Arguments error when running LineDensity scripts in arcpy [closed]

I'm trying to use LineDensity tool on polyline features. The shapefile is small and includes some invalid geometries. The code I use is an adaptation of an ArcGIS Help script. Here is my code: ...
1
vote
3answers
181 views

Polygon to raster. How to keep same values?

I have a polygon with values 3, 6, 9, 12, 15, 18, 21, 24, 27 an 30. These are the time it takes for the firetruck to reach certain destinations. Now i want to compare these to another raster that have ...
3
votes
1answer
4k views

How to rasterize an object of class SpatialPolygonsDataframe in R

When I read a polygon shapefile into R using rgdal, it was imported as an object of class SpatialPolygonsDataframe. I need to rasterize the polygon, but the rasterize{raster} function requires it to ...
2
votes
2answers
329 views

Export vector layer to raster in QGIS

I have a Shapefile imported into a QGIS project as layer. And I have created a Style for that layer using a Column from the attribute table. To name it I have grouped several landuse-classes to a ...
1
vote
0answers
60 views

Creating a contiguous raster stack from different sources (vectors and DTM bands)

This is a conceptual question I've been trying to implement for a while, and not being very good at raster/data processing or python I'd like to hear best practices in dealing with an extent such as ...
2
votes
0answers
56 views

Create a raster dataset containing the number of returns from a las file? [duplicate]

I already created DEMs, DTMs, DSMs from a LiDAR (LAS) file with a little help from the internet. However, right now I'm kind of stuck in my research. I want to create a raster file which contains ...