I started using the GDAL Library in a c++ project. It is a great library, but I am a bit stuck right now with different aspects of it. What is the best way to use gdal_contour in my c++ programm? Should i use the system() function or simply grab the source and use it? I tried to get the contours of a hightmap with gdal_contour as a PNG or SVG(or different vector format, like eps or so) but had no success so far. Is there a list wich output formats are supported. Until now I only got shp and dxf files. Do I have to burn the shp file to a png with gdal_translate? I tried this and had some troubles with the alpha channels. Maybe someone has the commands for me to get a transparent contour as png. Sometimes the contour lines look a bit to pixelated, is there a way to smoothen things up with more antialiasing or so? Is there a way to get a colored contour automatically, or do i have to use a color table txt file?
I tried the following where output.tif was a transparent tif. but had no success.
gdal_contour -i 50 <DEM> contour gdal_rasterize -burn 0 -l contour contour output.tif