Re: [gdal-dev] Question on gdal_contour and limiting the range of contours generated.

2019-10-31 Thread Stephen Woodbridge
Thanks I have not seen the raster common option file thing. I’ll look at it. Sent from my iPhone > On Oct 31, 2019, at 2:11 PM, jratike80 > wrote: > > Hi, > > One more suggestion, have you tried the -fl option "Name one or more “fixed > levels” to extract"? Requires some writing but only o

Re: [gdal-dev] Question on gdal_contour and limiting the range of contours generated.

2019-10-31 Thread jratike80
Hi, One more suggestion, have you tried the -fl option "Name one or more “fixed levels” to extract"? Requires some writing but only once if you save the list into an optfile https://gdal.org/programs/raster_common_options.html. I haven't tried the option with hundreds of fixed levels, though. -J

Re: [gdal-dev] Question on gdal_contour and limiting the range of contours generated.

2019-10-31 Thread Stephen Woodbridge
Jukka, Thanks! After trying shapefile and exceeding 2GB, I switched to postgres and deleted the elevation as you suggested. I'm working with a global relief model the includes both elevation and bathymetry depth over the whole world at about 15 arc-sec/pixel. I generates a lot of contour lin

Re: [gdal-dev] Question on gdal_contour and limiting the range of contours generated.

2019-10-31 Thread jratike80
Second thought, perhaps I would just delete unnecessary contour lines afterwards instead of flattening the DEM. gdal_contour -f gpkg -a elev -off -121.92 -i 1.524 bathy-value/crm_vol2.nc.tif bathy-contours/crm_vol2.nc-5.gpkg ogrinfo -sql "delete from crm_vol2.nc-5 where elev>0" bathy-contours/crm

Re: [gdal-dev] Question on gdal_contour and limiting the range of contours generated.

2019-10-31 Thread jratike80
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://gd

[gdal-dev] Question on gdal_contour and limiting the range of contours generated.

2019-10-30 Thread Stephen Woodbridge
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 star