Problems with Elevation Map and Contours plugins on latest native build on 16.04

Just want to report the issues.
Compile and build latest WebODM and ODM and I got following errors:
Data set is Brighton beach. Processing is finished fine without errors

Contours plugin fail with error no mater what settings I am putting :

“Invalid GeoJSON object.”

Elevation Map plugin fail with error:

Could not execute GRASS script /webodm/plugins/elevationmap/elevationmap.py from /webodm/app/media/tmp/tmpzhs0yn_6_grass_engine: Starting GRASS GIS… Creating new GRASS GIS location … Executing <python /webodm/plugins/elevationmap/elevationmap.py interval=1 epsg=4326 noise_filter_size=3.0 format=GeoJSON dsm=/webodm/app/media/project/1/task/d8315a8f-2e33-4231-b05b-289f5dfec884/assets/odm_dem/dsm.tif> … Traceback (most recent call last): File “/webodm/plugins/elevationmap/elevationmap.py”, line 235, in sys.exit(main()) File “/webodm/plugins/elevationmap/elevationmap.py”, line 76, in main kernel = get_kernel(float(opts[‘noise_filter_size’]), dsm) File “/webodm/plugins/elevationmap/elevationmap.py”, line 137, in get_kernel return cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (round(noise_filter_size / dsm.res[0]), round(noise_filter_size / dsm.res[1]))) TypeError: integer argument expected, got float Execution of <python /webodm/plugins/elevationmap/elevationmap.py interval=1 epsg=4326 noise_filter_size=3.0 format=GeoJSON dsm=/webodm/app/media/project/1/task/d8315a8f-2e33-4231-b05b-289f5dfec884/assets/odm_dem/dsm.tif> finished. Cleaning up temporary files…

… but when i set Noise filter to (Do not filter noise 0 meter) it works fine.
or
when change in elevationmap.py

line 137

cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (round(noise_filter_size / dsm.res[0]), round(noise_filter_size / dsm.res[1])))

to

cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (int(round(noise_filter_size / dsm.res[0])), int(round(noise_filter_size / dsm.res[1]))))

works fine with Noise filter param

2 Likes

Mm, could be a bug. Would you be interested in opening a pull request?

1 Like

Will do for elevation , but for contours don’t know what has to be done.

1 Like

@rumenchooo @pierotofy has there been any update on this, I am getting the exact same errors and want to know if there is a fix for it.

I haven’t had the time to troubleshoot this :frowning:

@pierotofy when a solution is found and its fixed could you let me know. Thanks for all your hard work. Love using ODM.

1 Like

Hey everyone!

Just as an FYI, I just proposed rumenchooo’s changes to the elevation map plugin.

https://github.com/OpenDroneMap/WebODM/pull/861

4 Likes

@pierotofy I wanted to check in on the contours to see if the issue has been fixed?

Thanks

I have the same issue, I’m getting the following error:

    ERROR Could not execute GRASS script /webodm/plugins/contours/calc_contours.py from /webodm/app/media/tmp/tmpptpipu27_grass_engine: Starting GRASS GIS...
Creating new GRASS GIS location <location>...
Executing <python /webodm/plugins/contours/calc_contours.py dem_file=/webodm/app/media/project/12/task/d7b470f3-e3d4-404a-863d-8f5f3477844e/assets/odm_dem/dsm.tif simplify=0.2 format=GeoJSON epsg=4326 interval=1.0> ...
Traceback (most recent call last):
  File "/webodm/plugins/contours/calc_contours.py", line 92, in <module>
    sys.exit(main())
  File "/webodm/plugins/contours/calc_contours.py", line 52, in main
    if opts['format'] == "GeoJSON":
KeyError: 'format'
Execution of <python /webodm/plugins/contours/calc_contours.py dem_file=/webodm/app/media/project/12/task/d7b470f3-e3d4-404a-863d-8f5f3477844e/assets/odm_dem/dsm.tif simplify=0.2 format=GeoJSON epsg=4326 interval=1.0> finished.
Cleaning up temporary files...
[2020-07-08 21:27:43,723: ERROR/ForkPoolWorker-1] worker.tasks.execute_grass_script[a786f14a-77dd-4221-8e94-aebe3a79600e]: Could not execute GRASS script /webodm/plugins/contours/calc_contours.py from /webodm/app/media/tmp/tmpptpipu27_grass_engine: Starting GRASS GIS...
Creating new GRASS GIS location <location>...
Executing <python /webodm/plugins/contours/calc_contours.py dem_file=/webodm/app/media/project/12/task/d7b470f3-e3d4-404a-863d-8f5f3477844e/assets/odm_dem/dsm.tif simplify=0.2 format=GeoJSON epsg=4326 interval=1.0> ...
Traceback (most recent call last):
  File "/webodm/plugins/contours/calc_contours.py", line 92, in <module>
    sys.exit(main())
  File "/webodm/plugins/contours/calc_contours.py", line 52, in main
    if opts['format'] == "GeoJSON":
KeyError: 'format'
Execution of <python /webodm/plugins/contours/calc_contours.py dem_file=/webodm/app/media/project/12/task/d7b470f3-e3d4-404a-863d-8f5f3477844e/assets/odm_dem/dsm.tif simplify=0.2 format=GeoJSON epsg=4326 interval=1.0> finished.
Cleaning up temporary files...

Did you manage to make it work?

Triple check that you are running the correct version of GRASS.

[email protected]:/webodm# grass --version
GRASS GIS 7.8.3