Comments (4)
I'd probably prefer just storing it as a .TIF. It won't be as convenient as data(habitat)
, but when compared to using wrap()
/unwrap()
or storing it as a RasterLayer
and converting to SpatRaster
, I feel like the .TIF option is the most straight-forward.
from quadtree.
I started to dig into this just to scope out how big of a job it would be. I think most things should port 1:1 with not much trouble. I would be happy to submit a PR with some ideas on using all terra internals. Initially just as a target to compare against and see where issues may be
One possible wrinkle I see is the habitat
dataset.
Internal package RasterLayer objects have been a thorn in the side of folks converting to terra SpatRaster because of the need to wrap()
/unwrap()
SpatRaster objects to store in .Rda.
-
On one hand, it is simple enough to call
terra::rast()
to convert the existinghabitat
dataset, leaving it unchanged as far as how it is stored in the package. -
For alternate options, I know Robert has suggested to folks that they just store a .TIF file in inst/extdata, rather than wrap/unwrap. The data would then be then accessed as a path via
system.file(, package="quadtree")
. That works, but not quite a full replacement for currentdata(habitat)
calls.
from quadtree.
Sounds good to me! I have made all the initial conversions and implemented storage as .TIF. This causes some slight differences in the floating point values stored, which in turn affects (minor I think) the costs and other values coming out of find_lcp()
. See #19 for more on this.
One new wrinkle that this new PR introduces (but does not address in any way) is now SpatRaster is the main object of interest--which is a somewhat more broad definition than RasterLayer. Notably it can contain multiple layers.
from quadtree.
Completed with PR #19.
from quadtree.
Related Issues (17)
- Migrate issues from GitLab to GitHub
- Create quadtrees from lines/polygons/points HOT 1
- Make Quadtree more space-efficient
- Arithmetic operations between quadtrees
- Manual splitting/merging of quadtree cells
- More support for binary quadtrees (in particular, set operations)
- Make 'quadtree' compatible with 'terra' HOT 2
- LCP finder finds wrong path
- LCP sometimes returns inconsistent results HOT 1
- 'ticks' parameter of 'add_legend' doesn't work correctly
- plot(<Quadtree>): legend doesn't show when alpha is small
- Efficient conversion to sf objects HOT 4
- Add functions for data type conversions HOT 1
- as_raster() doesn't work for single cell quadtrees HOT 1
- errors with raster-dev HOT 4
- quadtree from multi-band grid
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quadtree.