Giter Site home page Giter Site logo

Reconstruction files about palaeoverse HOT 4 CLOSED

LewisAJones avatar LewisAJones commented on May 21, 2024
Reconstruction files

from palaeoverse.

Comments (4)

LewisAJones avatar LewisAJones commented on May 21, 2024

I have produced reconstruction files at ~100 km x 100 km for all models. However, when testing the function with the new files, I realised there is a dramatic loss in efficiency. Previously it took around 6 seconds to rotate 5270 occurrence points (tetrapod dataset), but with the new files it takes over 1 minute. This is because distance now needs to be calculated between occurrence points and the reconstruction file coordinates. Previously, closest values in longitude and latitude could just be matched because numerically they were spaced evenly (even if the spatial grid itself is not even). Given this, I think it is best to still use the 1 x 1 degree grids. The only issue here is that higher latitudinal points will be rotated with greater spatial resolution than lower latitudinal points. Any thoughts @KEichenseer or @Buffan3369?

from palaeoverse.

willgearty avatar willgearty commented on May 21, 2024

Instead of calculating the pairwise distance (O(n^2ish)?), could you have the decimal lat/long range for each grid cell, then use cut on the lat/lng of the points (O(2n)?), then merge/match the points to the grid cells based on those cut values (not sure on the O here)?

from palaeoverse.

LewisAJones avatar LewisAJones commented on May 21, 2024

The problem here is that cells are not rectangular, they are hexagonal. So I don't think that is a viable solution if I am understanding your proposal correctly. In order to use the hexagonal equal-area grids, the solution would be to bring in the actual shapefile and bin spatially to identify the cells. The sf package would allow us to do this. I can explore this option. Considering we are already using the sf and h3jsr package in other functions, this won't be an issue with additional dependencies.

from palaeoverse.

willgearty avatar willgearty commented on May 21, 2024

Ah, yep, I thought they were rectangles, my proposal would not work for hexagons. But yeah, there should be a much easier way to do it using sf. Let me know if you need help, I just rewrote a bunch of my own code from sp functions to sf functions.

from palaeoverse.

Related Issues (20)

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.