Contours Question

Hello… I am currently shopping software options to supplement Civil 3D & the data I collect using my drones. Primarily I develop topo surveys, i.e. point cloud, surface, and then end product is map with contours. I see DD has a contours feature. Is there any way you could unlock this feature so I can see if its something I am willing to buy?

You can create contours while in a Pro plan by exporting the 3D .obj model and loading it up in Rhino. There it takes only a handful of commands to create contours customized to your liking:


Red 5’, Yellow 10’, Green 50’, Blue 100’

For my application this is the detail I need in contour maps. The colors make the 100’+ tall trees pop and, with 1’ resolution, tree growth over time can be monitored.

This is not a survey application where you care about quantitative location information and map projections. For that, using Carlson Precision 3D, as detailed by chascoadmin below, may be a much better choice. But for me, this simple approach worked at zero added cost as I already had Rhino on hand for creating 3D parts for CNC machining.

Regards,
Terry.

2 Likes

Carlson Precision 3D is $1595 and designed to work directly with surveying and engineering software. Forget the contours and work from the point cloud.

I updated the contour picture in my post above. It now includes color coding of the contours for quick evaluation of tree heights with 1’ resolution.

Regards,
Terry.

I was just reading your post on the Rhino forum. Ha!
Thanks for recommending that program. I uploaded my mesh object but I’m a little lost on what to do next. I only ever use Civil 3D so this is a new workflow. Can you point me in the right direction? This is a very rough, early stage topo of a chunk of land, just wanting to see general drainage conditions

Pretty, just in time for Christmas! :santa:

1 Like

@jaycuda,

The steps are:

A. Manually import 3D OBJ file from DroneDeploy with options:

First use File > Properties > Units to select meters.
Next do import:
Import OBJ groups as:
___Dot next to Layers
___Check next to Import OBJ objects
___Check next to Ignore Textures
I really have no idea what I am doing here but this seemed to work well.

After I got the mesh from the .OBJ file, I changed the units from meter to feet and said yes to scale by 3.28. To do this, go to the File tab at the top left and select:
File > Properties > Units and select the units at the top of the popup form.

Now you need to use a Python script to do the following steps:

B. Use Drape command to create surface over the mesh

import rhinoscriptsyntax as rs
from Rhino.Geometry import Point3d
from time import time
startime = time()
rs.EnableRedraw(False) # This speeds up processing by not displaying intermediate results.
P3d = Point3d
rs.CurrentView(‘Top’) # This sets up drawing rectangle that encompasses mesh for drape command.
“”"
For the Drape command you need to make the surface (last argument of command) cover the mesh.
For my 3D model, this was x, y of -232,-161 to 254, 161 for the corners when looking down in the Top viewport.
“”"
rs.Command(‘Drape _AutoSpacing=Yes _Spacing=1 _AutoDetectMaxDepth=Yes {} {} _EnterEnd’.format(P3d(-232, -161, 0), P3d(254, 161, 0)))
“”"
Here I deleted the mesh to simplify the code that follows. You could hide it and rewrite some of the code.
“”"
objs = rs.AllObjects()
for obj in objs:
___ if rs.IsMesh(obj):
______ rs.DeleteObject(obj)
time1 = time()
print 'Time to drape mesh = ', time1 - startime

C. Create the contours using AddSrfContourCrvs
“”"
Get surface for contouring.
“”"
objs = rs.AllObjects()
surf = False; num = 0
for obj in objs:
___ if rs.IsSurface(obj):
______ surf = obj
______ num = +1
if num != 1:
___ print ‘Drape surface not found. Please fix and retry’
___ exit()
“”"
Make sure isocurves are turned off so they do not obscure contours.
“”"
rs.SelectObject(surf)
rs.Command(‘NoEcho -Properties _Object _ShowIsocurves _No _EnterEnd’)
rs.UnselectAllObjects()
“”"
Add contours spaced in feet.
“”"
foot = 1.
five = 5.; ten = 10.; fifty = 50.; hundred = 100.
refElev = -297.85 # Adjust to be at the base of contours. Re-set for your surface.
line = ((0,0,refElev),(0,0,refElev + 220.)) #Contours from refElev to refElev + 220 ‘. Re-set for yours.
“”"
Add contours at 1’ foot intervals.
“”"
objs = rs.AddSrfContourCrvs(surf, line, foot)
rs.EnableRedraw(True) # Turn redraw back on to show contours.
print 'Number of Contours Added = ', len(objs)
time2 = time()
print 'Time to generate contours = ', time2 - time1

D. Color contours to show 5, 10, 50, 100 foot increments
“”"
Color 5, 10, 50 and 100 foot intervals in red, yellow, green and blue.
“”"
rs.EnableRedraw(False) # Turn redraw back off while coloring contours.
for obj in objs:
___ z = rs.CurvePoints(obj)[0].Z - refElev + 0.001 # Get z of contour relative to refElev.
___ if abs(divmod(z,hundred)[1]) < 0.1: # Then this is a 100’ contour.
______ color = [0,0,255] # Blue
___ elif abs(divmod(z,fifty)[1]) < 0.1: # Then this is a 50’ contour.
______ color = [0,255,0] # Green
___ elif abs(divmod(z,ten)[1])< 0.1: # Then this is a 10’ contour.
______ color = [255,255,0] # Yellow
___ elif abs(divmod(z,five)[1]) < 0.1: # Then this is a 5’ contour.
______ color = [225,0,0] # Red
___ elif abs(divmod(z,five)[1] - 4.) < 0.1: # Then this is a 1’ contour just below a 5’ increment.
______ color = [50,50,50] # Makes contour 1’ below 5’ contours darker. Easier to see direction.
___ else:
______ color = [100,100,100] # Color the 1’ contours grey.
___ rs.ObjectColor(obj, color)
rs.EnableRedraw(True) # Turn redraw back on.
print 'Time to color contours = ', time()-time2

