/// <summary> /// Initialization function /// </summary> protected void _Init(RasterDriver rdDriver, LengthUnit lUnits, Projection proj, GdalDataType dType, ExtentRectangle theExtent, double?ndv) { _writepermission = false; origNodataVal = ndv; Datatype = dType; Extent = theExtent; Proj = proj; VerticalUnits = lUnits; driver = rdDriver; }
/// <summary> /// Explicit Constructor to create a new raster /// </summary> /// <param name="fTop"></param> /// <param name="fLeft"></param> /// <param name="dCellHeight"></param> /// <param name="dCellWidth"></param> /// <param name="nRows"></param> /// <param name="nCols"></param> /// <param name="dNoData"></param> /// <param name="psDriver"></param> /// <param name="eDataType"></param> /// <param name="psProjection"></param> /// <param name="psUnit"></param> public Raster(decimal fTop, decimal fLeft, decimal dCellHeight, decimal dCellWidth, int nRows, int nCols, double?dNoData, RasterDriver psDriver, GdalDataType dType, string psProjection, string psUnit, bool leaveopen = false) : base() { _temporary = false; ExtentRectangle theExtent = new ExtentRectangle(fTop, fLeft, dCellHeight, dCellWidth, nRows, nCols); _Init(psDriver, UnitFromString(psUnit), new Projection(psProjection), dType, theExtent, dNoData); if (!leaveopen) { UnloadDS(); } }