Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow warping to a raster, not just specify a dim #21

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

mdsumner
Copy link
Member

@mdsumner mdsumner commented Sep 7, 2021

seems to work ok, except for we auto-get raw values from imagery ... so have forced use of Float64 for now.

  target <- raster::raster(raster::extent(c(-1, 1, -1, 1) * 1e6), crs = "+proj=laea +lon_0=147 +lat_0=-42", nrows = 512, ncols = 512)
sstfile <- system.file("extdata/sst.tif", package = "vapour")
library(lazyraster)
library(raster)
#> Loading required package: sp
plot(as_raster(lazyraster(sstfile), target))

     plot(as_raster(lazyraster(sstfile)), c(128, 256))

     
     vearth <- '<GDAL_WMS> <Service name="VirtualEarth">
 <ServerUrl>http://a${server_num}.ortho.tiles.virtualearth.net/tiles/a${quadkey}.jpeg?g=90</ServerUrl></Service>
 <MaxConnections>4</MaxConnections>    <Cache/>    </GDAL_WMS>'
     
     plotRGB(as_raster(lazyraster(vearth), target, band = 1:3))

     
     
     plotRGB(as_raster(crop(lazyraster(vearth), extent(14e6, 20e6, -4e6, -0e6)), c(64, 64), band = 1:3))

Created on 2021-09-07 by the reprex package (v2.0.1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant