[GRASS-user] floodplain creation
Shane Carey
careyshan at gmail.com
Tue Oct 2 04:07:11 PDT 2018
Ok cool. When I I try to run the r.stream.distance with this new new
stream direction layer (that I calculated with r.mapcalc
"streams_direction_8 = int((streams_direction + 45) / 45)" ),
it just hangs on the part that says: "caclulating downstream parameters".
So I am not sure what is going on here - have you any ideas on this?
Also, could you explain a little about what this expression is doing:
(streams_direction + 45) / 45)
Thanks Vaclav
Le gach dea ghui,
*Shane Carey*
*GIS and Data Solutions Consultant*
On Mon, Oct 1, 2018 at 4:29 PM Vaclav Petras <wenzeslaus at gmail.com> wrote:
>
> On Sat, Sep 29, 2018 at 1:55 PM Shane Carey <careyshan at gmail.com> wrote:
>
>> My last bit of the puzzle is to create the flow direction raster. How do
>> I reclassify in order to get the stream direction using r.mapcalc?
>>
>
> Hi Shane,
>
> You are welcome. What you need to do are 2 steps: 1) vector to raster
> conversion with direction to be used for raster values:
>
> v.to.rast input=streams output=streams_direction use=dir
>
> The v.to.rast manual says: "line direction in degrees CCW from east" [1].
> However, the r.stream.distance manual specifies the drainage direction to
> be: "...zero and negative values are valid direction data only if they vary
> from -8 to 8 (CCW from East in steps of 45 degrees). Flow direction map
> shall be of integer type (CELL)." So you need to reclassify.
>
> [1] https://grass.osgeo.org/grass74/manuals/v.to.rast.html
> [2] https://grass.osgeo.org/grass74/manuals/addons/r.stream.distance.html
>
> The reclassification with r.mapcalc would be something like the following,
> but I didn't really check and it may be wrong. Alternative would be to use
> r.recode.
>
> r.mapcalc "streams_direction_8 = int((streams_direction + 45) / 45)"
>
> So please double check the output from the above and compare it with what
> you get from r.watershed.
>
> For completeness, here is what I wrote before:
>
> """
> Yes, just convert your streams to raster (presence-absence) and a raster
> for flow direction as I mentioned here:
>
> https://lists.osgeo.org/pipermail/grass-user/2018-September/079135.html
>
> Since you already have the streams and you want to use them, you need to
> convert them to raster and then also get stream direction for r.stream.
> distance by reclassifying, e.g. with r.mapcalc, output from something
> like this:
>
> v.to.rast in=streams output=streams_dir use=dir
>
> which you can see in context here (different hydrology tool):
>
>
> http://ncsu-geoforall-lab.github.io/geospatial-modeling-course/grass/simwe.html
> """
>
>
>> I am just coping in what you said from your last email Vaclav so that you
>> know which part I am stuck on. This is really super - thanks again
>>
>> [Since you already have the streams and you want to use them, you need to
>> convert them to raster and then also get stream direction for
>> r.stream.distance by reclassifying, e.g. with r.mapcalc]
>>
>> Le gach dea ghui,
>> *Shane Carey*
>> *GIS and Data Solutions Consultant*
>>
>>
>> On Fri, Sep 28, 2018 at 3:02 PM Vaclav Petras <wenzeslaus at gmail.com>
>> wrote:
>>
>>>
>>> On Thu, Sep 27, 2018 at 12:10 PM Shane Carey <careyshan at gmail.com>
>>> wrote:
>>>
>>>>
>>>> Is there anyway of the algorithm just being able to create a floodlain
>>>> for actual real rivers as opposed to the derived river dataset?
>>>>
>>>
>>> Yes, just convert your streams to raster (presence-absence) and a raster
>>> for flow direction as I mentioned here:
>>>
>>> https://lists.osgeo.org/pipermail/grass-user/2018-September/079135.html
>>>
>>> However, you need to be cautious about fit between the existing streams
>>> and the DEM. Definitively check how your existing streams align with the
>>> derived ones (where there are both streams).
>>>
>>>
>>>>
>>>> On Máirt 25 MFómh 2018 at 15:49, Shane Carey <careyshan at gmail.com>
>>>> wrote:
>>>>
>>>>> Image attached shows rivers (black line) and floodplain of where it
>>>>> thinks there are rivers and in some cases where there may not be rivers.
>>>>>
>>>>
>>> To use the derived streams and get rid of parts you don't want, you
>>> could buffer the existing streams and preserve only the derived streams
>>> which are in that buffer.
>>>
>>> However, you should really look at why they are different and
>>> specifically what is closer to reality.
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20181002/3d74bd18/attachment.html>
More information about the grass-user
mailing list