how to lower a DEM's Z value along a line?

2559
4
Jump to solution
10-14-2014 03:55 AM
KatayounMesgarian
New Contributor III

the idea is using a modified profile and reducing DEM values along this line.

0 Kudos
1 Solution

Accepted Solutions
curtvprice
MVP Esteemed Contributor

You need to get z values on the lines - you may have to get fancy (by densifying the 3-D line) to get z values for every cell before you do a line to raster conversion.

Two approaches to consider, once you get your "line raster" z values in the cells:

1. Raster Calculator tool - use the expression:

Con(IsNull("lineras"), "demras", "demras" - "lineras")

2. Minus and CellStatistics tools - more along the lines of Tim's original suggestion. Ask for the minimum cell by cell between the two rasters, ignoring NoData. The below is in Python with raster layer names, but you could run the tool interactively with these arguments too.

minus_raster = arcpy.sa.Minus("Dem raster", "line raster")

arcpy.sa.CellStatistics("DEM raster", minus_raster, "MIN", "NODATA")

View solution in original post

4 Replies
TimothyHales
Esri Notable Contributor

Convert the line to a raster using Polyline to Raster , and then use the Minus tool to reduce the DEM. Make sure you have a field with value that you want to reduce the DEM by. The conversion will use that field to assign values to the output raster.

KatayounMesgarian
New Contributor III

Timothy Hales,

thanks for your reply.

I think I shoul have been more precise... the line is a 3d one being used to create profile , so it doesnt have a fix z value all the way along it. what I did was I used the 3d points (used to create the line) and convert it to raster, then use Minus tool, the output is a raster just like the rasterized point but with new values. howeve I want to have the DEM with new valuse for the cells along the line.

hope thats makes it clear.

thanks again

Katayoun

0 Kudos
curtvprice
MVP Esteemed Contributor

You need to get z values on the lines - you may have to get fancy (by densifying the 3-D line) to get z values for every cell before you do a line to raster conversion.

Two approaches to consider, once you get your "line raster" z values in the cells:

1. Raster Calculator tool - use the expression:

Con(IsNull("lineras"), "demras", "demras" - "lineras")

2. Minus and CellStatistics tools - more along the lines of Tim's original suggestion. Ask for the minimum cell by cell between the two rasters, ignoring NoData. The below is in Python with raster layer names, but you could run the tool interactively with these arguments too.

minus_raster = arcpy.sa.Minus("Dem raster", "line raster")

arcpy.sa.CellStatistics("DEM raster", minus_raster, "MIN", "NODATA")

KatayounMesgarian
New Contributor III


thanks a lot.

seems its working!

0 Kudos