Code Monkey home page Code Monkey logo

Comments (5)

juliohm avatar juliohm commented on May 27, 2024

What we can do here is generalize the slice operation and make it work with any spatial data:

  1. We can define the slice(d, xrange, yrange, ...) as the filter of d with a new GeometryFilter
  2. This GeometryFilter stores a geometry from GeometryBasics.jl (e.g. Rectangle)
  3. For the case of RegularGrid domains, we can add a fast method with Julia's multiple dispatch

For regular grids, given a rectangle representing the slice, we just need to do some basic calculations with origin, spacing and size to find out what is inside the rectangle. It should be fun to implement, please let me know if you would like to tackle this one.

from geostats.jl.

exepulveda avatar exepulveda commented on May 27, 2024

Happy to take this after we finish what is still pending.

from geostats.jl.

juliohm avatar juliohm commented on May 27, 2024

Thanks for offering help @exepulveda , I can take care of this one as well given that I have some free time in the following weeks. Could you please review JuliaEarth/GeoStatsBase.jl#48 which follows a similar pattern. That way you can get used to the source code organization in the project.

from geostats.jl.

juliohm avatar juliohm commented on May 27, 2024

I am almost there with a first implementation of the slice function. The GeometryFilter is in place for general spatial data, and I am now adding a specialization for regular grids + rectangle geometry.

from geostats.jl.

juliohm avatar juliohm commented on May 27, 2024

On a second thought I think we can achieve a better API by introducing a set of geometric operations as opposed to a filter. Here is the draft: JuliaEarth/GeoStatsBase.jl#49 I will signal when it is ready for review 👍

from geostats.jl.

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.