Giter VIP home page Giter VIP logo

Comments (7)

grantbrown avatar grantbrown commented on July 20, 2024

Hmm, it should be, but there is a typo. It should read:

for p in f:
    print 'X,Y,Z: ', p.X, p.Y, p.Z

Point instances store the raw X, Y, and Z values. If you want the scaled values, it's simpler (and faster) to grab them directly from the file:

x_scaled = f.x
y_scaled = f.y
z_scaled = f.z
x_unscaled = f.X
y_unscaled = f.Y
z_unscaled = f.Z

from laspy.

kalbermattenm avatar kalbermattenm commented on July 20, 2024

OK, thanks a lot ! I was not to make it work like that (maybe I am getting a bit tired...)

I differed a bit from that (as p.X was not working for me...) (see https://github.com/kalbermattenm/las_extractor/blob/laspy/las_extractor/util/point_cloud_profiler.py#L110-L112)

from laspy.

grantbrown avatar grantbrown commented on July 20, 2024

I stand corrected, iterating over points returns unparsed Point instances. You could call "make_nice" on each point before accessing their coordinates, but that's going to be pretty slow. Your current approach seems the better one. I'll try to get that section of documentation fixed soon.

from laspy.

kalbermattenm avatar kalbermattenm commented on July 20, 2024

No worries ! It works great like that and we are accessing quite little LAS files, so it is quite fast (but many of them...).

Thanks for all your help !

from laspy.

grantbrown avatar grantbrown commented on July 20, 2024

No problem. If you're accessing lots of files, you may want to watch out for memory leaks as described in this thread. This is an outstanding bug which I haven't yet been able to track down satisfactorily.

from laspy.

kalbermattenm avatar kalbermattenm commented on July 20, 2024

OK... I did not really test my modifications in a production environment, but I will do... (I do not want to kill our prod servers...). Thanks for the advice !

from laspy.

hobu avatar hobu commented on July 20, 2024

Please reopen if this is still an issue going forward

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.