Coder Social home page Coder Social logo

lasindex.jl's Introduction

Build Status Build status codecov

LASindex.jl

Pure Julia reader of lasindex .lax files. Translates the .lax file to a quadtree from the RegionTrees package and provides a bounding box intersect method to retrieve a vector of ranges.

julia> using LASindex
julia> using FileIO

julia> laxfile = joinpath("sample", "Palm Beach Post Hurricane.lax");
julia> qt = load(laxfile)
INFO: Processed Palm Beach Post Hurricane.lax with 1924631 points.
Cell: RegionTrees.HyperRectangle{2,Float64}([955000.0, 885000.0], [32000.0, 32000.0])

julia> using StaticArrays
julia> bbox = SVector(955000.0, 985002.0, 885000.0, 988800.0);
julia> r = LASindex.intersect(qt, bbox)
1-element Array{UnitRange{Integer},1}:
 1:1924631

The resulting ranges can be used in combination with LasIO or LazIO to stream a small subset of a (larger than memory) dataset.

using LasIO
header, points = load("Palm Beach Post Hurricane.las", mmap=true)

intersected_points = points[LASindex.intersect(qt, bbox)]

Note that all points inside the bounding box are given, but not all points given are inside the bounding box. In other words, because of how lasindex groups ranges together, some ranges will include points outside the bounding box.

Background

LAX files are quadtree indexes used by the LASTools suite [1] if present. You can generate them with lasindex -i *.laz[2]. There's a good introduction to lasindex here [3].

Future

I'd rather use Cxx to call the lasindex c++ code directly, but at the moment the Cxx package is harder to install on Windows than compiling the lastools shared library itself.

An example how to interface with lastools directly is provided in example/cxx.jl

lasindex.jl's People

Contributors

evetion avatar visr avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

visr juliatagbot

lasindex.jl's Issues

Info about upcoming removal of packages in the General registry

As described in https://discourse.julialang.org/t/ann-plans-for-removing-packages-that-do-not-yet-support-1-0-from-the-general-registry/ we are planning on removing packages that do not support 1.0 from the General registry. This package has been detected to not support 1.0 and is thus slated to be removed. The removal of packages from the registry will happen approximately a month after this issue is open.

To transition to the new Pkg system using Project.toml, see https://github.com/JuliaRegistries/Registrator.jl#transitioning-from-require-to-projecttoml.
To then tag a new version of the package, see https://github.com/JuliaRegistries/Registrator.jl#via-the-github-app.

If you believe this package has erroneously been detected as not supporting 1.0 or have any other questions, don't hesitate to discuss it here or in the thread linked at the top of this post.

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.