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
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.
1 Like
You can use pyqgis, yes, or qgis console, which is a more recent command line-only interface to QGIS (3.10+, I believe)
2 Likes
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.
1 Like
Yup. Depending on your distro, there is likely a package.
1 Like
Good morning , it has been a long time i did not implement the discussion in this thread , but finally this is what i will be doing please let me the step are correct or not .
- Take dtm from odm results and use gdal to convert it into contour shape file - (give elevation value in the command)
- Use gdal to convert contour shape file to autocad dxf report .
please suggest if this is the right approach . my end goal is to get a dxf 3d contour and visualize in autocad
something like this in 3d
Thank you
1 Like
so i am able to do the first step which is converting the output of odm which is dtm.tiff into contour.shp
1)my first question is is there any diff in output if we convert a dsm into contour.shp vs dtm into contour.shp
- ogr2ogr -f âDXFâ /home/ubuntu/contours.dxf /home/ubuntu/datasets/project/odm_dem/contours.shp -zfield ELEVATION â i am using this command to convert shp file to dxf but i get this error
FAILURE:
Unable to open datasource /home/ubuntu/datasets/project/odm_dem/contours.shp' with the following drivers. ->
PCIDSKâ
-> netCDF' ->
JP2OpenJPEGâ
-> PDF' ->
ESRI Shapefileâ
-> MapInfo File' ->
UK .NTFâ
-> OGR_SDTS' ->
S57â
-> DGN' ->
OGR_VRTâ
-> REC' ->
Memoryâ
-> BNA' ->
CSVâ
-> NAS' ->
GMLâ
-> GPX' ->
LIBKMLâ
-> KML' ->
GeoJSONâ
-> Interlis 1' ->
Interlis 2â
-> OGR_GMT' ->
GPKGâ
-> SQLite' ->
OGR_DODSâ
-> ODBC' ->
WAsPâ
-> PGeo' ->
MSSQLSpatialâ
-> OGR_OGDI' ->
PostgreSQLâ
-> MySQL' ->
OpenFileGDBâ
-> XPlane' ->
DXFâ
-> CAD' ->
Geoconceptâ
-> GeoRSS' ->
GPSTrackMakerâ
-> VFK' ->
PGDUMPâ
-> OSM' ->
GPSBabelâ
-> SUA' ->
OpenAirâ
-> OGR_PDS' ->
WFSâ
-> SOSI' ->
HTFâ
-> AeronavFAA' ->
Geomediaâ
-> EDIGEO' ->
GFTâ
-> SVG' ->
CouchDBâ
-> Cloudant' ->
Idrisiâ
-> ARCGEN' ->
SEGUKOOAâ
-> SEGY' ->
XLSâ
-> ODS' ->
XLSXâ
-> ElasticSearch' ->
Walkâ
-> Carto' ->
AmigoCloudâ
-> SXF' ->
Selafinâ
-> JML' ->
PLSCENESâ
-> CSW' ->
VDVâ
-> GMLAS' ->
TIGERâ
-> AVCBin' ->
AVCE00â
-> `HTTPâ
can anyone help me at this step please. thank you
1 Like
so i am able to run the following command now but it gives me this error
sudo ogr2ogr -f âdxfâ /home/ubuntu/contours.dxf contour.shp -zfield ELEV
ERROR 1: DXF layer does not support arbitrary field creation, field âIDâ not created.
ERROR 1: DXF layer does not support arbitrary field creation, field âELEVâ not created.
what is the error over here ???
1 Like
okay ,though it gives an error i can see the final dxf output . so it works
1 Like