Reading-eScience-Centre / edal-java

Environmental Data Abstraction Layer libraries
Other
39 stars 30 forks source link

Does CurvilinearCoords support crossing the dateline? #24

Closed letmaik closed 8 years ago

letmaik commented 9 years ago

In edal.util.CurvilinearCoords I couldn't find info on how the situation is handled (if it is) if a grid cell spans the 180deg discontinuity. It seems all coordinates are wrapped to [-180,180] so I expect some trouble. If it is not supported then it should be mentioned in the javadoc.

guygriffiths commented 8 years ago

All centre co-ordinates are transformed to [-180,180], but the grid cells will extend outside of this range if necessary. I tested the situation where grid cell centres were defined at longitudes 177, -179. The grid cell bounds of the two cells were: [175, 179] and [-181, -177] Which I think is handling it correctly - can you recall if you had a specific example of how it could fail?