That’s it. The result is:


Grey or black 1’ steps, red 5’, yellow 10’, green 50’, blue 100’
The black contours on 1’ steps just below a 5’ increment are intended to show the down hill direction. This helps in areas where the contours are slowly changing. I am still playing with this. The black contours did not show up very well in this screen capture.

I keep the Python editor open, fix up the script, push Ctrl+s to save edits and then F5 to see result. This makes it fast to iterate out the bugs or make enhancements. To bring the Python editor up, type EditPythonScript in the Command window of Rhino. I put this command on a button I added to the Standard Toolbar:


It is at the very right with my best shot of a Python drawing. If I right-click on the Standard Toolbar in a blank area to the right and select Edit Button and then scroll down to select this button, the Button Editor shows:

To add this button to the Standard Toolbar for the first time, right-click on the Standard Toolbar and select New Button and fill in the values from the form above.

I had to use ___ above to show spaces since extra spaces are squished away in a post. Replace these with real spaces in Python. Other that that, you should be able so swipe the code and drop it into the Python editor without changes. The comments should be legal for both the standalone blocks and on the same line.

Regards,
Terry.

1 Like

Feel free to contact me directly at michael at chasco.com to discuss your use-case.

@chascoadmin,

Thanks for reaching out.

My use case is simply research into methods for monitoring forest health. I am exploring how drones can facilitate the characterization of forests in terms of:

  1. Evergreen vs deciduous composition vs terrain vs time
  2. Growth rate of evergreens vs deciduous
  3. Identification of evergreen and deciduous species
  4. Calculation of dead growth percentage
  5. Evergreen and deciduous density
  6. Time of deciduous leaf loss/gain in fall/spring versus terrain and altitude
    One goal is to develop a guide for selective thinning in order to improve forest health or shift tree population to more productive species.

I reviewed your website and can see you have had fun building many types of buildings and roads. Are drones helping you in these endeavors?

Regards,
Terry.

That is an amazing use-case! I have a friend in a men’s group that I attend that just purchased a drone in hopes to help them with their business of treating Oak tree wilt. They have been simply taking isometric pictures for record so I have been trying to help them learn about DroneDeploy and how they could use it as a business tool. I hope to fly one of there sites for them in the next couple of weeks and give them access to the map. I think they will be blown away.
As for our use-case, we are a commercial general contractor and construction manager that I think is a little different than most because of how much work we perform in-house. We have our own excavation, concrete and utility crews as well as over 200 pieces of heavy equipment, I have visited with many contractors about drone use and most of them have been larger firms than ours that are using them primarily for documentation and inspection whereas I am trying to do not only that, but materials logistics. Not simply just quantifying stockpiles (which is easy), but logging the amounts of each type of material on each jobsite in a database that can be queried so that the jobsites might share materials across the landscape. Our project managers also use the orthomosaic with CAD overlay to provide site logistics maps to our superintendents and as a deliverable when turning in their pay applications to the developers. It has been an amazing ride and our bird is just a Phantom 3 Pro, but I think it only works so well because of the technical infrastructure we have to handle this type of data. I hope to at least get a 4 Pro by the end of the year, but really would like to work with DroneDeploy on what unit I could build that has RTK capability that works with the service. Happy Thanksgiving to All!

There are some really cool projects on this thread. One simple way to get contour lines is to use QGIS. It is a free gis program that can make contour lines from the DEM raster you can download from drone deploy. These can be exported as dxf for use in CAD software
New photo added to shared album

1 Like

@Brent_W,

I am exploring what can be done in a Pro plan using just the 3D .obj file. Accessing the DEM data requires a Business plan which is certainly a nicer way to go.

The color gradient can combine nicely with contours as you show, or with surface texture as shown here:


and here, where the colors are centered about an elevation of interest to provide 0.25’ level resolution:

More results are shown in “2D Map of Elevation Difference between Two Maps” and “Colors Muddled on Elevation Map”.

Regards,
Terry.

1 Like

I was under the impression that the Pro version does allow for exporting DEM data as geotiff file. I could certainly be mistaken, though.

@Brent_W,

When you go to export in a Pro plan, the DEM is in red (not allowed):
image

Business plan is a nicer way to go but I can get similar results with the Pro plan if I am willing to invest.

Regards,
Terry.

I thought elevation layer exported as geotiff was a DEM. It’s been a while since I’ve done that and I no longer have access to paid version. :slight_smile:

@Brent_W,

I can only get a JPEG file so that’s the motivation for my investments.

Regards,
Terry.

You can export the geotiff of the elevation data which is the first option in the select.

You should be able to get Geotiff of elevation data which can be imported into qgis… That’s what I’ve done on several occasions.

@chasemgray, @Brent_W,

Thanks for pointing that out. So what is the difference between the GeoTiff and DEM options? Does the GeoTiff also have a picture of the area like in DD Elevation Map? If the GeoTiff has the DEM then why is a Business Plan needed to access the DEM alone?

Regards,
Terry.

Good question. Hopefully someone else can elaborate but I would have thought they were the same thing… I’m quite certain that is all I’ve ever downloaded and it looked just the same. A raster image with elevation information. The information could be viewed in many different ways including 2.5d with qgis. Contour lines, hydrology, and many other processes…