Questions tagged [rasterization]

The process of turning a vector into its raster equivalent

Filter by
Sorted by
Tagged with
0
votes
1answer
20 views

st_rasterize (template smaller than sf object)

I need to rasterize an sf object that at the end must have the same cell size and be on the same grid of a defined raster object "template", because, eventually, I want to merge them. The ...
0
votes
0answers
44 views

Vector length attribute not the same after convert to raster in QGIS

In QGIS I've successfully used GRASS v.to.rast to convert a SHP file to a raster and then raster>conversion>BMP. My output looks great. The raster info says it is w = 3070, h = 8727. Unit is ...
1
vote
0answers
39 views

Why “raster analysis” change the values? I leave it blank and all things are right [closed]

My original file has polygon data, and I use Polygon To Raster function. After I have done it, I found the value of the polygon data were changed. The general steps are: The last column of the table ...
1
vote
1answer
33 views

QGIS- Output bmp files are tilted

I am new to QGIS. My goal has been to convert a .shp file to a raster, eventually to a .bmp for an input map into a separate piece of software I am using... this separate software also needs the map ...
0
votes
0answers
16 views

Rasterize does not rasterize field with the value 0

I have a shapefile layer that contains the field fraction which varies from 0 to 0.05. DN sum count fraction 1 0 90 0 2 5 1070 0.0047 3 ...
0
votes
1answer
36 views

How to execute GDALRasterize() function wtih options?

I am using GDAL 2.1.0, in both Windows and Linux environments. I want to programmatically rasterize a shape file in my C++ app. Thanks for any clues you can provide. gdal_rasterize I can successfully ...
0
votes
1answer
34 views

Rasterize vector data with the extent and resolution of reference raster

I have long tried to rasterize a point shapefile with the same resolution (32.461 km) as another raster layer I have loaded into the QGIS canvas too. I have seen multiple cases, here and here where ...
0
votes
0answers
29 views

Rasterize (vector to raster) errors in QGIS

I have a point shapefile that I want to convert to a raster in QGIS, where I want to have the values from the points into pixels with a 30m x 30m resolution. But when I run the command an error ...
0
votes
1answer
81 views

Converting a Road shp file into a continous Road Raster in QGIS?

I have converted a Road shp file into a Raster in QGIS, however after the conversion the Road is no longer continous (i.e only the cell corners are touching). I have tried increasing the resolution ...
0
votes
1answer
36 views

QGIS 3.16 Rasterize doesn't show anything

To give more info. The input layer is bus stop buffer dissolved which i buffered several stops in the district for 200 m and dissolved it to get those greenish polygons in the layer. The output extent ...
1
vote
0answers
20 views

Aligning raster perfectly with feature using ArcMap

I have a feature layer with 1000x1000m polygons that are seamlessly glued together. From this layer I want to create a raster with 25x25m cells as basis for further raster operations. I'm using ArcMap ...
1
vote
1answer
72 views

Using ModelBuilder to iterate through fields in shapefile and create raster from each

I have the exact same problem as Iterate Through Fields in Model Builder [sic] at GeoNet but all the solutions proposed there involved ArcPy and I'm not familiar with that program. I would like to use ...
1
vote
0answers
41 views

How to automatically align a line with a grid

I have a line layer (orange line in image below) that I need to snap/align with an underlying grid (light blue lines below). The desired result would be something like the purple line. I have already ...
2
votes
0answers
28 views

Altimetric image with blank space when merging

I have downloaded some tiff images that has altimetric data from the Brazilian SRTM website: where i am using raster layers to apply merging. However, i have some problems with my merged images, a ...
0
votes
2answers
44 views

Text xyz coordinate import gives data that is not usable in QGIS [closed]

I am using QGIS to try and create a raster from 5m XYZ text point data. I imported using the tab delimited data function and points were created and located where I want them to be. I now want to ...
0
votes
1answer
56 views

Extraction affine transformation while using rasterio.features.rasterize

I am currently using rasterio.features.rasterize to rasterize my shapefile. But currently I am always using an Rasterfile to a) rasterize and b) save on disk. The get the information of the ...
0
votes
0answers
35 views

QGIS rasterize error

