Unidata / netcdf-java

The Unidata netcdf-java library
https://docs.unidata.ucar.edu/netcdf-java/current/userguide/index.html
BSD 3-Clause "New" or "Revised" License
144 stars 70 forks source link

Fix a bug with geotiff writing when yaxis is flipped #1342

Closed WeatherGod closed 4 months ago

WeatherGod commented 4 months ago

Description of Changes

Correctly compute yStart when flipping the y-axis. Not doing can result in the bounding box to be in the wrong location if the source coordinates were in kilometers.

PR Checklist

WeatherGod commented 4 months ago

... I swear, one of these days I'll remember to use spotlessApply before committing...

WeatherGod commented 4 months ago

Just to add a clarifying comment here (and I'll correct the comment in the code in my other PR), I got my sense of "flipped" flipped around. The test data is special because its y-axis goes from negative to positive, which is the condition in which the geotiff writer will flip the data around.