[gdal-dev] Contour Line Thinning

Richard Greenwood richard.greenwood at gmail.com
Fri Jan 1 18:47:52 PST 2021


On Fri, Jan 1, 2021 at 2:36 PM Stephen Woodbridge <
stephenwoodbridge37 at gmail.com> wrote:

> Hi all,
>
> I'm contouring bathemetry data using gdal_contour and it works really
> great. The problem I have is that when depth falls off rapidly like at
> the continental shelf or into a canyon, I get too many contour lines
> that all bunch up. If I change the contour step size to fix this, then
> the flatter areas don't get enough lines.
>
> I wonder if anyone has any ideas on someway to thin these lines or some
> way to do adaptive contouring based on maybe something like scanning the
> image first to build a masks that represent these rapid changes in depth
> and then change the contour levels in these masked areas.
>
> I currently contour into a postgis database, the render them using
> mapserver into a tile cache since they are static once they are computed.
>
> I would be interested in any ideas you might have on how to tackle this
> problem.
>
> -Steve W
>
>
Hey Steve,

Interesting problem and this isn't an answer, just my opinion. I live and
play in a mountainous area and frequently use USGS topo maps with contour
intervals of 20, 40 and 80 feet. Each map's contour interval was chosen
with criteria like yours - flatter land needs smaller contour intervals,
but steeper land can become too cluttered with a small contour interval.
But as a map user it drives me crazy when I stitch together adjoining maps
with different intervals and try to get a sense of the landscape. Like this
for example
<https://greenwoodmap.com/tetonwy/mapserver/map#zcr=7.279815109511815/2448564.5062904786/1516712.6778719614/0&lyrs=DRG,Roads,ownership>
where 20 foot contours adjoin 80 foot. The western half of the map is much
steeper than the eastern, but that's not obvious from a quick look. I'd
just let the bunched up contours tell the reader that hey, it's really
steep here!

Best regards,
Rich

-- 
Richard W. Greenwood, PLS
www.greenwoodmap.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210101/4af48172/attachment.html>


More information about the gdal-dev mailing list