Re: [GRASS-user] Matching Histograms for Aerial Photography?

2017-06-20 Thread Jeshua Lacock
Sorry for the duplicate; I posted the other message after waiting over 6 hours 
for this message to post (which ultimately took about 24 hours).
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Filling sinks w/ minimum slope

2017-06-20 Thread Ken Mankoff

On 2017-06-20 at 08:45, Markus Metz  wrote:
> Negative values in the drainage direction should only occur at the
> borders of the current region and around NULL cells. Note that if you
> want internal sinks to be drained, you must not use the depression
> option.

I was not using depression option but I have determined that the mask I was 
using had a few NULLs in it that I was not aware of. I think this was the 
problem.

Thank you for assisting,

  -k.
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Matching Histograms for Aerial Photography?

2017-06-20 Thread Moritz Lennert

On 20/06/17 11:06, Jeshua Lacock wrote:


Greetings,

I am struggling to match histograms for various US states NAIP 1-meter
aerial photography.

It appears that each state shown here has been equalized for each
individual state except for Nevada and Arizona.

I have tried using r.rescale.eq with many different parameters but I
cannot really get Nevada and Arizona to roughly match the intensities of
the rest of the states. It is difficult to guess values that match
because the images are quite large and when I attempt to use a thumbnail
(say at 50m resolution), the parameters used for the 50m thumbnail don’t
match when using the full resolution image.

Can anyone recommend how I might be able to get the histograms to match?


You can try the addon: i.histo.match. You can install it with g.extension.

Moritz
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Filling sinks w/ minimum slope

2017-06-20 Thread Stefan Blumentrath
Hi Ken,

To my knowledge r.watershed does not require to fill sinks in advance, because 
it has a minimal impact routing for handling (non-real) sinks.

Do you have a particular reason for your wish to fill the DEM in advance?

Cheers
Stefan

-Original Message-
From: grass-user [mailto:grass-user-boun...@lists.osgeo.org] On Behalf Of Ken 
Mankoff
Sent: mandag 19. juni 2017 18.36
To: GRASS user list 
Subject: [GRASS-user] Filling sinks w/ minimum slope

Hi GRASS list,

I'm interested in filling sinks in a DEM before using r.watershed. I currently 
use r.fill.dir.

I've discovered that the SAGA fill command has an option to set a "Minimum 
slope gradient to preserve from cell to cell; with a value of zero sinks are 
filled up to the spill elevation (which results in flat areas)" (see 
http://www.saga-gis.org/saga_tool_doc/2.1.3/ta_preprocessor_4.html ).

Does anyone know of an option for this in GRASS, or an addon that implements 
this feature? I've briefly looked at calling SAGA from GRASS and it seems 
non-trivial. I'd prefer to do this in GRASS if possible.

Thanks,

  -k.
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Filling sinks w/ minimum slope

2017-06-20 Thread Ken Mankoff

On 2017-06-20 at 06:28, Markus Metz  wrote:
> You don't need to fill sinks with r.watershed, internal sinks are by
> default drained.

I have negative values in the drainage direction raster produced by r.watershed 
in the interior. Is this a bug? Or am I misunderstanding the definition of a 
sink?

While looking into this, I also notice that I get different accumulation maps 
if I scale the elevation (e.g. divide by 100), even when using the "-s" flag. 
At first consideration, this does not make sense to me.

> You can create flat areas (also with r.terraflow), then use the -b
> flag of r.watershed to create a gentle slope for flat areas.

I tried this and the accumulation map still has end-points (and direction has 
negative values) in the interior.

  -k.
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Filling sinks w/ minimum slope

2017-06-20 Thread Markus Metz
On Mon, Jun 19, 2017 at 10:35 PM, Ken Mankoff  wrote:
>
>
> On 2017-06-19 at 18:20, Stefan Blumentrath 
wrote:
> > To my knowledge r.watershed does not require to fill sinks in advance,
> > because it has a minimal impact routing for handling (non-real) sinks.
> >
> > Do you have a particular reason for your wish to fill the DEM in
> > advance?
>
> If I don't fill it, then my definition of non-real and the algorithms
definition are different. I need all water to leave the domain, but there
are internal sinks.

You don't need to fill sinks with r.watershed, internal sinks are by
default drained. You could also use r.hydrodem to remove internal sinks.

> My solution is to fill them like this:
>
> # run the filling algorithm until there are no holes left
> A=1
> while [[ $A -ne 0 ]]; do
>   r.fill.dir input=phi output=phi format=agnps direction=d areas=a --o --q
>   A=$(r.info a | egrep -o "max = .*" | cut -c7-20)
> done
> g.remove -f type=raster name=a,d
>
> Then use "phi" as the elevation input to r.watershed. Then all water
leaves the domain, but there are flat areas. I would prefer if these were
gently-sloped. A colleague does this in QGIS w/ SAGA and the minimum slope,
but I am trying to make the work reproducible, and therefore prefer CLI
GRASS to GUI QGIS.

You can create flat areas (also with r.terraflow), then use the -b flag of
r.watershed to create a gentle slope for flat areas.

Markus M

>
>   -k.
> ___
> grass-user mailing list
> grass-user@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user