[gdal-dev] Question on gdal_contour and limiting the range of contours generated.
jratike80
jukka.rahkonen at maanmittauslaitos.fi
Thu Oct 31 00:50:29 PDT 2019
Hi,
I believe I would use gdal_calc https://gdal.org/programs/gdal_calc.html and
make the terrain above the sea level flat before creating the contours. And
I would avoid shapefiles and use GeoPackage as output format.
There is a button "Edit on GitHub" in the top-right corner on page
https://gdal.org/programs/gdal_contour.html, feel free to test it.
-Jukka Rahkonen-
Stephen Woodbridge-4 wrote
> Hi,
>
> I want to use gdal_contour to generate shapefile contours which is
> pretty straight forward except I'm working with coastal relief data that
> has both elevation and bathymetry. I only want contours for the
> bathymetry.
>
> I tried setting the -off -5 and -i -5 with the idea that this would
> start me at a depth of -5 and generate contours every -5 units deeper,
> but the generated an empty files. Seems like -i parameter can not be
> negative (should be mentioned in the docs).
>
> This sets the depth to 400ft and generates contours every 5 ft above that:
>
> gdal_contour -off -121.92 -i 1.524 bathy-value/crm_vol2.nc.tif
> bathy-contours/crm_vol2.nc-5.shp
>
> How can I stop/limit the process and stop at 0 (ie: sea level)? I don't
> want land elevation contours. Like a -limit 0 argument?
>
> If this can't be done, it would be a nice option to have so you can
> breakup contours into multiple shapefiles to avoid overflowing them
>
> Thanks,
> -Steve
--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
More information about the gdal-dev
mailing list