jblindsay / whitebox-tools

An advanced geospatial data analysis platform
https://www.whiteboxgeo.com/
MIT License
964 stars 160 forks source link

Contours_from_raster failing to render contours #282

Open dankovacek opened 2 years ago

dankovacek commented 2 years ago

Hi All, I'm trying to troubleshoot an error with the contours_from_raster function (WBT 2.1.0, python 3.8.10).

I'm trying to generate contours (at any interval) on a small sample DEM (attached) after running the fill_depressions function.

wbt.contours_from_raster(
    'test_dem_filled.tif', 
    'test_output.shp',
    interval=10,
    # base=0.0, 
    # smooth=3, 
    # tolerance=5.0, 
)

The function fails with the following error:

thread 'main' has overflowed its stack
fatal runtime error: stack overflow

It seems to fail in the "finding edges" portion of the code, but I'm having a hard time figuring out anything beyond that. Any advice on diagnosing the issue would be much appreciated!

test_dem_filled.zip

CarlosGrohmann commented 2 months ago

Just to add to this issue, I've been trying to extract contours without success as well (using whitebox-workflows). I tried with LatLong and projected DEMs, and it always crashes with a segmentation fault