diff --git a/WindStressPRM/Utils/Matrix.cs b/WindStressPRM/Utils/Matrix.cs index 494d4a4b5db6831b749067dfca39329300661b29..1019fd75a1761056aff09877eb680990c4295a76 100644 --- a/WindStressPRM/Utils/Matrix.cs +++ b/WindStressPRM/Utils/Matrix.cs @@ -8,7 +8,19 @@ namespace WindStressPRM /// </summary> /// <typeparam name="T"></typeparam> public class Matrix<T> - { + { + /// <summary> + /// origin coordinates of matrix. This must be top left corner + /// </summary> + public Coordinate Origin { get; set; } + /// <summary> + /// get coordinate of cell at index + /// </summary> + /// <param name="index"></param> + /// <returns></returns> + public Coordinate CoordinateAt(Index index) { + return new Coordinate(Origin.X + index.Row*Size.Width, Origin.Y - index.Col*Size.Height); + } /// <summary> /// AffineCoefficients for matrix from raster projection /// </summary>