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

Harden some of the sources when trying to read bad files #1623

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

manthey
Copy link
Member

@manthey manthey commented Aug 30, 2024

This was tested by running lisource_compare.py on most of the GDAL repository's autotest files. If a source threw a traceback rather than returning that it could not read a source, it was modified to handle the condition better.

Specifically, command like find ../gdal/autotest/{gcore,gdrivers} -type f -not -name '*.py' -not -name '*.txt' -exec python test/lisource_compare.py --all --projection= --projection=EPSG:3857 {} \+ was run, though some test files were excluded.

There are some interesting test cases that are just astonishingly slow. For instance, some test files are conceptually single layers that are 2e9 pixels across; we currently synthesize lower levels when getting things like thumbnails in some sources (such as tiff). We could be smarter there -- if the synthesized layer is far enough from the known parent, we could reduce the amount of work done by essentially compositing from single pixels (nearest neighbor) instead of tiles.

There are some other test cases that cause issues -- the geospatial pdfs cause bioformats to crash the jvm; when reprojected our build of gdal also has some uncaught error.

This was tested by running lisource_compare.py on most of the GDAL
repository's autotest files.  If a source threw a traceback rather than
returning that it could not read a source, it was modified to handle the
condition better.

Specifically, command like `find ../gdal/autotest/{gcore,gdrivers} -type
f -not -name '*.py' -not -name '*.txt' -exec python
test/lisource_compare.py --all --projection= --projection=EPSG:3857 {}
\+` was run, though some test files were excluded.
@manthey manthey merged commit bd82c33 into master Aug 30, 2024
16 checks passed
@manthey manthey deleted the harden-sources branch August 30, 2024 15:07
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

Successfully merging this pull request may close these issues.

1 participant