3

Where can I find the official docs for gdal/ogr python API?

I am looking for something comprehensive which shows all the classes with descriptions of their attributes, methods and input/output types. So far I have been using https://www.gdal.org/annotated.html but this appears to have been generated for an older version of gdal/ogr. For instance I am using gdal version 2.2.2 and it appears that in the docs the OGRDriver class is not shown, only the GDALdriver class is shown. At the bottom of the link the following is stated:

Created for gdal by doxygen 1.8.8

I'm not sure if 1.8.8 refers to gdal version or doxygen version, in any case I would like to find the proper documentation for the version of gdal I am using?

1
  • If you just want to use Python for GIS with more python like API you can also use Fiona or Rasterio. More information is availible here.
    – MaBu
    Commented Oct 10, 2018 at 16:04

1 Answer 1

10

You can find official GDAL documentation at https://gdal.org/

All classes documentations are here:

Also you can read Raster API tutorial and Vector API tutorial

For python there are examples in tutorial, but the best place is GDAL tests, which written in python: https://github.com/OSGeo/gdal/tree/master/autotest

Most of python usage are covered by this tests.

2
  • good point about the unit tests. i find the tests in rasterio and fiona are also the best way to see how to do things when they're not immediately obvious from the documentation ;-)
    – Steven Kay
    Commented Oct 10, 2018 at 18:10
  • 2
    For a task-oriented (rather than function-oriented) guide to gdal/ogr, I'd also recommend the GDAL/OGR cookbook.
    – Steven Kay
    Commented Oct 10, 2018 at 18:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.