I want to compare two raster maps for any differences. The r.mapcalc
expression I used yielde no results ... unless getting the GRASS shell
prompt means there are no differences.
GRASS hung due to an initial syntax error; corrected.
Now I have the difference map which is a solid color using the elevation
color table. Ergo, no differences.
GRASS hung due to an initial syntax error; corrected.
Now I have the difference map which is a solid color using the elevation
color table. Ergo, no differences.
For the record: there is a "differences" color table which is useful for this.
I want to compare two raster maps for any differences. The r.mapcalc
expression I used yielde no results ... unless getting the GRASS shell
prompt means there are no differences.
On Tue, Mar 28, 2017 at 4:30 PM, Rich Shepard <rshepard@appl-ecosys.com>
wrote:
Now I have the difference map which is a solid color...
...Ergo, no differences.
As Soeren mentioned in the other part of the thread, use r.univar to get
the statistics. Don't rely on just looking at the resulting raster map.
There can be things like outliers which may throw the visualization off.
As Soeren mentioned in the other part of the thread, use r.univar to get
the statistics. Don't rely on just looking at the resulting raster map.
There can be things like outliers which may throw the visualization off.
Vaclav,
Here are the results of r.univar on the output of r.mapcalc "output_diff =
blocked_h_max - open_h_max":
With no experience interpreting r.univar output I'm not sure what the
above tells me about the two maps. Yes, I see a small range and many null
cells, but I expect that because 4 cells on one input DEM are set about 0.6m
higher elevation than those on the other input DEM.
GRASS hung due to an initial syntax error; corrected.
Now I have the difference map which is a solid color using the elevation
color table. Ergo, no differences.
Moritz:
For the record: there is a "differences" color table which is useful for
this.
Don't forget to try r.colors with -e or -a -g if the first attempt does not
show much differences.
As Soeren mentioned in the other part of the thread, use r.univar to get
the statistics. Don’t rely on just looking at the resulting raster map.
There can be things like outliers which may throw the visualization off.
Vaclav,
Here are the results of r.univar on the output of r.mapcalc “output_diff =
blocked_h_max - open_h_max”:
[…] I see a small range and many null
cells, but I expect that because 4 cells on one input DEM are set about 0.6m
higher elevation than those on the other input DEM.
Apparently something went wrong because min should be 0 and max should be about 0.6.
The point locations used to edit the original DEM are probably wrong (not close to the center), and the computational region might have been changed somewhere in the process of editing the original DEM.
For the record: there is a "differences" color table which is useful for
this.
Don't forget to try r.colors with -e or -a -g if the first attempt does not
show much differences.
I _had_ not noticed the 'differences' color table. Applying that produces
interesting results (see attached .png).
The four blue cells are ~0.6m higher in the blocked map than in the open
culvert map. I don't know the reason for the lighter blue cell to the
southwest of the group of four. I suspect, but don't know, that the pinkish
cells represent slightly higher water accumulation in the blocked map than
in the open map.
Germane to what Markus M. wrote, "The point locations used to edit the
original DEM are probably wrong (not close to the center), ..." I now think
that's where I made one mistake. When I isolated those four cells and
queried them I truncated the easting and northing coordinates to the integer
value assuming that all elevations in a 1m x 1m cell were the same. If this
assumption is incorrect then I'll re-create the change and start the model
running again with a slightly different set of elevations for those cells.
If anyone can suggest other changes to the model input to better show
where water accummulates behind a blockage please let me know.
Germane to what Markus M. wrote, "The point locations used to edit the
original DEM are probably wrong (not close to the center), ..." I now
think that's where I made one mistake.
Nope. I zoom in to isolate those 4 cells in in the blocked map. No matter
where within the cell I click the elevation is the same.
However, ... I'm now wondering if the issue is the elevation in feet
rather than meters.
The source DEMs were run through r.proj to convert from feet to meters.
This converted the coordinates but apparently not the elevations. If Itzi
wants all input in SI units then having elevations in feet with rainfall in
mm/hr would certainly get the model's briefs in a twist.
If having elevation data range from ~147 to ~168 feet rather than ~45m to
~51m would produce incorrect results then I suppose I need to multiply both
input maps (open and blocked) by 0.305 using r.mapcalc, then run both models
again.
If I understand well, you have a 'raw' DEM and you want to open the
culvert in that DEM.
If it is an under-road culvert, your 'raw' DEM will show the road
elevation, and the culvert will not be shown. i.e the culvert is
blocked.
If you want to 'open' the culvert, you'll have to cut through the
road. You can do this with r.carve, for example.
For the record: there is a "differences" color table which is useful for
this.
Don't forget to try r.colors with -e or -a -g if the first attempt does
not
show much differences.
I _had_ not noticed the 'differences' color table. Applying that produces
interesting results (see attached .png).
The four blue cells are ~0.6m higher in the blocked map than in the open
culvert map. I don't know the reason for the lighter blue cell to the
southwest of the group of four. I suspect, but don't know, that the pinkish
cells represent slightly higher water accumulation in the blocked map than
in the open map.
Germane to what Markus M. wrote, "The point locations used to edit the
original DEM are probably wrong (not close to the center), ..." I now think
that's where I made one mistake. When I isolated those four cells and
queried them I truncated the easting and northing coordinates to the integer
value assuming that all elevations in a 1m x 1m cell were the same. If this
assumption is incorrect then I'll re-create the change and start the model
running again with a slightly different set of elevations for those cells.
If anyone can suggest other changes to the model input to better show
where water accummulates behind a blockage please let me know.
If I understand well, you have a 'raw' DEM and you want to open the
culvert in that DEM. If it is an under-road culvert, your 'raw' DEM will
show the road elevation, and the culvert will not be shown. i.e the
culvert is blocked. If you want to 'open' the culvert, you'll have to cut
through the road. You can do this with r.carve, for example.
Laurent,
Interesting observation. On the source DEM the elevation of the culvert
inlet is about 2 feet lower than the road and the elevation of the culvert
outlet is about 3 feet lower than the road.
The attached .png shows the results of a 40-minute simulation of rainfall
accumulation. The two red dots are the culvert inlet and outlet. The
accumulation south of the road is because water pools in the swale below the
inlet until it reaches that elevation, then flows through and accumulates in
the deeper portion of the ditch on the north side.
I expected to see something like this using the actual rainfall data I
have.
Then, of course, if the culvert is blocked I expect water to accumulate
south of the road until it reaches that elevation, then overflow the road
and areas to the south.
If you want to 'open' the culvert, you'll have to cut through the road.
You can do this with r.carve, for example.
Certainly worth doing. The r.carve manual page requires as input a vector
map containing streams. Having only two points (culvert inlet and outlet), I
suppose the idea is to create a stream between those two points.
Would the process be to use v.edit on a copy (called 'stream') of the
culvert point map to generate a straight line between the two points? That
would provide the vector input r.carve wants.
Would the process be to use v.edit on a copy (called 'stream') of the
culvert point map to generate a straight line between the two points? That
would provide the vector input r.carve wants.
How do I add a line between two specific points using the vector digitizer
in the GUI map display window?
Clicking on one point, then on the other point does not show a line
between the two points.
Clicking on one point and dragging the cursor to the other point before
releasing the button also does not display a line between the two points.
If you want to 'open' the culvert, you'll have to cut through the road.
You can do this with r.carve, for example.
Certainly worth doing. The r.carve manual page requires as input a vector
map containing streams. Having only two points (culvert inlet and outlet), I
suppose the idea is to create a stream between those two points.
Would the process be to use v.edit on a copy (called 'stream') of the
culvert point map to generate a straight line between the two points? That
would provide the vector input r.carve wants.
Rich,
You can create a new vector map and create a line that link the two points.
However, r.carve will interpolate the elevation between the start
point and the end point.
If you culvert invert have a lower elevation, this will not show up.
But considering the amount of simplification you're already applying,
it could be acceptable.
Would the process be to use v.edit on a copy (called 'stream') of the
culvert point map to generate a straight line between the two points? That
would provide the vector input r.carve wants.
How do I add a line between two specific points using the vector digitizer
in the GUI map display window?
Clicking on one point, then on the other point does not show a line
between the two points.
Clicking on one point and dragging the cursor to the other point before
releasing the button also does not display a line between the two points.
Clue stick needed.
You need first to create a new vector map (or edit an existing one)
and select "digitize new line".
You can create a new vector map and create a line that link the two
points. However, r.carve will interpolate the elevation between the start
point and the end point.
Laurent,
Have this line in a vector map called 'stream.'
If you culvert invert have a lower elevation, this will not show up. But
considering the amount of simplification you're already applying, it could
be acceptable.
The invert has a slightly higher elevation than the outfall. Both are
lower than the elevation of the road over the culvert.
Will try this and see how it compares to the base map.
You can create a new vector map and create a line that link the two
points. However, r.carve will interpolate the elevation between the start
point and the end point.
Laurent,
If my visual interpretation of the output (detail of culvert attached) is
correct, this new DEM (with metric elevations) is suitable for input to
Itzi. The culvert depth is clearly less than the road surface.