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

Error reading TIFF headers #209

Closed
kdeloach opened this issue Oct 20, 2015 · 2 comments
Closed

Error reading TIFF headers #209

kdeloach opened this issue Oct 20, 2015 · 2 comments
Assignees
Milestone

Comments

@kdeloach
Copy link
Contributor

For some TIFFs we need more than the first 1MB of bytes. I received the following error during the image validation stage when I uploaded one of my sample TIFFs:

ERROR 1: TIFFFetchDirectory:/media/ephemeral0/9b2411e1-00e9-434f-95c4-360cdac350e9: Can not read TIFF directory count
ERROR 1: TIFFReadDirectory:Failed to read directory at offset 182379100

You can reproduce the error by running gdalinfo inside the worker VM after uploading an image to S3.

vagrant@worker:~$ gdalinfo /media/ephemeral0/9b2411e1-00e9-434f-95c4-360cdac350e9
ERROR 1: TIFFFetchDirectory:/media/ephemeral0/9b2411e1-00e9-434f-95c4-360cdac350e9: Can not read TIFF directory count
ERROR 1: TIFFReadDirectory:Failed to read directory at offset 182379100

The sample TIFF I used is LC81410412014277LGN00_bands_432.TIF and the filesize is 182442557 bytes.

Ref: https://github.com/azavea/raster-foundry/blob/develop/src/rf/apps/workers/process.py#L112

@lliss
Copy link
Contributor

lliss commented Oct 20, 2015

Can you place the image you used on the fileshare or in a known location for testing.

@kdeloach
Copy link
Contributor Author

@lliss lliss added queue and removed queue labels Oct 22, 2015
@kdeloach kdeloach added the queue label Oct 22, 2015
@lliss lliss added this to the 2015-11-05 milestone Oct 22, 2015
@kdeloach kdeloach self-assigned this Oct 27, 2015
kdeloach pushed a commit to kdeloach/raster-foundry that referenced this issue Oct 28, 2015
Fixes an issue where GeoTIFFs with headers beyond the first 1000 bytes
of the file would fail to validate.

Connects raster-foundry#209
@kdeloach kdeloach closed this as completed Nov 2, 2015
@kdeloach kdeloach removed the in review label Nov 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants