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

vrtcon examples #5

Open
mdsumner opened this issue May 19, 2023 · 1 comment
Open

vrtcon examples #5

mdsumner opened this issue May 19, 2023 · 1 comment

Comments

@mdsumner
Copy link
Member

this is how we can get terra and stars to work with tile servers, without the warper

px <- dev.size("px")
writeLines(dsn::wms_virtualearth(), dsn <- tempfile(fileext = ".xml"))
terra::plotRGB(terra::rast(dsn::vrtcon(dsn, outsize =px, ovr = 18)))

with the warper

terra::plotRGB(terra::project(terra::rast(dsn::vrtcon(dsn, ovr = 18)), terra::rast())

terra::plotRGB(terra::project(terra::rast(dsn::vrtcon(dsn, ovr = 16)), terra::rast(terra::ext(120, 150, -50, -20), res = .1)))

I'm using a file not the dsn text because I can't get the in-mem xml to work with "vrt://"

I'm including outsize for fun, it's ovr that does most of the work.

@mdsumner
Copy link
Member Author

this doesn't work sadly

vrtcon(sprintf("\"%s\"", dsn::wms_virtualearth()))

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

No branches or pull requests

1 participant