Opened 9 years ago
Closed 5 years ago
#5848 closed enhancement (wontfix)
[PATCH] Added contours smoothing to gdal_contour
Reported by: | hassassin | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | closed_because_of_github_migration |
Component: | Utilities | Version: | unspecified |
Severity: | normal | Keywords: | gdal_contour |
Cc: |
Description
This patch provides support for contour smoothing generated from DEM via sliding averaging algorithm. The result looks pretty nice as you can see in attached samples.
In addition, I added filter for contours with too few points (these contours will be remove).
Both additions are optional and turned off by default.
I'd like to ask if there is an interest in this functionality and if it would be possible to add it to the official gdal_contour utility.
Attachments (4)
Change History (7)
by , 9 years ago
Attachment: | 0001-Contours-smoothing-by-sliding-averaging-algorithm.patch added |
---|
by , 9 years ago
Attachment: | original.png added |
---|
by , 9 years ago
Attachment: | filtered.png added |
---|
comment:1 by , 9 years ago
Summary: | Added contours smoothing to gdal_contour → [PATCH] Added contours smoothing to gdal_contour |
---|
Potentially interesting. A few remarks/questions :
- how did this relate with shape smoothing that has been implemented in MapServer for similar purposes ? See http://mapserver.org/development/rfc/ms-rfc-94.html
- for more generality, could be interesting as a standalone method that operates on a OGRLineString* and would be used be GDALContourGenerate()
- validation of the parameters should be done in GDALContourGenerate() itself too (odd value for nLookAhead, dfSlide between 0 and 1, ...)
- it would be good to keep the current API of GDALContourGenerate() and make a new function GDALContourGenerateEx() with the extra parameters, as well as a char papszOptions for future enhancements
- not sure to understand the meaning/effect of the slide parameter
- the gdal.ContourGenerate() entry point in SWIG bindings should be updated
- we would need an update of the documentation and autotest
comment:3 by , 5 years ago
Milestone: | → closed_because_of_github_migration |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.
All contours with less than 20 points were removed, no smoothing.