Open amit-ramboll opened 2 years ago
This is the first time I have sen this with a Dfs2 file.
Can you provide some additional info on which tool/engine that produced the file and the dimensions and a few screenshots from Mike zero with item info, dimensions, spatial axis info etc.
DFS2 files produced from MIKE SHE. Please see attached images.
Please find the sample file from that link. https://github.com/amit-ramboll/Python-MIKE/blob/main/Data/BalEge_Ref_2DSZ.dfs2)
what is the issue, in file or any python library?
The problem is in the decoding it in python.
You can try to use an older version MIKE IO v 0.6.4 which is based on the .NET SDK, and see if this is any different, until @JesperGr have time to look at this file.
pip install mikeio==0.6.4
I did try today to reproduce this issue. But I could not. It works all fine to call
'dfs2File = DfsFileFactory.Dfs2FileOpen('BalEge_Ref_2DSZ.dfs2')'
Can you please try with the lastest version of mikeio to see if the problem is still there.
There was a fix on August 27 2021 stating "Fixing reading and writing encoding keys, used by most dfs3 files.". I am suspecting that mikeio did not include that fix at that point in time.
When i read DFS2 file overflow error happened. (ArgumentError: argument 2: <class 'OverflowError'>: int too long to convert) I am using latest mikeio version.
.