private void CreateTrueFalseMatrix(TFMatrixStruct tfMatrixStruct) { this.m_TrueFalseMatrix = new TrueFalseMatrix(tfMatrixStruct.rowCount, tfMatrixStruct.colCount, tfMatrixStruct.northwestX, tfMatrixStruct.northwestY, tfMatrixStruct.resolution, true); }
private TFMatrixStruct GetTFMatrixStructur(GeoPolygonRegion region) { TFMatrixStruct struct2 = new TFMatrixStruct(); float resolution = this.m_Group.Resolution; double left = region.Left; double top = region.Top; double right = region.Right; double bottom = region.Bottom; this.m_CellFilter.GetBoundary(resolution, ref left, ref right, ref bottom, ref top); double a = (top - bottom) / ((double)resolution); double b = (right - left) / ((double)resolution); int rowCount = Convert.ToInt32(Math.Ceiling(a)); int colCount = Convert.ToInt32(Math.Ceiling(b)); struct2.resolution = this.m_Group.Resolution; struct2.northwestX = left; struct2.northwestY = top; struct2.rowCount = rowCount; struct2.colCount = colCount; return struct2; }
private TFMatrixStruct GetTFMatrixStructur(GeoPolygonRegion region) { TFMatrixStruct struct2 = new TFMatrixStruct(); float resolution = this.m_Group.Resolution; double left = region.Left; double top = region.Top; double right = region.Right; double bottom = region.Bottom; if ((left % ((double)resolution)) != 0.0) { left -= left % ((double)resolution); } if ((top % ((double)resolution)) != 0.0) { top += resolution - (top % ((double)resolution)); } if ((right % ((double)resolution)) != 0.0) { right += resolution - (right % ((double)resolution)); } if ((bottom % ((double)resolution)) != 0.0) { bottom -= bottom % ((double)resolution); } double a = (top - bottom) / ((double)resolution); double num9 = (right - left) / ((double)resolution); int num = Convert.ToInt32(Math.Ceiling(a)); int num2 = Convert.ToInt32(Math.Ceiling(num9)); struct2.resolution = this.m_Group.Resolution; struct2.northwestX = left; struct2.northwestY = top; struct2.rowCount = num; struct2.colCount = num2; return struct2; }