Dear all,
I use Analysis.Slope.getslope to produce Slope raster but I got a strange result:
- All value in Result Raster is zero
- Cell size in Result Raster is 1x1 (In the Input Raster (DEM) the cell size was 30x30)
- Extent (Bounds) go so far from Input Raster.
Is it a bug? Could you please help me to solve the problem?
Here is the source code (In VB.net)
Dim inputRaster As DotSpatial.Data.IRaster
inputRaster = DotSpatial.Data.Raster.Open("C:\DEM.tif")
Dim rasteroptions As String()
Dim datatype As System.Type = System.Type.GetType("System.Double")
Dim outputRaster As DotSpatial.Data.IRaster
outputRaster = Raster.CreateRaster("C:\slope.tif", Nothing, inputRaster.NumColumns, inputRaster.NumRows, 1, datatype, rasteroptions)
outputRaster.Bounds = inputRaster.Bounds.Copy()
outputRaster.NoDataValue = inputRaster.NoDataValue
outputRaster.Projection = inputRaster.Projection
Slope.GetSlope(inputRaster, 1, true, outputRaster, Nothing)
outputRaster.Save()
I use Analysis.Slope.getslope to produce Slope raster but I got a strange result:
- All value in Result Raster is zero
- Cell size in Result Raster is 1x1 (In the Input Raster (DEM) the cell size was 30x30)
- Extent (Bounds) go so far from Input Raster.
Is it a bug? Could you please help me to solve the problem?
Here is the source code (In VB.net)
Dim inputRaster As DotSpatial.Data.IRaster
inputRaster = DotSpatial.Data.Raster.Open("C:\DEM.tif")
Dim rasteroptions As String()
Dim datatype As System.Type = System.Type.GetType("System.Double")
Dim outputRaster As DotSpatial.Data.IRaster
outputRaster = Raster.CreateRaster("C:\slope.tif", Nothing, inputRaster.NumColumns, inputRaster.NumRows, 1, datatype, rasteroptions)
outputRaster.Bounds = inputRaster.Bounds.Copy()
outputRaster.NoDataValue = inputRaster.NoDataValue
outputRaster.Projection = inputRaster.Projection
Slope.GetSlope(inputRaster, 1, true, outputRaster, Nothing)
outputRaster.Save()