CAD or GIS Design - Optimizing Contour Line Generation for Topography or Surveying.

Job ID: 37404550

Budget: $1,500 – $3,000 USD

I work with CAD design, particularly in designing contour lines. However, the tool I would be interested in developing would also be useful if it were to run on a GIS platform (such as QGIS, for example).

Point 1 – Regarding Smoothing:
I would like to have a tool that creates contour polylines (with a configurable altimetric interval) as "smooth" as possible. This means that the sequence of points defining them should create curves with the maximum radius, taking into account that transitions between curves with opposite curvatures should also be smooth, within a specified altimetric error margin. It should aim to ensure that the segments defined between consecutive points are as long as possible, not falling below a defined minimum (e.g., 2.5 meters).

In other words, the angles defined at each vertex of the contour polylines should be as wide as possible, respecting the minimum length defined for the segments and also adhering to the specified altitude error margin. It may be possible to maximize the sum of the angles at each vertex of a polyline and, as a preliminary step, incorporate a Kriging process, which inherently smooths contour lines obtained from a discrete point sample without losing coherence with reality. If the angle at some vertices falls below a user-defined value, it should be highlighted in some way for manual resolution.

Point 2 – Regarding Clipping:
Furthermore, the generated contour lines should not be too close horizontally to each other. The tool should determine, in different sectors, at what altimetric interval each contour line should be created to meet the required minimum horizontal distance. This should also take into account the minimum specified vertical interval, and the intervals should be multiples of this specified value, for example, you should be able to choose to create contour polylines at intervals like 3, 6, 12, 15, 18, 21, 24, or 3, 6, 12, 24 cm.

A related detail to consider is that the same contour lines approach each other in some places (when the slope of the terrain increases) and move apart in others (when the slope decreases). Therefore, the same contour line should be visible in some sections and hidden in others (but it should be possible to display it if necessary, for example, by placing it on a different layer).

It should be possible to load an outer limit, where the generated contour polylines should extend to, and internal limits where contour polylines should not be generated.

In summary, the parameters from which the tool should operate are as follows:
1- Minimum vertical interval between contour lines (e.g., 3 cm).
2- Vertical tolerance margin (e.g., +-1.5 cm).
3- Minimum horizontal distance.
4- Minimum segment length.
5- Minimum angle at which "problematic" vertices should be highlighted.
6- Sequence of vertical jumps for selecting contour lines in cases where they are too close horizontally.

All of this should start from a point cloud with Cartesian coordinates X, Y, Z, which can be loaded in .csv or .las/.laz formats. In the case of .csv files, it should accept the following configuration: comma-separated values and should have 5 "columns" - Point Name, X-coordinate, Y-coordinate, height, description.

An example file is attached. These are manually smoothed and clipped contour polylines using CAD software (they are illustrated in red). In the image, the numbers indicate the vertical interval in centimeters at which the contour polylines are located in each sector. The black lines were preserved in the report to indicate the places where the height at which the contour lines are designed changes. It is not a requirement for the tool to design them. The same applies to the color background indicating the terrain height according to the shade; it was retained simply to facilitate the interpretation of the contour lines.

I use meters as the units of distance, and degrees as the units of angles.