Skip to content

Fixes #242.#277

Merged
vpipkt merged 1 commit intolocationtech:developfrom
s22s:fix/242
Aug 9, 2019
Merged

Fixes #242.#277
vpipkt merged 1 commit intolocationtech:developfrom
s22s:fix/242

Conversation

@metasim
Copy link
Member

@metasim metasim commented Aug 9, 2019

Also fixes #224

@metasim metasim requested a review from vpipkt August 9, 2019 19:08
@vpipkt vpipkt added this to the 0.8.0 milestone Aug 9, 2019
Copy link
Member

@vpipkt vpipkt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a quite thorough round trip with an entire modis granule that has given us trouble recently. I read both the original and the df.write.geotiff version with rasterio. Results:

>>> np.all(original_array == my_array)
True
>>> for i in range(6):
>>>    if original_meta['transform'][i] != 0:
>>>        print(i, 'pct dif', 
>>>          (original_meta['transform'][i] - my_meta['transform'][i]  ) / original_meta['transform'][i])
>>>    else:
>>>        print(i, 'equal zero', original_meta['transform'][i] == my_meta['transform'][i])
0 pct dif -4.5051436451237065e-13
1 equal zero True
2 pct dif 0.0
3 equal zero True
4 pct dif 4.48551338958537e-13
5 pct dif -0.0
>>> 

And the CRS checks out. Height and width agree. Datatypes agree.

I am calling this one good.

@vpipkt vpipkt merged commit 109dd45 into locationtech:develop Aug 9, 2019
@vpipkt vpipkt deleted the fix/242 branch August 9, 2019 21:31
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.

GeoTiff writer is distorting data

2 participants