Comments (5)
@GeospatialPython Thanks for reporting the issue! I just tested the LidarElevationSlice tool using a sample LiDAR dataset (St. Elis Mountains and Gulf of Alaska) and I can confirm that the tool seems to export the entire file, not a slice. I am copying Dr. John Lindsay (@jblindsay) on this issue to see if he can look into the source code and fix the issue. Thanks!
from whitebox-python.
I've set the tool up so that if you set the --inclassval
or --outclassval
, the tool works in classify mode rather than filter mode, i.e. it assigns the specified class values to points inside and outside the slice. The problem is that I've given default values to these parameters and so, in the Python WhiteboxTools interface, even if you don't mess with these parameters, the tool will classify the points.
For now, I'd suggest setting these parameters to None; the tool should work as expected when this is done. That is,
import whitebox
wbt = whitebox.WhiteboxTools()
wbt.set_working_dir(os.getcwd())
wbt.lidar_elevation_slice("test1.las", "test2.las", minz=3.0, maxz=5.0, cls=False, inclassval=None, outclassval=None)
I've just committed a change to the tool such that the only way that it runs in classify mode is when the --class
parameter is set to True. This fix is available in the repository now and will be in v0.14.
from whitebox-python.
Thank you for the info. I'll try the repository version. I could see in the output that it was populating the class values with defaults so I instinctively tried the None approach. I just tried it again. The None values are still passed as strings to the binary so you get the following error:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseIntError { kind: InvalidDigit }', libcore/result.rs:1009:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
0
I've set the tool up so that if you set the
--inclassval
or--outclassval
, the tool works in classify mode rather than filter mode, i.e. it assigns the specified class values to points inside and outside the slice. The problem is that I've given default values to these parameters and so, in the Python WhiteboxTools interface, even if you don't mess with these parameters, the tool will classify the points.For now, I'd suggest setting these parameters to None; the tool should work as expected when this is done. That is,
import whitebox wbt = whitebox.WhiteboxTools() wbt.set_working_dir(os.getcwd()) wbt.lidar_elevation_slice("test1.las", "test2.las", minz=3.0, maxz=5.0, cls=False, inclassval=None, outclassval=None)I've just committed a change to the tool such that the only way that it runs in classify mode is when the
--class
parameter is set to True. This fix is available in the repository now and will be in v0.14.
from whitebox-python.
@GeospatialPython The latest WhiteboxTools v0.14.0 has fixed the issue. Could you try again and let us know if you still have issues with the tool?
Make sure you upgrade to whitebox v0.7.0: pip install -U whitebox
import whitebox
wbt = whitebox.WhiteboxTools()
wbt.set_working_dir(os.getcwd())
wbt.lidar_elevation_slice("test1.las", "test2.las", minz=3.0, maxz=5.0, cls=False)
from whitebox-python.
I believe this issue has been resolved in the latest version. Therefore, I am closing the issue. Please reopen the issue if you still encounter issues.
from whitebox-python.
Related Issues (20)
- Whitebox resetting working directory to whitebox directory in Anaconda environment HOT 4
- whitebox clip function corrupting output file HOT 2
- Whiteboxtools in AWS Sagemaker HOT 4
- Documentation for raster_calculator tool HOT 1
- Missing GLIBC library error with Python module HOT 8
- Running ConditionalEvaluation requires manual Whitebox library folder permissions change HOT 2
- ResourceWarnings for unclosed HOT 1
- LidarIdwInterpolation does not save CRS to output
- LidarIdwInterpolation does not save CRS to output HOT 1
- Using previous versions of WhiteboxTools HOT 8
- a bug in func (raster_to_vector_lines) HOT 3
- Raster shift in LidarPointStats? HOT 1
- Discontinuous streams HOT 5
- Negative flow path length HOT 1
- failed to use the mosaic function HOT 1
- Download_wbt.py Error HOT 10
- AttributeError: module 'whitebox' has no attribute... HOT 2
- Whitebox python lib method lidar_digital_surface_model getting stuck at filtering HOT 2
- Installing whitebox tools gets the dev version - FlightlineOverlap fails HOT 1
- wbe.contours_from_raster doesn't work HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from whitebox-python.