Simple library for D to deal with surfaces (2D grids). Regular cartesian-cell 2D grids currently are supported.
Documentation is available here
Author: Dmitriy Linev
License: MIT
- Import 2D grids from popular formats
- Perform arithmetic calculations with 2D grids
- Export to popular formats to be able to open it in special software (like Golden Software Surfer or Schlumberger Petrel)
- CPS-3 ASCII
- ZMap+
- IRAP Classic ASCII (aka ROXAR text)
- CPS-3 ASCII
- ZMap+
- IRAP Classic ASCII (aka ROXAR text)
auto surface = new CartesianSurface;
surface.loadFromFile("./data/surface.cps");
// perform some serious calculation
foreach(i; 0 .. surface.nx) {
foreach(j; 0 .. surface.ny) {
surface.z[i][j] = someSeriousCalculation();
}
}
// inverse Z axis polarity for export
surface *= -1;
surface.saveToFile("./data/calculated.cps", "cps");
Directory | Contents |
---|---|
./source |
Source code. |
./test |
Unittest data. |
dsurf is available in dub. If you're using dub run dub add dsurf
in your project folder and dub will add dependency and fetch the latest version.