Giter VIP home page Giter VIP logo

Comments (4)

kbevers avatar kbevers commented on July 20, 2024

I don't think so. You are welcome to submit a PR with this feature!

from laspy.

tmontaigu avatar tmontaigu commented on July 20, 2024

I'll try something, but from my understanding of the code, the filename gets propagated from
laspy.file.File -> laspy.base.FileManager -> laspy.base.DataProvider.
DataProvider being the actual object that opens the file.

So if I modify the DataProvider class to instead use a reference to a file/a buffer , I'll then need to make lots of modifications to 'progate' this change.

Or maybe we could add a new mode for reading bytes input ( 'b') and handle this case using if statements.
It seems that someone already tried this idea:
davidcaron@dd5d09b

Would there be another way to make it work ?

from laspy.

davidcaron avatar davidcaron commented on July 20, 2024

@tmontaigu

It was a quick hack I made. I was using FME, a software from Safe. It could provide me with the content of the las file in memory and I wanted to avoid writing it to disk.

It works, however I can't say I'm happy with the "bytes" parameter and the way it's passed on the way down. It could be cleaner/simpler.

from laspy.

tmontaigu avatar tmontaigu commented on July 20, 2024

@davidcaron

I had to use the same 'trick' to get something working easily.
I got a branch with this modifications that allows me to read from streams/buffers and get back the
bytes to re-upload/write.

And I agree that it's not clean, however I don't really like the software engeenering of the code.
It makes it harder to have a clean solution. So I ended-up starting something from scratch to see how it could go

from laspy.

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.