I am trying to add mosaic/merge image bands with different layers on QGIS 2.18.0, however when I click the option to add mosaic I get the error: ERROR 4: `' does not exist in the file system, and is ...
0
votes
1answer
45 views

Burning zeros instead of nodata in GDAL rasterize

When rasterizing a vector layer I would like to achieve an output that contains 1 for areas covered by the shape and 0 for areas not covered. So far GDAL always converts areas that are not covered to ...
1
vote
1answer
50 views

Get geopandas geo or affine transform

Does anyone know how to get the affine transformation from a geopandas dataframe? I need this for rasterising geospatial vector data with rasterio. shapes = ((geom,value) for geom, value in zip(...
0
votes
0answers
28 views

Rasterize rotated shapefile

I want to rasterize a shapefile (I don't mind whether to use QGIS or python) but I want to rotate my shapefile first and than have my raster aligned to this rotation. So lets say I rotate my shapefile ...
1
vote
0answers
57 views

Is there a way to rasterize polygon with hatch pattern with GDAL CLI or in a Python script?

I am trying to automate some work previously done in QGIS. Target platform is AWS Lambda so there is no way to use QGIS or any other standalone GIS-specific application. QGIS provide a way to draw ...
1
vote
0answers
41 views

Exporting a raster object with a categorical legend

I created a raster object (package raster in R) using the function rasterize starting from a shapefile of polygons. I passed as field a shapefile attribute (CODE) containing 37 landuse categories. ...
1
vote
1answer
65 views

How to burn values from a shapefile into raster with gdal.Rasterize?

I have this code to rasterise a point shapefile into raster TIFF. vector_ds = ogr.Open('stations.shp') shp_layer = vector_ds.GetLayer() shape_file = 'stations.shp' output_raster = os.getcwd()+'/...
0
votes
0answers
9 views

gdal_rasterize and keep/create the attribute table

I want to rasterize my polygon by a given field, and keep/create the attribute table. Now, as a raster, the attribute table will contain a row by each unique value (category) in my raster, and no an ...
2
votes
1answer
38 views

Rasterize doesn't preserves the class attributes original values

I'm using this GDAL based rasterize function in python in order to create raster from shapefile based on numerical class values. I am using: function of GDALMy class attributes are very long numbers : ...
4
votes
2answers
150 views

How to choose cell assignment method in GDAL/rasterio rasterize functions?

I have a big (2GB) landcover shapefile I want to convert to a GeoTIFF file. For this purpose, I am using the gdal.Rasterize() function with the following options: rasterize_options = gdal....
2
votes
0answers
37 views

TIFF file issue [closed]

I started georeferencing an image. A TIFF file is saved in my desktop. But I couldn't view the image of the map ( while seeing the icon on desktop). I then add the raster layer in QGIS. But the map ...
0
votes
0answers
60 views

Rasterize feature class in geodatabase using gdal.Rasterize (Python API)

I am trying to rasterize a polygon data set (feature class within a file geodatabase) using the GDAL Python API. I am using gdal.Rasterize (Actually, it would be very interesting to know what the ...
0
votes
0answers
24 views

How can I get an average value for area using 30 different vector shapefiles as input?

I have 30 different vector boundary polygon shapefiles for a study area that don't exactly match up. Each polygon has a risk score. I want to overlay all 30 maps into a single map that represents ...
0
votes
0answers
37 views

Change raster type gdal to raster type rasterio in Python

I have created raster using "rasterize" function with GDAL, Python My problem is that the result is type gdal <class 'osgeo.gdal.Dataset'> and I would like it to be rasterio, e.g: &...
0
votes
0answers
28 views

Rasterize failes in QGIS 3.8

I'm trying to rasterize a polygon layer which has two columns : id and code. I would like each polygon to get value according to the code field. I have used the tool rasterize from the raster menu ...
1
vote
1answer
27 views

Using multipolygon shape layers in profile tool

I am working with QGIS for some time. The profile tool is indeed very useful to visualize the 3D problems. My problem now is associated with this tool. I have a multi polygon shape layer which I ...
0
votes
0answers
21 views

Convert all SpatialPolygonsDataFrame fields to raster

How do I convert SpatialPolygonsDataFrame to raster with all the data fields? I tried it this way: class(xxKv) # "SpatialPolygonsDataFrame" class(rasCtv) # "RasterLayer" rxxKv <-...
1
vote
1answer
146 views

Rasterize polygons using gdal/ogr python API

My understanding so far is that 'gdal' is used for raster data and 'ogr' for vector data. Given this I have been trying to rasterize a polygon data set (output raster metadata is given by a raster ...
0
votes
0answers
114 views

gdal_rasterize multiple attributes to multiple bands

I have a shapefile consisting of polygon geometries, each row/geometry associated with multiple attributes. I want to generate a raster file with multiple bands, where each band will have a different ...
1
vote
1answer
48 views

Rasterizing polygon vector grid cell. Define raster cell position?

I am doing many variables calculation over a vector 1x1 km² grid layer in QGIS. Each cell has many attributes, different spatial indexes. I'd like to rasterize the layer by certain attributes but ...
1
vote
1answer
49 views

How to assign fixed values in a raster using to multiple polygons in QGIS?

I have digitised multiple small polygons over a city boundary and its floodplain. I would like to create a raster of the run-off coefficient out of it (for a flood model). Therefore I would like to ...
0
votes
0answers
19 views

Raster Calculator functions

I was trying to overlay 8 thematic maps using the raster calcular in modelbuilder in ArcGis Pro but the ouput displays using only the sketch symbology (one symbol) when I wanted the classify. I was ...
1
vote
2answers
44 views

When trying to rasterize a SpatialLine .shp, I get a raster with points instead of lines?

EDIT: I've solved the problem, the resolution was simply not high enough to properly show the lines in the plot. My code now looks like this and works fine: r <- raster(ncol=1000, nrow=1000, ...
0
votes
0answers
31 views

Covering shapefile to raster using rasterize in R,return same result

When i using the blow code to change 'thre' property of shp to raster: r1 <- rasterize(city.1, r,'thre',fun='min') r2 <- rasterize(city.1, r,'thre',fun='max') here, city.1 is shp, thre is the ...
4
votes
1answer
43 views

Rasterizing each line features separately in layer using PyQGIS

I have a vector layer which is consists of channels in a watershed. I want to rasterize each individual line in the layer separately in PyQGIS. I could not manage to loop through in the layer and ...
3
votes
2answers
95 views

Rasterization of polygons, calculation of the area covered

In R environment I have (1) a SpatialPolygonDataFrame with number of polygons: polys; (2) raster grid of resolution 10'000 m: grid. Both of them are in the LAEA coordination system. What I need is to ...
0
votes
0answers
23 views

Problem with Rasterize Tool (vector to raster) QGIS 2.18.28

I am trying to convert a vector file into a raster using the rasterize tool however it us just producing a back block of a single value. I am rather confused as I have used this tool on another ...
0
votes
0answers
42 views

gdal:rasterize overwrites field values when generating tif

In one sentence: is there a way in pyqgis to rasterize a vector point layer, output it as a tif file so that the original 'field' data is preserved, so that when it is read in again the user can see ...
1
vote
1answer
93 views

Rasterize points by 'most frequent' in R

I have a series of spatial data points that I want to convert to a raster using the R function rasterize. The data I want represented is a factor value, so I want to represent the most frequently ...
1
vote
1answer
46 views

After converting vector data to raster with GDAL in Python, I get completely black TIFF file

I am trying to convert data from vector to raster with GDAL rasterize using by Python. I want to output raster format as TIFF, but the result TIFF opens completely black. I am writing code benefit ...
0
votes
1answer
44 views

Preparing data for polygon to raster?

I am doing my GIS course term project in which I am integrating 3 kinds of map with index overlay method to see how much heat stress level is on my walking trail. To do it I have the tree canopy ...
3
votes
2answers
85 views

Rasterizing all intersected cells when rasterizing line layer in QGIS

I have a line layer that I want to rasterize. I run the Rasterize (vector to raster) tool in QGIS Processing to do so. However, the output is lacking in that it doesn't capture each cell that the line ...
0
votes
0answers
78 views

Rasterize: Best way to burn string values into raster (string to real) (QGIS)

I have to rasterize a polygon layer. Unfortunately the values of the field I have to burn into the raster has a variety of string entry's like "L239x" or "a403" (case sensitive!). RAT (Raster ...
0
votes
0answers
21 views

Manual Generation of Rastered Images for a TMS

I'm looking to generate rastered images for overlay on a Leaflet map. I have a large amount of latitude/longitude points with a value associated with each point. Think of them as polygons with a ...

1
2 3 4 5
7