gdal icon indicating copy to clipboard operation
gdal copied to clipboard

Doc: Condense tutorial presentation

Open dbaston opened this issue 9 months ago • 5 comments

Feature description

The tutorials (e.g., Raster API tutorial provide example code in C, C++, and Python. The presentation of this code could be condensed using something like sphinx-tabs.

Additional context

No response

dbaston avatar Mar 04 '25 17:03 dbaston

@dbaston - I've been testing the sphinx-tabs plugin and it works very well on that Raster API tutorial. Could you assign this issue to me?

geographika avatar Mar 27 '25 12:03 geographika

Other candidates for use of sphinx-tabs are:

  • https://gdal.org/en/stable/tutorials/index.html
  • https://gdal.org/en/stable/tutorials/osr_api_tut.html#alternate-interfaces

Sometimes the driver examples (and command line programs) don't work under Windows due to different quote-escaping etc. so tabs could also be useful in these cases e.g. https://gdal.org/en/stable/drivers/raster/stacit.html#examples

geographika avatar Apr 09 '25 16:04 geographika

@dbaston @rouault - I'm currently moving the other tutorials to tabs.

Quick question - in the Vector tutorial https://gdal.org/en/stable/tutorials/vector_api_tut.html#reading-from-ogr there are examples for both "With GDAL 2.3 and C++11" and "With GDAL < 2.3 and C++" (as well as C). Should the GDAL < 2.3 examples still be kept? If so, I can add them to another tab, but maybe they should be removed altogether from the latest docs?

geographika avatar Apr 17 '25 14:04 geographika

Should the GDAL < 2.3 examples still be kept?

I think they should be removed.

dbaston avatar Apr 17 '25 15:04 dbaston

I think they should be removed.

mentions of anything older than 3.0 can be removed

rouault avatar Apr 17 '25 15:04 rouault

All tutorials with code example in several languages have been updated to use tabs. Closing.

geographika avatar Oct 22 '25 11:10 geographika