-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Got ERROR 1: Geotransform should define a north-up non rotated area, but area seems not rotated #11618
Comments
…enerated Fixes case of OSGeo#11618
The set of GCPs is inconsistent. It forms a "hour-glass" like shape if I might say. The fact that it "works" (actually it doesn't really) for working is just due to numerical precision luck/unluck if I print the adfGT[] coefficients, I get: $ gdal_create test.pdf -co COMPOSITION_FILE=pdfcomposition_working.xml $ gdal_create test.pdf -co COMPOSITION_FILE=pdfcomposition_broken.xml In both cases the fact that adfGT[5] is zero or close to it is a sign that the GCPs don't make sense. adfGT[5] is supposed to be the resolution in the Y axis. This can't be a zero value for a valid geotransform. In #11620 I make GDALGCPsToGeoTransform() to fail in both cases |
…enerated Fixes case of OSGeo#11618
@rouault Thanks for your fast response. You are right. Both cases are invalid. |
…enerated Fixes case of OSGeo#11618
What is the bug?
In some cases the Geotransformation raises ERROR 1: Geotransform should define a north-up non rotated area, but area seems not rotated. See also the attached example.
example.zip
Steps to reproduce the issue
Unzip example.
gdal_create test.pdf -co COMPOSITION_FILE=pdfcomposition_working.xml
gdal_create test.pdf -co COMPOSITION_FILE=pdfcomposition_broken.xml
The last command raises the error mentioned before.
After investigation the error is happening here:
gdal/frmts/pdf/pdfcreatefromcomposition.cpp
Line 763 in 9581c77
The second condition is not met, because
std::fabs(georeferencing.m_adfGT[4])
is not smaller than1e-5 * std::fabs(georeferencing.m_adfGT[5]))
georeferencing.m_adfGT[4] has for example the value 4.76e-19 and
georeferencing.m_adfGT[5] has for example the value 0.
I would assume 4.76e-19 ≈ 0.
But maybe I'm wrong and the issue is somewhere different.
Any ideas how to resolve this?
Thanks in advance.
Versions and provenance
3.8.4, Package from Distribution. Ubuntu 24.04.1 LTS
Additional context
No response
The text was updated successfully, but these errors were encountered: