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 lines between 8,000 and -10,000 meters, I was think it would be handy to gdal_dem had a few more options to control the range and direction of contour generation.

I also have played with gdal_calc to create an elevation and bathymetry only files.

Thanks, I think I have workarounds for the moment.

-Steve W

On 10/31/2019 4:38 AM, jratike80 wrote:
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_vol2.nc-5.gpkg

ogrinfo -sql "VACUUM" bathy-contours/crm_vol2.nc-5.gpkg

-Jukka-



jratike80 wrote
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-




--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to