All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Items read from a dfs file have the reference coordinates and orientation
stored in the file. They had the
-1e-35defaults, whatever the file held (#31). DfsBuilder.DeleteValueDoubleis now a property, so assigning it writes the file's double delete value. The property was spelledDeleteValuedouble, sobuilder.DeleteValueDouble = xset a plain attribute and was ignored. The misspelled name stays as an alias.MapProjection.GetDefaultArea()returns the area instead ofNone.dfsSetTemporalAxisraises for a temporal axis class it does not know, instead of writing no temporal axis.MzCartDLL.ConvertWkt2Proj4no longer always raises, and acceptsdatumShiftParameters=None.- The
MzCartDLLfunctions that return strings pass the native library a writable buffer and retry with the length it asks for. A projection short name longer than the first buffer no longer raisesProjectionException, and theLongitude2UtmZoneandProjectionShortNameerror messages are correct. Dfs123File.ReadItemTimeStepNextwithreshape=TruereturnsNoneat the end of the file instead of raisingAttributeError.DfsFile.Openaccepts integer modes such as0.- Mesh files hold only triangles and quadrilaterals, and mikecore now enforces
it.
MeshBuilder.CreateraisesValueErrorfor a dfsu file that is not 2D,MeshFile.Writeraises for an element with other than 3 or 4 nodes, andMeshFile.ReadMeshraises for such an element instead of giving itElementType0. A 3D dfsu was written as a mesh with a3 21element header and 6- or 8-node rows (#68). DfsuBuilder.SetNodeIdsandSetNodescan be called in either order, andSetNodes,SetNodeIdsorSetElementsafterSetFromMeshFile, without raising "truth value of an array is ambiguous".DfsuBuilderwrites a spectral file with only directions or only frequencies, with a count of 0 for the missing one.- Timestep out-of-range errors in
DfsFile.ReadItemTimeStepandWriteItemTimeStep, and theDfsuFilelayered-mesh error, raise their message instead of aTypeError. TheWriteItemTimeStepmessage gives the correct range. DfsFile.WriteItemTimeSteprejects a first write to a new file other than item 1, timestep 0 with "No dynamic items have been written to the file yet".DfsFactory.CreateCustomBlockandDfsDynamicItemInfo.CreateEmptyItemDataDataraiseValueErrorfor an unsupported data type, instead ofUnboundLocalError.DfsFile.OpenwithDfsFileMode.ClosedraisesValueErrorinstead ofUnboundLocalError.Dfs0ToAsciiraises an error naming the item and timestep when a read fails, instead ofAttributeError.DfsuBuilder.Validatereports missing nodes and elements instead of raisingTypeError, andSetup*/CreateDfsuraise a clear error instead ofAttributeError.DfsStaticItemBuilder.Validatereports missing data or axis instead of raisingAttributeError.- Setting a
DfsBuilderdelete value (DeleteValueFloat,DeleteValueDouble,DeleteValueByte,DeleteValueInt,DeleteValueUnsignedInt) afterCreateFileraises, as the other header setters do. It used to change the value after the header had been written. DfsBuilder.Validatechecks every entry of a compressed file's encode key against the item's axis. It checked one entry per dynamic item.DfsBuilder.Validateaccepts a compressed dfs1 or dfs2 file, so one can be created. It raisedIndexErrorfor any dfs1 or dfs2 encode key. A dfs1 has one row and one layer, so its y and z keys must be 0; a dfs2 has one layer, so its z key must be 0.DfsBuilder.Validateaccepts an encode key on a dfs0 file without checking it, instead of raisingIndexError. The native library ignores the key.DfsFile.WriteItemTimeStepNextreports data shorter than the item with its size, instead of raisingAttributeError.DfsuBuilderwrites theX-coordandY-coordstatic items of a file with a geographic projection, such asLONG/LAT, aseumILatLongin degrees. They wereeumIGeographicalCoordinatein metres whatever the projection. Files with a projected coordinate system are unchanged (#47).- Reading an item's value type raises the DFS error when the native library
reports one, instead of returning
DataValueType.Instantaneous.