Giter VIP home page Giter VIP logo

Comments (4)

dfriend21 avatar dfriend21 commented on July 22, 2024 1

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.

brownag avatar brownag commented on July 22, 2024

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 existing habitat 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 current data(habitat) calls.

from quadtree.

brownag avatar brownag commented on July 22, 2024

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.

dfriend21 avatar dfriend21 commented on July 22, 2024

Completed with PR #19.

from quadtree.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.