Generate Contour Lines From Drone Data
In this article
Time depends on your hardware and data volume, cost varies by software choice, and difficulty is moderate. You use photogrammetry software to turn images into a digital elevation model and then extract the lines.
Collecting Drone Imagery
To get accurate contour lines, you need a set of overlapping photos. Fly the drone in a grid pattern over the area. Ensure the overlap between images is high enough for the software to find matching points. If the overlap is too low, the software cannot stitch the images together, and you will have holes in your map. The height of the flight determines the resolution of the final model. A lower flight provides more detail but requires more photos and longer processing times.
Ground control points help anchor the map to real world coordinates. These are markers placed on the ground with known positions. Without these, your contour lines might be shifted or tilted. Check your drone manual for the best camera settings for mapping. Avoid flying during midday when shadows are shortest, or during very overcast days when contrast is low. Consistent lighting across all photos prevents seams in the final model.
Creating the Point Cloud
Once you have the images, upload them to photogrammetry software. The software looks for common pixels across multiple photos to create a point cloud. This is a collection of thousands of individual points in three dimensional space. Each point has a coordinate that defines its position. The software processes these images in stages, starting with alignment and then moving to dense cloud generation.
You should check the point cloud for errors before moving forward. Look for "floating" points or spikes that do not belong to the ground. These often happen near reflective surfaces like water or glass. You can manually delete these points or use software filters to remove noise. The quality of this cloud determines how smooth your contour lines will be. If the cloud is sparse, the resulting lines will look jagged.
Generating the Digital Elevation Model
A point cloud contains everything the camera saw, including trees, buildings, and cars. To make contour lines, you need a Digital Terrain Model that only shows the bare earth. The software uses a process called filtering to remove non-ground objects. This creates a Digital Elevation Model, which is essentially a grayscale image where the brightness of each pixel represents a height value.
You can choose between a raster model or a mesh model. A raster model is a grid of pixels and is generally better for calculating slopes and contours. A mesh model uses triangles to connect points and is better for visual presentations. Ensure the resolution of your model matches the needs of your project. If you need high precision, keep the pixel size small. Labels for these settings can differ by version of the software you use.
Extracting the Contour Lines
With the elevation model ready, you can now generate the contours. This is done by telling the software to draw a line every time the elevation reaches a specific interval. You must decide on the contour interval based on the steepness of the land. For flat areas, a small interval shows more detail. For steep mountains, a larger interval prevents the map from becoming a solid block of lines.
- Open the contour generation tool in your software menu.
- Select the Digital Elevation Model as the source layer.
- Set the contour interval based on the terrain steepness.
- Choose the output format, such as a shapefile or a DXF file for CAD software.
- Run the generation process and save the file.
The software will produce a series of vectors. These lines connect points of equal elevation. You can then export these lines to a mapping tool to add labels and colors. Check the lines against known landmarks to ensure the elevations are correct.
Refining Contour Accuracy
Raw contour lines often look "jittery" or zig-zagged because of small variations in the drone data. You can use a smoothing tool to make the lines more natural. Be careful not to over-smooth, as this can remove real geographical features like small ridges or ditches. Smoothing essentially averages the position of the points along the line to create a curve.
Check for artifacts caused by vegetation. If a thick canopy of trees was present, the software might think the top of the trees is the ground. This creates false mounds on your map. You can fix this by manually editing the elevation model or by using a drone with LiDAR, which can see through leaves to the soil. If you only have photos, you may need to manually adjust the lines in a vector editor.
Common Data Errors
When the lines do not look right, it is usually a problem with the source data. If the lines are shifted, check your ground control points. If the lines are too jagged, your point cloud might be too noisy or your smoothing settings are too low. If there are gaps in the lines, you likely had a gap in your photo coverage during the flight.
Another common issue is the "bowl effect," where the edges of the map curve upward or downward. This happens when the drone flight does not have enough overlap or when the camera calibration is off. To fix this, you can try re-processing the data with different alignment settings or by adding more ground control points. Always verify the final map against a physical survey if the data is being used for construction.
Exporting for Use
Once the contours are clean, you need to move them into a usable format. Most professionals use shapefiles for geographic information systems or DXF files for architectural software. When exporting, ensure you keep the coordinate system consistent. If you change the projection, the lines may shift or stretch.
You can style the lines by making index contours thicker than intermediate contours. Index contours are usually every fifth or tenth line and are labeled with the elevation. This makes the map much easier to read. You can also color the lines based on height, using cool colors for valleys and warm colors for peaks. Check the documentation of your export software to see which file types are supported for your specific needs.