Questions tagged [rasterize]
107 questions
0
votes
1 answer
How to build a loop to rasterize several simple features?
How to build a loop to rasterize several simple features step by step?
library(sf)
library(fasterize)
b0 = st_polygon(list(rbind(c(-1,-1), c(1,-1), c(1,1), c(-1,1), c(-1,-1))))
b1 = b0 + 2
b2 = b0 + c(-0.2, 2)
x = st_sfc(b0, b1, b2)
x =…

ilex
- 103
- 7
0
votes
2 answers
Rasterizing coordinates for an irregular polygon changes original shape
I am trying to smoothen the edges of an irregular polygon in R, namely to turn its sharp corners into round edges. I am trying to do this using smoothr::smooth, but this function operates on objects from packages sf or sp while all I have is a set…

Marco Plebani
- 436
- 2
- 14
0
votes
1 answer
R: mask() and rasterize() with spatialPolygonsDataFrame having holes
I have a spatialPolygonsDataFrame consisting of 3 polygons. The third polygon has the same shape as the first but has a hole where the second polygon is located.
I built the hole in the using the answer from another question (How to add a hole to a…

yPennylane
- 760
- 1
- 9
- 27
0
votes
0 answers
Gdal Rasterize inserts unwanted line of null values in raster misalligning subsequent rows
I'm using GDAL.rasterize to rasterize a simple shapefile of points. The shapefile points simply consists of Xco-ord, Yco-ord and an integer data value. Everything about the output file is fine except for a single row containing only No_data…

DPTPM
- 1
- 2
0
votes
2 answers
Rasterize WKT polygon (from geopandas) with Python and OGR/GDAL
As a coding enthusiast I am currently creating my own "geospatial" tool as how I would like it to work. However right on the start I am already facing a problem.
My tool should work using GeoPandas to extract information and then OGR/GDAL for the…

Mr unkown
- 1
- 1
0
votes
1 answer
Rasterize multiple fields of a shapefile at once
I have to rasterize each 62 columns of 30 big shapefiles (>8million cells) resulting in 1860 rasters.
I'm able to do this in R with smaller shapes (~ 8000 features) quite easily and fast. However, when just trying to load this big shape in R, it…

João Pompeu
- 1
- 1
0
votes
2 answers
How to judge whether a local pc machine supports d2d hardware acceleration
Hardware acceleration is a feature supported by Direct2D. Here is my question.
As far as I know, Hardware acceleration is limited by GPU model, driver version .etc. Does anybody know the details of this? In other words, how to determine whether a…

Frank
- 53
- 6
0
votes
1 answer
How can I disable ghostscipt rasterization of images and paths?
I need to convert a PDF to a different ICC color profile. Through different searches and tests, I found out a way to do that:
First I convert my PDF to a PS file with:
.\gswin64c.exe -dNOPAUSE -dBATCH -sDEVICE=ps2write -sOutputFile="test.ps"…

FFRock
- 1
0
votes
0 answers
Extract strings from shapefile attribute using GDAL and Python 3.X
I have a shapefile that consists of two fields/attributes, one being integers, the other being strings.
I can extract the integers into Python array by first using the function gdal.RasterizeLayer() to burn the shapefile into a .tiff image as the…

adam
- 1
0
votes
0 answers
Rasterizing in R does not seem to handle 'islands' well
I'm trying to rasterize shape files and I notice a very annoying artifact. If the shapfile contains a shape of a road that fully encloses a region than that whole region is identified with the class road in the raster.
In the images below there is…

Daan
- 349
- 4
- 16
0
votes
1 answer
Could not load file or assembly Ghostscript.NET
I am using Ghostscript.Net, Version=1.2.1.0, to rasterize PDF to images. I have referenced both the 32 bit-gsdll32.dll and 64 bit-gsdll64.dll of ghostscript in my project directory/bin folder. I am using this piece of code to get the path of the…

Mellionis
- 105
- 1
- 9
0
votes
1 answer
How to automatically convert many fields of a polygon shapefile to raster in R
I have a shapefile representing Thiessen polygons.
Each polygon is associated with many values of a table.
thiessen <- readOGR(dsn = getwd(), layer = poly)
OGR data source with driver: ESRI Shapefile
Source: ".../raingauges/shp", layer:…

João dos Reis
- 55
- 6
0
votes
1 answer
CABasic Animation on iPhone X causes "Warping" of Rasterised Layers
I am creating an App that uses CABasic Animation on Sublayers of a UIView.
Scaling and Position Animations are involved and the Layers are CAShapeLayers with shouldRasterize set to true for smooth Animation.
This works, but on the iPhone X, Layers…

Razattax
- 163
- 1
- 1
- 12
0
votes
1 answer
Export/Rasterize alpha shape to bitmap
I build an alpha shape from some points (example given in code) and want to export the shape to a raster graphics format. I need the shape only, not the plot markings (axis, scales ect).
I need only the resulting triangle on white ground as a…

Topi Anachname
- 3
- 1
0
votes
2 answers
gdal.RasterizeLayer: using the where parameter
In python, I'm using the following line of code:
gdal.RasterizeLayer(outDs, [1], Shp, burn_values=[ii])
My shapefile 'Shp' has a field named 'landuse', which stores strings (class name).
I need to burn a number for different class name. I was…

Bruno von Paris
- 882
- 1
- 7
- 26