Extract/create contour map/dxf using ODM

Hi ,
I ran odm using the docker in the repo and it created a bunch of output as given in the GitHub .
However I want to create a contour dxf file and PDF(of the same ) which I am not able to see in the outputs .

Can anyone please help me to know if there is a perimeter I have to pass while running the docker ?

Or how can I create it ?

Thank you . Appreciate your help

For the DXF you could use GRASS + this script (https://github.com/OpenDroneMap/WebODM/blob/master/plugins/contours/calc_contours.py) which you can execute directly in GRASS and is the same that WebODM uses to generate contours.

1 Like

Do I have to run it separately like you said ? Or it comes in docker .any way to plug it in docker ?

It comes separately, but you could include it in Docker by modifying ODM’s Dockerfile.

Thanks. . can anyone help me in installing GRASS for Ubuntu 16.04 ?
I did sudo apt install grass but when I import it in python it doesn’t work

Thank ,this community is really helpful

1 Like

An alternative approach may be to install QGIS, use the extract contours tool on the digital terrain or digital surface model raster. This will create the contour dataset, that can then be exported as DXF.

1 Like

What I understood after doing my research is GRASS has its own gui and in that you are suggesting to run contour.py (this is what I can relate)

Is there any way I can use grass with just an import in python (just like we do for other packages in python)

But what I want is to build a pipeline using docker which gives me Ortho and dxf file .

Also what would be the input to contours.py ,will it be DEM or something else

Thanks

You can use GRASS as a scripting engine, without GUI. See https://grasswiki.osgeo.org/wiki/GRASS_and_Shell#Automated_batch_jobs:_Setting_the_GRASS_environmental_variables and https://github.com/OpenDroneMap/WebODM/blob/master/app/plugins/grass_engine.py#L104 for examples.

2 Likes

i tried the same using arcscene . the input was dsm and i used extract contour tool , it created a tiff file like this but i want something in 3d to be used with autocad .
1)can i do the same in arcscene using extract contours but in 3d ?
2)can the qgis be used with python ,so essentially i just have to use a python code that takes dsm as a input and gives me a contour dxf drawing .?

Use the link I posted above for QGIS and set Produce 3D vector and it will load as 3D vectors in autocad.

2 Likes

can the qgis be used with python ,so essentially i just have to use a python code that takes dsm as a input and gives me a contour dxf drawing .?

i want to automate it

There is a QGIS python API and a console if you want it to be easy to test out ideas: https://docs.qgis.org/2.18/en/docs/user_manual/plugins/python_console.html

Although looking at that link, you might want to search for the latest.

You can use pyqgis, yes, or qgis console, which is a more recent command line-only interface to QGIS (3.10+, I believe)

1 Like

does pyqgis comes in linux/ubuntu ?

also is there a way to use gdal for the same ?

It is built in to QGIS packages. Not sure what package version your distro has.

Most likely. Try looking at the documentation for GDAL.

Yup. Depending on your distro, there is likely a package.

1 Like