-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Laspy #17
base: master
Are you sure you want to change the base?
Use Laspy #17
Conversation
This is (really) not ready to be merged... |
TODO:
|
There might be a memory issue in laspy, so I will have to make some "intensive" tests on the dev server before bringing this into production. (see https://github.com/grantbrown/laspy/issues/36#issuecomment-162047090) |
recipe = collective.recipe.cmd | ||
on_install = true | ||
on_update = true | ||
cmds = ${buildout:directory}\buildout\bin\pip.exe install ${buildout:directory}\wheels\${vars:liblas} | ||
cmds = ${buildout:directory}\buildout\bin\pip.exe install https://github.com/sitn/laspy/archive/e2a1a3307d4c252f80855c3e80ec373fdfc7265b.zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It won't work here...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you be a bit more explicit ? (stack or whatever...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh... I got it... just get rid of the .exe
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait... I am going to update the branch...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks but you also need to use /
instead of \
;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After that I have the same right issue as the last time:
running install_lib
creating /usr/local/lib/python2.7/dist-packages/laspytest
error: could not create '/usr/local/lib/python2.7/dist-packages/laspytest': Permission denied
----------------------------------------
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-ewBo_0-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-wP6wzv-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-ewBo_0-build
While:
Installing laspy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is not better to use v1.3.0 from pypi?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it is.... But it has been released on Friday (during the night in Europe...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really do not get why during the installation it tries to install/reach something in your Python root folder... We are using a virtual environment, so it should touch these folders....
Branch updated. |
Could you try it by using the pypi package ? To do so:
I would also recommend to empty the content of the buildout folder and run bootstrap again:
|
Thanks, install is fine now.. But yet there is a Python error:
|
Hmmm... I do not have this issue... Have you tried multiple times or only once to extract some data ? We definitively should add some logging in this script. I do not know if I will have some time today... I should also update this PR.... |
Multiple times, on multiple places... |
I can do it, add what I did. |
Wait a bit... I am refactoring the whole thing... |
@rbovard, I added some logging in the code... If you update your code (be aware that there are quite a few modifications...), then you in the
I would be interessted by the "Found xxx points" thing... You should also be aware of this discussion: https://github.com/grantbrown/laspy/issues/36#issuecomment-162047090. There is a memory leak somewhere and I can see that memory utilization is increasing with each request I make... Currently I would not (and cannot) use that on a production server... |
Ok, thanks. Code updated... but no logs in my Apache logs even if I use |
This is strange... Is that working for c2cgeoportal ? (there are plenty I do not really get why this is not working... ? |
I don't know why but yes it's working for I managed to output something:
So there is no points... I can see that you don't check it before copy the coordinates into new variables ;) I'll investigate why there is no data... |
ok... that's better... but it should not open any tile where there are no points touching the profile, thus you should have something in it... Maybe you could also check which tile is opened inside the |
I have my tiles... For example: |
OK... and can you retrieve any coordinates ? Just add some output after that (print
Another test would be to check if this tile really intersects the profile you have drawn (in QGIS for instance...) |
I have some
I throw exceptions with |
Could you print out also these two variables... What I am trying to do is find why there is nothing in the Maybe you could increment it by yourself until you find why... |
There was an issue about my las files (projection mismatch), sorry about all the noise... Now the script returns an other error after a long time, but I don't know if it's related to my configuration or not.
It's quiete long to debug, because I need to wait about 5 minutes to get this error... |
@@ -27,13 +27,10 @@ | |||
'numpy', | |||
'pyyaml', | |||
'pip', | |||
'laspy', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra ,
How big are your LAS files ? Because if they are too big, then it is quite time consuming to loop over the points... Your LAS file are 50m x 50m, which makes quite a lot of them, but which significantly improves the performances... |
The line on which you get an error is trying to get values from this file It looks like your Lidar classification values are not parsed as integers. Could you try to modify https://github.com/kalbermattenm/las_extractor/blob/laspy/las_extractor/util/point_cloud_profiler.py#L52 into |
I have 3'600+ tiles of ~1.4 Mo. What about you? Maybe I should do something to have less heavier tiles? |
At SITN, we have tiles of about 500 Ko in size (but the biggest weight 5Mo) and about 300'000 tiles... Hmmm... I am quite stuck... Could you analyze what takes so much time ? |
Be aware of the memory leak !! |
Just a heads up, I got some work done on the laspy memory leak in this commit at the end of last week. Once we can confirm that the problem is resolved, I'll push a new version to PyPi. |
Thanks @grantbrown a lot for the information (and for having investigated this issue) ! @rbovard, I am going to update the library today ! It would be good if we could check that the whole thing has improved (next year...) |
This PR is an attempt to replace liblas with laspy...
Currently we are using a SITN fork in a collective.recipe.cmd section for buildout (waiting for https://github.com/grantbrown/laspy/issues/35...)
@rbovard, could you test this branch on your side ?
Be aware that you should delete the
[buildout]
section of your local buildout file (the thing where we did something likepart -= liblas
)