Applied-GeoSolutions / lidar2dems

Utilities using PDAL and PCL to create DTMs, DSMs, and CHMs from lidar data
89 stars 36 forks source link

Test failed #39

Open LorenzoBottaccioli opened 6 years ago

LorenzoBottaccioli commented 6 years ago

Hi I have followed the instruction in http://applied-geosolutions.github.io/lidar2dems/doc/installation.html when I type nosetests test -v I get:

Failure: ImportError (cannot import name CookieCutter) ... ERROR
Failure: ImportError (cannot import name CookieCutter) ... ERROR

======================================================================
ERROR: Failure: ImportError (cannot import name CookieCutter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/nose/loader.py", line 418, in loadTestsFromName
    addr.filename, addr.module)
  File "/usr/local/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/local/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/home/lorenzo/tools/lidar2dems/test/pdal_test.py", line 38, in <module>
    from l2d.utils import find_lasfiles, get_classification_filename, find_classified_lasfile, \
  File "/home/lorenzo/tools/lidar2dems/l2d/utils.py", line 39, in <module>
    from gippy.algorithms import CookieCutter
ImportError: cannot import name CookieCutter

======================================================================
ERROR: Failure: ImportError (cannot import name CookieCutter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/nose/loader.py", line 418, in loadTestsFromName
    addr.filename, addr.module)
  File "/usr/local/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/local/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/home/lorenzo/tools/lidar2dems/test/utils_test.py", line 34, in <module>
    from l2d.utils import get_classification_filename, find_lasfiles
  File "/home/lorenzo/tools/lidar2dems/l2d/utils.py", line 39, in <module>
    from gippy.algorithms import CookieCutter
ImportError: cannot import name CookieCutter

----------------------------------------------------------------------
Ran 2 tests in 0.060s

FAILED (errors=2)

How to solve this?

ircwaves commented 6 years ago

Hi Lorenzo!

Can you check that the output of

pip freeze 2>/dev/null | grep -i gippy

is gippy==0.3.9?

If you followed the instruction:

pip install https://github.com/Applied-GeoSolutions/gippy/archive/v0.3.9.tar.gz

then anything else would be strange.

LorenzoBottaccioli commented 6 years ago

Ok it have solved that now I get

Test classification ... PDAL: kernels.ground: Unexpected argument 'cellSize'.

ERROR
Test creating density ... ERROR
Create DTM ... ERROR
Create DSM ... ERROR
Create CHM ... runtime error
ERROR
Test getting classification filename ... ok
Test finding las files ... ok

======================================================================
ERROR: Test classification
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lorenzo/tools/lidar2dems/test/pdal_test.py", line 68, in test0_classify
    classify(fnames, fout, site=f, slope=slope, cellsize=cellsize)
  File "/home/lorenzo/tools/lidar2dems/l2d/pdal.py", line 309, in classify
    os.remove(ftmp)
OSError: [Errno 2] No such file or directory: '/home/lorenzo/tools/lidar2dems/test/las/a2973f69-5568-461b-8d24-40071498b371.las'
-------------------- >> begin captured stdout << ---------------------
Classifying 4 files into test/testdir/features-0_l2d_s1c3.las
Created merged file test/las/a2973f69-5568-461b-8d24-40071498b371.las in 0:00:00.027843
pdal ground -i /home/lorenzo/tools/lidar2dems/test/las/a2973f69-5568-461b-8d24-40071498b371.las -o /home/lorenzo/tools/lidar2dems/test/testdir/features-0_l2d_s1c3.las --slope 1 --cellSize 3 --maxWindowSize 10 --maxDistance 1 --classify

--------------------- >> end captured stdout << ----------------------
-------------------- >> begin captured logging << --------------------
shapely.geos: DEBUG: Found GEOS DLL: <CDLL '/usr/local/lib/python2.7/dist-packages/shapely/.libs/libgeos_c-09576097.so.1.9.0', handle 1d06b50 at 7f4288898690>, using it.
shapely.geos: DEBUG: Trying `CDLL(libc.so.6)`
shapely.geos: DEBUG: Library path: 'libc.so.6'
shapely.geos: DEBUG: DLL: <CDLL 'libc.so.6', handle 7f42abb264e8 at 7f42aba9ead0>
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: Test creating density
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lorenzo/tools/lidar2dems/test/pdal_test.py", line 77, in test1_create_density
    fout = create_dems(lasfiles, 'density', site=f, outdir=self.testdir)
  File "/home/lorenzo/tools/lidar2dems/l2d/pdal.py", line 322, in create_dems
    radius=rad, site=site, outdir=outdir, suffix=suffix, overwrite=overwrite, **kwargs))
  File "/home/lorenzo/tools/lidar2dems/l2d/pdal.py", line 393, in create_dem
    raise Exception("Error creating dems: %s" % ' '.join(fouts))
Exception: Error creating dems: den
-------------------- >> begin captured stdout << ---------------------
Creating test/testdir/features-0_density_r0.56 [den] from 3 files

--------------------- >> end captured stdout << ----------------------

======================================================================
ERROR: Create DTM
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lorenzo/tools/lidar2dems/test/pdal_test.py", line 90, in test2_create_dtm
    lasfiles = find_classified_lasfile(self.testdir, site=f, params=class_params(f))
  File "/home/lorenzo/tools/lidar2dems/l2d/utils.py", line 118, in find_classified_lasfile
    raise Exception("No classified LAS files found")
Exception: No classified LAS files found

======================================================================
ERROR: Create DSM
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lorenzo/tools/lidar2dems/test/pdal_test.py", line 107, in test3_create_dsm
    lasfiles = find_classified_lasfile(self.testdir, site=f, params=class_params(f))
  File "/home/lorenzo/tools/lidar2dems/l2d/utils.py", line 118, in find_classified_lasfile
    raise Exception("No classified LAS files found")
Exception: No classified LAS files found

======================================================================
ERROR: Create CHM
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lorenzo/tools/lidar2dems/test/pdal_test.py", line 126, in test4_create_chm
    fout = create_chm(fdtm, fdsm, prefix + 'chm.tif')
  File "/home/lorenzo/tools/lidar2dems/l2d/utils.py", line 127, in create_chm
    dtm_img = gippy.GeoImage(dtm)
  File "/usr/local/lib/python2.7/dist-packages/gippy/gippy.py", line 3951, in __init__
    this = _gippy.new_GeoImage(*args)
RuntimeError: 4: `/home/lorenzo/tools/lidar2dems/test/testdir/features-0_dtm.idw.tif' does not exist in the file system,
and is not recognised as a supported dataset name.

----------------------------------------------------------------------
Ran 7 tests in 0.305s

FAILED (errors=5)
ircwaves commented 6 years ago

What version of PDAL are you running?

pdal-config --version

lidar2dems installation requires 1.0.1.

LorenzoBottaccioli commented 6 years ago

Fixed! Tnx