Comments (6)
WhiteboxTools has its own custom implementation of a Shapefile encoder/decoder and it follows the published 1998 Shapefile Whitepaper very closely. The various supported Shape Types of a Shapefile are provided on page 4 of the linked document. There is no LineString
Shape Type. I suspect that it would be the same, in terms of how it is being stored, as a PolyLine
. The problem is, there is no numerical value provided for the LineString
alias. It would seem that either shapely or geopandas are implementing their own modified version of a Shapefile. I'm not sure what to do about that. However, I would suggest that if you are able to convert it to a proper PolyLine
, that is likely the easiest solution.
from whitebox-tools.
@lahm3d Is it possible that you can forward me your stream shapefile so that I can take a look at its internal structure? Most importantly, I need to know what numeric value they are placing in the ShapeType part of the file to indicate the LineString
type.
from whitebox-tools.
Thanks @jblindsay. Of course, here is the stream shapfile.
I tried, unsuccessfully, to modify the the stream shapefile's schema using fiona, but that threw the following error:
fiona.errors.UnSupportedGeometryTypeError: 'PolyLine'
I will also try explicitly specifying my output schema and geometry type and see if that fixes the geometry issue. Thanks again!
from whitebox-tools.
Thank you for sending me your file. This was very helpful for diagnosing the issue. I've come to realize that LineString25D (the ShapeType that QGIS provides for your file) is just an alias for PolyLineZ. The actual problem with reading the file was on my part. It turns out that for a PolyLineZ, although there are Z and M parts to each geometry, the M parts are optional. Your file does not use the optional M parts. Admittedly, I've never seen a file do this before; however, the Shapefile Whitepaper makes it clear that this is a valid form of the file format. As such, I've added the ability to leave out the M component of PolyLineZ, PolygonZ, and MultiPointZ Shapefile Geometries and have submitted a fix to the repo. The fix will be available in the next release of the software, which I am hoping to release sometime in the next week. If you cannot wait for this, you may consider compiling from source. I'm closing the issue now but please feel free to re-open if you encounter further problems with this issue. Thank you again for not only reporting the issue but for also providing enough information to diagnose the problem. Much appreciated!
from whitebox-tools.
Belated thanks @jblindsay. I was able to compile and successfully test the clip function. And thank you very much for your continued help and support!
from whitebox-tools.
@lahm3d Glad to hear that it worked for you and thanks again for reporting the issue.
from whitebox-tools.
Related Issues (20)
- CostDistance "thread 'main' panicked at 'called `Option::unwrap()` on a `None` value'" HOT 3
- TimeInDaylight: error HOT 1
- Should the multiscale tools produce multiple outputs? HOT 2
- WhiteboxTools manual needs updating for the Geomorphons tool HOT 1
- Compress raster default value incorrectly labelled? HOT 2
- Error reading LAZ file HOT 1
- Isochrone along direction map of watershed HOT 2
- ListUniqueValuesRaster HOT 3
- Wrong results of DirectDecorrelationStretch
- Bug with IndividualTreeDetection detecting trees very close together HOT 5
- ClipLidarToPolygon is modifying retained point data HOT 1
- Geomorphons - edge effects and difficulties in geographic coordinates
- WhiteboxWorkflows: kernel dies if file not found
- whitebox.Runner() urllib.error.URLError: <urlopen error unknown url type: https> HOT 1
- whitebox_tools 'Unrecognized tool name NormalizeLidar' HOT 16
- Whitebox-Worflows: Erroneous results when using raster files in NAD83 projection HOT 1
- DTM outputs have a shift between tiles HOT 3
- lidar_digital_surface_model extent changed HOT 1
- Feature Requests: lidar_digital_surface_model HOT 2
- FlowAccumulationFullWorkflow gracefully exits without writing all 3 results
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-tools.