Questions tagged [rasterize]

107 questions
3
votes
0 answers

Rendering html to canvas

I want to render my html to Canvas, with JS, html5; I tried 'RasterizeHTML' and 'html2canvas' plugins but both have a lot of bugs. Images are previewed cropped; some texts are not previewed at all. in similar pages the same plugin behaves itself…
Adam
  • 69
  • 3
2
votes
1 answer

rasterize and mask in one step?

Toy data library(terra) template_raster <- rast(xmin=0, xmax=10, ymin=0, ymax=10, crs="+proj=longlat +datum=WGS84 +no_defs +type=crs", resolution = 0.1) values(template_raster) <- c(rep(NA,4000),rep(10,2000),rep(NA,4000)) polygon_to_rasterize <-…
TheRealJimShady
  • 777
  • 3
  • 9
  • 24
2
votes
1 answer

Problem to rasterize small polygons with rasterize function

I am trying to generate a large set of binary rasters from a multi polygon shapefile. My snap raster has a large pixel, 0.5 x 0.5 degrees. I don't have major problems rasterizing de large polygons, but, for the small ones, I am writing empty raster…
Javi Nori
  • 21
  • 1
2
votes
0 answers

loading raster image in tiff format in R

I am trying to load raster image which is in tiff formate in Rstudio. For this I used code #library (raster) #library (sp) #library (rgdal) #library (tiff) #wd <- ("E:\\phd\\data\\calliberation test\\rstudio") #setwd(wd) #NTL1997F12 <-…
Heena
  • 21
  • 2
2
votes
0 answers

Combining 2 raster data sets with different extent, resolution and point regularity

I'm having trouble merging two raster datasets that have different resolution and extent, and have irregular point data. Below is info on each raster. I need these datasets to merge according to the grid points so that I can run a fire spread model…
Sarah
  • 21
  • 1
2
votes
1 answer

Rasterize() slow on large SpatialPolygonsDataFrame, alternatives?

I have a large (266,000 elements, 1.7Gb) SpatialPolygonsDataFrame that I am try to convert into 90m resolution RasterLayer (~100,000,000 cells) The SpatialPolygonsDataFrame has 12 variables of interest to me, thus I intend to make 12 RasterLayers At…
ctlamb
  • 131
  • 1
  • 4
  • 14
2
votes
1 answer

Ghostscript - Convert vector pdf to the raster pdf

I would like to convert the vector pdf to raster pdf by using ghostscript(i.e. rasterized the vector pdf). But I cannot find the appropriate parameters to do so even if I add the resolution parameter -r300. The code I used is -dSAFER -dBATCH…
CAL
  • 39
  • 5
2
votes
1 answer

Problems with rasterize function in R

I have three SpatialPointsDataFrame objects that are actually just one point each. My intention is to make a raster for each of them with an extent that includes the point, in such a way that all cells but the point are "NA", so then I can use the…
2
votes
1 answer

Symfony & Phantom JS Bundle - Routing Error

I am using this Bundle to convert HTML to PDF files. The actual conversion works, but I have a problem understanding the routing. Here is my code: /** * @Route("/formulare/selbstauskunft/{keycode}", name="saPrint") */ public function…
PrimuS
  • 2,505
  • 6
  • 33
  • 66
2
votes
1 answer

Rasterize spatialpolygons in R giving raster with NA values

I am having issues converting this spatialpolygondataframe to a raster. When I do ther conversion, the raster has NA as its values. As shown below: DL3 [1] class : SpatialPolygonsDataFrame features : 126 extent : -15.04001, 46.1036,…
Joke O.
  • 515
  • 6
  • 29
2
votes
0 answers

use R to rasterize shapefile with holes?

I am attempting to use R to rasterize some downloaded shapefiles that include polygons with holes in them and R is failing to recognize the holes. The holes seem to be designated as hole=T, so I don't think the issue is the one solved in the…
user1521655
  • 486
  • 3
  • 17
2
votes
0 answers

Phantomjs rasterize (screen capture) simulate mobile device

Is there any way of capturing web screnshot in the way that the output will look like the way a website would look using a mobile device, such an iphone? Iv'e tried using an iphone user-agent, and to use the exact same resolution, but the result is…
superuser123
  • 955
  • 2
  • 12
  • 24
2
votes
1 answer

Draw into custom buffer class [Java]

Short Version: Is it possible to draw (via Graphics2D) into a custom buffer class ('sparse' raster-image)? Longer Version: I'd like to convert a polygon (given by a closed path) into a raster image. But since the polygons can potentially be really…
TomKeegasi
  • 200
  • 8
2
votes
1 answer

PHP + PhantomJS Rasterize

I'm using PhantomJS 64 bit in my PHP application to dynamically capture an HTML page to be emailed to the user. phantomjs rasterize.js "http://..." /path_to_images/image.png This method works fine when I run the above on the command line but when…
Preston S
  • 2,751
  • 24
  • 37
2
votes
1 answer

Blank PNG / Tainted canvases may not be exported (not using images)

I am trying to export a fairly simple html to canvas and then png. To do so, I am using rasterizeHTML (http://cburgmer.github.io/rasterizeHTML.js/). The problem that I am facing is that I get a warning like if I was loading an external…
rowasc
  • 320
  • 1
  • 3
  • 10