Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python docs: GCPsToGeoTransform signature incorrect #11259

Open
vilhelmen opened this issue Nov 13, 2024 · 1 comment
Open

Python docs: GCPsToGeoTransform signature incorrect #11259

vilhelmen opened this issue Nov 13, 2024 · 1 comment

Comments

@vilhelmen
Copy link
Contributor

What is the bug?

Docs say osgeo.gdal.GCPsToGeoTransform(int nGCPs, int bApproxOK=1)→ RETURN_NONE, which is wrong since it accepts a list of GCPs and the approximation flag and returns the transform. I'm unable to determine the correct name for bApproxOK, it doesn't seem to be bApproxOK or ApproxOK, or approxOK and I'm not good enough at reading SWIG to locate or fix it. Seems to work fine without being named e.g gdal.GCPsToGeoTransform(ds.GetGCPs(), True)

Since these are C/C++, it should be something like osgeo.gdal.GCPsToGeoTransform(GCP *GPCs, bool ???=True)→ double [6] or maybe double * for the return value?

Steps to reproduce the issue

from osgeo import gdal
print(gdal.GCPsToGeoTransform.__doc__)

Versions and provenance

MacOS 15.1, GDAL 3.10.0, released 2024/11/01 via Homebrew

Additional context

No response

@rouault
Copy link
Member

rouault commented Nov 13, 2024

I'm unable to determine the correct name for bApproxOK

There's none. It is a positional optional argument, not a named one. Cf usages in https://github.com/OSGeo/gdal/blob/master/autotest/gcore/gcps2geotransform.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants