DHI/mikeio

reading dfs2 with local coordinates: coordinates in ds.geometry wrong when

Closed this issue · 2 comments

When reading a dfs2 file, the ds.geometry.x and .y and .coordinates arrays of grid coordinates is wrong, whereas the rest of the information (dx, dy, origin, etc.) seems correct

To Reproduce
I only tried with a dfs2 file with "Local coordinates" which in fact are some UTM projected coordinates.

ds = mikeio.read('file.dfs2')
ds.geometry.coordinates
ds.geometry.origin

Expected behavior
ds.geometry.coordinates should show corner coordinates as in .origin. However, .coordinates shows values that seem to be exactly twice the correct values; .origin is correct.
This also affects subsequent use of ds.interp() etc.

System information:

  • python 3.8.11
  • MIKE IO 1.3.1

This actually is a duplicate of this issue here: #540 and can be closed.
Sorry for the confusion.

Closed by #544