NicoRio42 / cassini

A software that generates highly accurate topographic maps from LiDAR and Shapefile data.
https://cassini-map.com
GNU General Public License v3.0
6 stars 1 forks source link

How to troubleshoot RT error Windows #2

Open jenskastensson opened 2 months ago

jenskastensson commented 2 months ago

Hello, thank you very much for this development, I'm really interested in trying Cassini out! I have downloaded this tile linkto-ign.fr (Caussols, Alpes-Maritimes, France)

When I process the .laz file with Cassini under Windows, I'm getting a RT error, see below. What am I doing wrong here and how to troubleshoot it? (I've opted out for OSM data as it failed)

Best regards Jens

(cassini) PS C:...Documents\Orienteering\Cassini> .\cassini.exe .\caussols\LHD_FXX_1015_6300_PTS_C_LAMB93_IGN69.copc.laz  --skip-vector
Executing PDAL pipeline -> Done in 179.3s
Rendering vegetation -> Done in 1.0s
Generating dem with bufferTraceback (most recent call last):
  File "C:\...\miniconda3\envs\cassini\Lib\site-packages\osgeo_utils\auxiliary\gdal_argparse.py", line 229, in main
    self.doit(**kwargs)
  File "C:\...\miniconda3\envs\cassini\Lib\site-packages\osgeo_utils\gdal_fillnodata.py", line 286, in doit
    return gdal_fillnodata(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\...\miniconda3\envs\cassini\Lib\site-packages\osgeo_utils\auxiliary\util.py", line 62, in enable_exceptions_wrapper
    return fun(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^
  File "C:\...\miniconda3\envs\cassini\Lib\site-packages\osgeo_utils\gdal_fillnodata.py", line 105, in gdal_fillnodata
    dst_ds = drv.Create(
             ^^^^^^^^^^^
  File "C:\...\miniconda3\envs\cassini\Lib\site-packages\osgeo\gdal.py", line 3742, in Create
    return _gdal.Driver_Create(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError

Traceback (most recent call last):
  File "C:\...\miniconda3\envs\cassini\Lib\site-packages\osgeo_utils\auxiliary\gdal_argparse.py", line 229, in main
    self.doit(**kwargs)
  File "C:\...\miniconda3\envs\cassini\Lib\site-packages\osgeo_utils\gdal_fillnodata.py", line 286, in doit
    return gdal_fillnodata(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\...\miniconda3\envs\cassini\Lib\site-packages\osgeo_utils\auxiliary\util.py", line 62, in enable_exceptions_wrapper
    return fun(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^
  File "C:\...\miniconda3\envs\cassini\Lib\site-packages\osgeo_utils\gdal_fillnodata.py", line 105, in gdal_fillnodata
    dst_ds = drv.Create(
             ^^^^^^^^^^^
  File "C:\...\miniconda3\envs\cassini\Lib\site-packages\osgeo\gdal.py", line 3742, in Create
    return _gdal.Driver_Create(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError

 -> Done in 3.0s
Generating countours shapefiles -> Done in 145.8ms
Generating slopes tif image -> Done in 336.5ms
Smoothing contours -> Done in 46.8ms
Culling formlines and rendering contours -> Done in 236.2ms
Rendering cliffs -> Done in 276.9ms
Rendering map to png -> Done in 810.8ms
Tile generated in 185.1s
NicoRio42 commented 1 month ago

Hello Jens

Sorry for the late answer, I have been working on other projects this September and my Github notifications seems broken...

Thank you very much for trying out Cassini! Several people had the same problem when trying to run Cassini on windows. It seems to be related with the Python parts of GDAL, the library used to process raster and vector data. I'll investigate on this, but most likely I'll provide a Dockerized version of Cassini to ensure reliable execution on every platforms.

jenskastensson commented 1 month ago

Thanks @NicoRio42 i did some research and one problem was a missing GDAL drive: It was fixed with conda install -c conda-forge libgdal

After installing GDAL drivers, there was an issue with the gdal_fillnodata function

`(cassini) PS C:\Users\jeka\Documents\Orienteering\Cassini\caussols> C:\Users\jeka\Documents\Orienteering\Cassini\cassini\target\debug\cassini.exe C:\Users\jeka\Documents\Orienteering\Cassini\caussols\LHD_FXX_0617_6154_PTS_C_LAMB93_IGN69.copc.laz --skip-vector Executing PDAL pipeline -> Done in 65.7s Rendering vegetation -> Done in 13.3s Generating dem with bufferGDAL: GDALOpen(out\tile\dem-with-buffer.tif, this=000002709D1BF510) succeeds as GTiff. GDAL: QuietDelete(out\tile\dem-with-buffer.tif) invoking Delete() GDAL: GDALOpen(out\tile\dem-with-buffer.tif, this=000002709AAF3650) succeeds as GTiff. GDAL: GDALDefaultOverviews::OverviewScan() GDAL: GDALClose(out\tile\dem-with-buffer.tif, this=000002709AAF3650) GDAL: GDALDriver::Create(GTiff,out\tile\dem-with-buffer.tif,1400,1400,1,Float64,0000000000000000) GDAL: GDALClose(out\tile\dem-with-buffer.tif, this=000002709CBDDFC0) Traceback (most recent call last): File "C:\Users\jeka\miniconda3\envs\cassini\Lib\site-packages\osgeo_utils\auxiliary\gdal_argparse.py", line 229, in main self.doit(kwargs) File "C:\Users\jeka\miniconda3\envs\cassini\Lib\site-packages\osgeo_utils\gdal_fillnodata.py", line 286, in doit return gdal_fillnodata(kwargs)``

NicoRio42 commented 1 month ago

Interesting, thanks for the details.

NicoRio42 commented 1 month ago

Hello @jenskastensson

Could you try to run the following command inside your conda environment? pip install GDAL==<GDAL_VERSION> You'll have to replace with the gdal version installed on your environment, which you can get by running: gdalinfo --version

This will install the GDAL python bindings, which some GDAL commands (including gdal_fillnodata) might need to properly work.

Thanks!

jenskastensson commented 1 month ago

It looks like it is already installed:

(base) PS C:\Users\jeka> conda activate cassini
(cassini) PS C:\Users\jeka> gdalinfo --version
GDAL 3.9.2, released 2024/08/13
(cassini) PS C:\Users\jeka> pip install GDAL==3.9.2
Requirement already satisfied: GDAL==3.9.2 in c:\users\jeka\miniconda3\envs\cassini\lib\site-packages (3.9.2)
NicoRio42 commented 1 month ago

Indeed...

In the meantime, until I fix Cassini on Windows, I just set up a Docker image that you can use to execute Cassini on Windows. Here is the documentation, let me know if you encounter any problems.

jenskastensson commented 1 month ago

Caussols! image