[GRASS-user] r.drain stops after short segment
Hi all, I am using r.drain with an elevation raster as input. I filled the elevation raster using r.fill.dir. When I run r.drain, it only creates a short path segment before finishing the analysis, even though it hasn't come close to the region border. There should not be any sinks in my elevation raster because I filled it. Does anyone have any experience with this problem? Thanks! Charlie -- View this message in context: http://osgeo-org.1560.x6.nabble.com/r-drain-stops-after-short-segment-tp5170003.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.drain stops after short segment
Thanks to Markus and Ivan for the help-- I'll answer this on the forum in case others have the same problem in the future. For the record, I am using GRASS 6.4.4 on Mac OS 10.9.5. The problem was that though I ran r.fill.dir once, there were still sinks in my DEM. After running r.fill.dir 5 total times, I removed all of the sinks in the DEM and r.drain worked well. Thanks for indulging a new user! Charlie On Tue, Oct 28, 2014 at 11:52 AM, Ivan Marchesini ivan.marches...@gmail.com wrote: Hi, could be that the dtm is not really/completelly filled. Please try to verify the elevations of the dtm cells surrounding the one where the drain stops. Best On 28 Oct 2014 17:19, cmshobe charles.sh...@colorado.edu wrote: Hi all, I am using r.drain with an elevation raster as input. I filled the elevation raster using r.fill.dir. When I run r.drain, it only creates a short path segment before finishing the analysis, even though it hasn't come close to the region border. There should not be any sinks in my elevation raster because I filled it. Does anyone have any experience with this problem? Thanks! Charlie -- View this message in context: http://osgeo-org.1560.x6.nabble.com/r-drain-stops-after-short-segment-tp5170003.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.drain problem when flow reach the border
On Sun, Dec 30, 2012 at 11:44 PM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Hi Markus I am using this commands. r.cost -k input=friction_landuse_roads output=cost_map start_points=map_source_pt stop_points=map_target_pt --o r.drain input=cost_map output=drain_map vector_points=map_target_pt --o r.drain in GRASS 6.4 does not work with cost surfaces generated with the Knight's Move (r.cost -k). Actually, r.drain does not work at all with cost surfaces in GRASS 6.4. You need the direction map together with the cost surface, and this is only available in 6.5 and 7. I have not a direction map, and as for other source-target-friction maps everything works fine without direction map I thougth that this should work for all. I doubt that it works fine if you do not use the direction map generated by r.cost, because r.drain modifies the input surface if no direction map is given, but for a cumulative cost surface these modifications introduce errors. If you have the chance, please run the command and take a look that the drain line finish on right border. I see. The output is correct with regard to the input cost surface only if a direction map is used as indir input for r.drain. I am going to backport r.cost/r.walk/r.drain from 6.5 to 6.4. Happy new year, Markus M best wishes miltinho 2012/12/30, Markus Metz markus.metz.gisw...@gmail.com: On Sun, Dec 30, 2012 at 8:59 PM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Hi Rashad I tested with the trunk svn, but apparently it still not worked to me. Are you able to test with my datased? https://www.yousendit.com/download/UW16RE9zTkxlM1JBSXNUQw What are the commands you used? I found r.drain input=custo_aux_cost output=custo_aux_cost_drain vector_points=map_target_pt You need to also provide a direction map with the indir option of r.drain. Markus M Thanks! miltinho 2012/12/27, Mohammed Rashad mohammedrasha...@gmail.com: Hi Milton, I think this fix will solve the problem[0]. For elevation data there might be cases where no path exists ie, only single pixel is the selected path. I had tested it by myself and it worked. Please apply the patch and let me know. If any problem comes in compilation or doing r.drain let me know. It will be great if you can share the test data you are using in case not working after applying the patch [0] http://trac.osgeo.org/grass/attachment/ticket/1840/r.drain.diff [1] http://trac.osgeo.org/grass/attachment/ticket/1840/drain.c On Thu, Dec 27, 2012 at 2:31 AM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Hi Mohamed and Markus Mohamed, thanks for your reply, I will wait for a solution within GRASS :-) Markus, thanks for your reply,. Sorry but I disagree a tiny bit, because is expected that between a source and target I will find a solution with the Least Cost path. Do you think that is there any situation where a least cost between source and target will not be found? Maybe if other software provide the soluction, although is not the bestest option, I prefere receive one complete output than a broken one. Happy new year! miltinho 2012/12/23, Markus Metz markus.metz.gisw...@gmail.com: On Sun, Dec 23, 2012 at 7:07 PM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Dear all, I am running a least cost path analysis combining r.cost and r.drain. But on some cases, when the least cost path between source and target reach the border of my map, r.drain stop on that position, and target point isn´t reached. This is correct because at the borders, the direction can not be determined, the path could lead out of the current region, you can not tell. Running on other softwares the algorithms the source and target is connected using edges without problem. If in doubt, I would call it a bug in that other software. Any hint are welcome. Try to expand the current region Markus M -- Miltinho - m...@rc.unesp.br Laboratório de Ecologia Espacial e Conservação - LEEC Depto de Ecologia - UNESP - Rio Claro Av. 24A, 1515- Bela Vista 13506-900 Rio Claro, SP, Brasil Fone: +55 19 3526-9647 (office) 19 3526-9680 (lab) Cel: 19 9853-3220 / 19 9853-5430 Depto Ecologia http://www.rc.unesp.br/ib/ecologia/ PG ECO BIODIV http://www.rc.unesp.br/ib/ecologia/posbiodiversidade/index.php CV http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4792988H6mostrarNroCitacoesISI=truemostrarNroCitacoesScopus=true Google citations http://scholar.google.com/citations?user=OWX_2eAJ ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user -- Regards, Rashad -- Miltinho - m...@rc.unesp.br Laboratório de Ecologia Espacial e Conservação - LEEC Depto de Ecologia - UNESP - Rio Claro Av. 24A, 1515- Bela Vista 13506-900 Rio Claro, SP, Brasil Fone:
Re: [GRASS-user] r.drain problem when flow reach the border
Markus Metz wrote: I am going to backport r.cost/r.walk/r.drain from 6.5 to 6.4. Done in r54470-1. Happy new year, Markus M best wishes miltinho 2012/12/30, Markus Metz markus.metz.gisw...@gmail.com: On Sun, Dec 30, 2012 at 8:59 PM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Hi Rashad I tested with the trunk svn, but apparently it still not worked to me. Are you able to test with my datased? https://www.yousendit.com/download/UW16RE9zTkxlM1JBSXNUQw What are the commands you used? I found r.drain input=custo_aux_cost output=custo_aux_cost_drain vector_points=map_target_pt You need to also provide a direction map with the indir option of r.drain. Markus M Thanks! miltinho 2012/12/27, Mohammed Rashad mohammedrasha...@gmail.com: Hi Milton, I think this fix will solve the problem[0]. For elevation data there might be cases where no path exists ie, only single pixel is the selected path. I had tested it by myself and it worked. Please apply the patch and let me know. If any problem comes in compilation or doing r.drain let me know. It will be great if you can share the test data you are using in case not working after applying the patch [0] http://trac.osgeo.org/grass/attachment/ticket/1840/r.drain.diff [1] http://trac.osgeo.org/grass/attachment/ticket/1840/drain.c On Thu, Dec 27, 2012 at 2:31 AM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Hi Mohamed and Markus Mohamed, thanks for your reply, I will wait for a solution within GRASS :-) Markus, thanks for your reply,. Sorry but I disagree a tiny bit, because is expected that between a source and target I will find a solution with the Least Cost path. Do you think that is there any situation where a least cost between source and target will not be found? Maybe if other software provide the soluction, although is not the bestest option, I prefere receive one complete output than a broken one. Happy new year! miltinho 2012/12/23, Markus Metz markus.metz.gisw...@gmail.com: On Sun, Dec 23, 2012 at 7:07 PM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Dear all, I am running a least cost path analysis combining r.cost and r.drain. But on some cases, when the least cost path between source and target reach the border of my map, r.drain stop on that position, and target point isn´t reached. This is correct because at the borders, the direction can not be determined, the path could lead out of the current region, you can not tell. Running on other softwares the algorithms the source and target is connected using edges without problem. If in doubt, I would call it a bug in that other software. Any hint are welcome. Try to expand the current region Markus M -- Miltinho - m...@rc.unesp.br Laboratório de Ecologia Espacial e Conservação - LEEC Depto de Ecologia - UNESP - Rio Claro Av. 24A, 1515- Bela Vista 13506-900 Rio Claro, SP, Brasil Fone: +55 19 3526-9647 (office) 19 3526-9680 (lab) Cel: 19 9853-3220 / 19 9853-5430 Depto Ecologia http://www.rc.unesp.br/ib/ecologia/ PG ECO BIODIV http://www.rc.unesp.br/ib/ecologia/posbiodiversidade/index.php CV http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4792988H6mostrarNroCitacoesISI=truemostrarNroCitacoesScopus=true Google citations http://scholar.google.com/citations?user=OWX_2eAJ ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user -- Regards, Rashad -- Miltinho - m...@rc.unesp.br Laboratório de Ecologia Espacial e Conservação - LEEC Depto de Ecologia - UNESP - Rio Claro Av. 24A, 1515- Bela Vista 13506-900 Rio Claro, SP, Brasil Fone: +55 19 3526-9647 (office) 19 3526-9680 (lab) Cel: 19 9853-3220 / 19 9853-5430 Depto Ecologia http://www.rc.unesp.br/ib/ecologia/ PG ECO BIODIV http://www.rc.unesp.br/ib/ecologia/posbiodiversidade/index.php CV http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4792988H6mostrarNroCitacoesISI=truemostrarNroCitacoesScopus=true Google citations http://scholar.google.com/citations?user=OWX_2eAJ -- Miltinho - m...@rc.unesp.br Laboratório de Ecologia Espacial e Conservação - LEEC Depto de Ecologia - UNESP - Rio Claro Av. 24A, 1515- Bela Vista 13506-900 Rio Claro, SP, Brasil Fone: +55 19 3526-9647 (office) 19 3526-9680 (lab) Cel: 19 9853-3220 / 19 9853-5430 Depto Ecologia http://www.rc.unesp.br/ib/ecologia/ PG ECO BIODIV http://www.rc.unesp.br/ib/ecologia/posbiodiversidade/index.php CV http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4792988H6mostrarNroCitacoesISI=truemostrarNroCitacoesScopus=true Google citations http://scholar.google.com/citations?user=OWX_2eAJ ___ grass-user mailing list grass-user@lists.osgeo.org
Re: [GRASS-user] r.drain problem when flow reach the border
Hi Markus Thanks for all your help. Please, which svn command I need to run to get the daily trunk subversion? best miltinho 2012/12/31, Markus Metz markus.metz.gisw...@gmail.com: Markus Metz wrote: I am going to backport r.cost/r.walk/r.drain from 6.5 to 6.4. Done in r54470-1. Happy new year, Markus M best wishes miltinho 2012/12/30, Markus Metz markus.metz.gisw...@gmail.com: On Sun, Dec 30, 2012 at 8:59 PM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Hi Rashad I tested with the trunk svn, but apparently it still not worked to me. Are you able to test with my datased? https://www.yousendit.com/download/UW16RE9zTkxlM1JBSXNUQw What are the commands you used? I found r.drain input=custo_aux_cost output=custo_aux_cost_drain vector_points=map_target_pt You need to also provide a direction map with the indir option of r.drain. Markus M Thanks! miltinho 2012/12/27, Mohammed Rashad mohammedrasha...@gmail.com: Hi Milton, I think this fix will solve the problem[0]. For elevation data there might be cases where no path exists ie, only single pixel is the selected path. I had tested it by myself and it worked. Please apply the patch and let me know. If any problem comes in compilation or doing r.drain let me know. It will be great if you can share the test data you are using in case not working after applying the patch [0] http://trac.osgeo.org/grass/attachment/ticket/1840/r.drain.diff [1] http://trac.osgeo.org/grass/attachment/ticket/1840/drain.c On Thu, Dec 27, 2012 at 2:31 AM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Hi Mohamed and Markus Mohamed, thanks for your reply, I will wait for a solution within GRASS :-) Markus, thanks for your reply,. Sorry but I disagree a tiny bit, because is expected that between a source and target I will find a solution with the Least Cost path. Do you think that is there any situation where a least cost between source and target will not be found? Maybe if other software provide the soluction, although is not the bestest option, I prefere receive one complete output than a broken one. Happy new year! miltinho 2012/12/23, Markus Metz markus.metz.gisw...@gmail.com: On Sun, Dec 23, 2012 at 7:07 PM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Dear all, I am running a least cost path analysis combining r.cost and r.drain. But on some cases, when the least cost path between source and target reach the border of my map, r.drain stop on that position, and target point isn´t reached. This is correct because at the borders, the direction can not be determined, the path could lead out of the current region, you can not tell. Running on other softwares the algorithms the source and target is connected using edges without problem. If in doubt, I would call it a bug in that other software. Any hint are welcome. Try to expand the current region Markus M -- Miltinho - m...@rc.unesp.br Laboratório de Ecologia Espacial e Conservação - LEEC Depto de Ecologia - UNESP - Rio Claro Av. 24A, 1515- Bela Vista 13506-900 Rio Claro, SP, Brasil Fone: +55 19 3526-9647 (office) 19 3526-9680 (lab) Cel: 19 9853-3220 / 19 9853-5430 Depto Ecologia http://www.rc.unesp.br/ib/ecologia/ PG ECO BIODIV http://www.rc.unesp.br/ib/ecologia/posbiodiversidade/index.php CV http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4792988H6mostrarNroCitacoesISI=truemostrarNroCitacoesScopus=true Google citations http://scholar.google.com/citations?user=OWX_2eAJ ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user -- Regards, Rashad -- Miltinho - m...@rc.unesp.br Laboratório de Ecologia Espacial e Conservação - LEEC Depto de Ecologia - UNESP - Rio Claro Av. 24A, 1515- Bela Vista 13506-900 Rio Claro, SP, Brasil Fone: +55 19 3526-9647 (office) 19 3526-9680 (lab) Cel: 19 9853-3220 / 19 9853-5430 Depto Ecologia http://www.rc.unesp.br/ib/ecologia/ PG ECO BIODIV http://www.rc.unesp.br/ib/ecologia/posbiodiversidade/index.php CV http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4792988H6mostrarNroCitacoesISI=truemostrarNroCitacoesScopus=true Google citations http://scholar.google.com/citations?user=OWX_2eAJ -- Miltinho - m...@rc.unesp.br Laboratório de Ecologia Espacial e Conservação - LEEC Depto de Ecologia - UNESP - Rio Claro Av. 24A, 1515- Bela Vista 13506-900 Rio Claro, SP, Brasil Fone: +55 19 3526-9647 (office) 19 3526-9680 (lab) Cel: 19 9853-3220 / 19 9853-5430 Depto Ecologia http://www.rc.unesp.br/ib/ecologia/ PG ECO BIODIV http://www.rc.unesp.br/ib/ecologia/posbiodiversidade/index.php CV http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4792988H6mostrarNroCitacoesISI=truemostrarNroCitacoesScopus=true Google citations
Re: [GRASS-user] r.drain problem when flow reach the border
On Mon, Dec 31, 2012 at 3:05 PM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Hi Markus Thanks for all your help. Please, which svn command I need to run to get the daily trunk subversion? See here: http://trac.osgeo.org/grass/wiki/Release/6.4.3RC2-News -- SVN Checkout latest 6.4 release branch (including unreleased bugfixes): Best MarkusN ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.drain problem when flow reach the border
Hi all, thanks again for the help with this. I tried several versions of 6.4X (6.42 weekly snapshot, 6.43.. ) and 6.5 but in none of them, when I try to see the parameters for create output direction on r.cost man page I can't see how can I generate direction for input on r.drain. Including the suggestion of M.Neterler svn checkout https://svn.osgeo.org/grass/grass/branches/develbranch_6 grass6_devel Sorry to do this so trouble, but maybe I am not finding where can I get an updated version of r.cost, r.drain and r.walk. Happy 2013! miltinho 2012/12/31, Markus Neteler nete...@osgeo.org: On Mon, Dec 31, 2012 at 3:05 PM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Hi Markus Thanks for all your help. Please, which svn command I need to run to get the daily trunk subversion? See here: http://trac.osgeo.org/grass/wiki/Release/6.4.3RC2-News -- SVN Checkout latest 6.4 release branch (including unreleased bugfixes): Best MarkusN -- Miltinho - m...@rc.unesp.br Laboratório de Ecologia Espacial e Conservação - LEEC Depto de Ecologia - UNESP - Rio Claro Av. 24A, 1515- Bela Vista 13506-900 Rio Claro, SP, Brasil Fone: +55 19 3526-9647 (office) 19 3526-9680 (lab) Cel: 19 9853-3220 / 19 9853-5430 Depto Ecologia http://www.rc.unesp.br/ib/ecologia/ PG ECO BIODIV http://www.rc.unesp.br/ib/ecologia/posbiodiversidade/index.php CV http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4792988H6mostrarNroCitacoesISI=truemostrarNroCitacoesScopus=true Google citations http://scholar.google.com/citations?user=OWX_2eAJ ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.drain problem when flow reach the border
On Mon, Dec 31, 2012 at 3:52 PM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Hi all, thanks again for the help with this. I tried several versions of 6.4X (6.42 weekly snapshot, 6.43.. ) and 6.5 but in none of them, when I try to see the parameters for create output direction on r.cost man page I can't see how can I generate direction for input on r.drain. For r.cost and r.walk, the option to write directions to a raster map is outdir, see http://grass.osgeo.org/grass65/manuals/r.cost.html http://grass.osgeo.org/grass65/manuals/r.walk.html For r.drain, the option to use directions as input is indir, see http://grass.osgeo.org/grass65/manuals/r.drain.html Including the suggestion of M.Neterler svn checkout https://svn.osgeo.org/grass/grass/branches/develbranch_6 grass6_devel Sorry to do this so trouble, but maybe I am not finding where can I get an updated version of r.cost, r.drain and r.walk. Within the root directory of the source tree svn up Markus M Happy 2013! miltinho 2012/12/31, Markus Neteler nete...@osgeo.org: On Mon, Dec 31, 2012 at 3:05 PM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Hi Markus Thanks for all your help. Please, which svn command I need to run to get the daily trunk subversion? See here: http://trac.osgeo.org/grass/wiki/Release/6.4.3RC2-News -- SVN Checkout latest 6.4 release branch (including unreleased bugfixes): Best MarkusN -- Miltinho - m...@rc.unesp.br Laboratório de Ecologia Espacial e Conservação - LEEC Depto de Ecologia - UNESP - Rio Claro Av. 24A, 1515- Bela Vista 13506-900 Rio Claro, SP, Brasil Fone: +55 19 3526-9647 (office) 19 3526-9680 (lab) Cel: 19 9853-3220 / 19 9853-5430 Depto Ecologia http://www.rc.unesp.br/ib/ecologia/ PG ECO BIODIV http://www.rc.unesp.br/ib/ecologia/posbiodiversidade/index.php CV http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4792988H6mostrarNroCitacoesISI=truemostrarNroCitacoesScopus=true Google citations http://scholar.google.com/citations?user=OWX_2eAJ ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.drain problem when flow reach the border
On Mon, Dec 31, 2012 at 4:41 PM, Markus Metz markus.metz.gisw...@gmail.com wrote: see http://grass.osgeo.org/grass65/manuals/r.cost.html http://grass.osgeo.org/grass65/manuals/r.walk.html For r.drain, the option to use directions as input is indir, see http://grass.osgeo.org/grass65/manuals/r.drain.html Just FYI: I forced the creation of the 6.4 manual an hour ago, so that's also already updated (usually it happens on Saturdays). MarkusN ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.drain problem when flow reach the border
Hi there Everything worked fine. Congrats for all your great job on GRASS-GIS solution, and again many thanks for the effert on deal with this in the transition 2012/2013 (yes! 2013 in Australia and other places around world!). best wishes miltinho 2012/12/31, Markus Neteler nete...@osgeo.org: On Mon, Dec 31, 2012 at 4:41 PM, Markus Metz markus.metz.gisw...@gmail.com wrote: see http://grass.osgeo.org/grass65/manuals/r.cost.html http://grass.osgeo.org/grass65/manuals/r.walk.html For r.drain, the option to use directions as input is indir, see http://grass.osgeo.org/grass65/manuals/r.drain.html Just FYI: I forced the creation of the 6.4 manual an hour ago, so that's also already updated (usually it happens on Saturdays). MarkusN -- Miltinho - m...@rc.unesp.br Laboratório de Ecologia Espacial e Conservação - LEEC Depto de Ecologia - UNESP - Rio Claro Av. 24A, 1515- Bela Vista 13506-900 Rio Claro, SP, Brasil Fone: +55 19 3526-9647 (office) 19 3526-9680 (lab) Cel: 19 9853-3220 / 19 9853-5430 Depto Ecologia http://www.rc.unesp.br/ib/ecologia/ PG ECO BIODIV http://www.rc.unesp.br/ib/ecologia/posbiodiversidade/index.php CV http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4792988H6mostrarNroCitacoesISI=truemostrarNroCitacoesScopus=true Google citations http://scholar.google.com/citations?user=OWX_2eAJ ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.drain problem when flow reach the border
Hi Rashad I tested with the trunk svn, but apparently it still not worked to me. Are you able to test with my datased? https://www.yousendit.com/download/UW16RE9zTkxlM1JBSXNUQw Thanks! miltinho 2012/12/27, Mohammed Rashad mohammedrasha...@gmail.com: Hi Milton, I think this fix will solve the problem[0]. For elevation data there might be cases where no path exists ie, only single pixel is the selected path. I had tested it by myself and it worked. Please apply the patch and let me know. If any problem comes in compilation or doing r.drain let me know. It will be great if you can share the test data you are using in case not working after applying the patch [0] http://trac.osgeo.org/grass/attachment/ticket/1840/r.drain.diff [1] http://trac.osgeo.org/grass/attachment/ticket/1840/drain.c On Thu, Dec 27, 2012 at 2:31 AM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Hi Mohamed and Markus Mohamed, thanks for your reply, I will wait for a solution within GRASS :-) Markus, thanks for your reply,. Sorry but I disagree a tiny bit, because is expected that between a source and target I will find a solution with the Least Cost path. Do you think that is there any situation where a least cost between source and target will not be found? Maybe if other software provide the soluction, although is not the bestest option, I prefere receive one complete output than a broken one. Happy new year! miltinho 2012/12/23, Markus Metz markus.metz.gisw...@gmail.com: On Sun, Dec 23, 2012 at 7:07 PM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Dear all, I am running a least cost path analysis combining r.cost and r.drain. But on some cases, when the least cost path between source and target reach the border of my map, r.drain stop on that position, and target point isn´t reached. This is correct because at the borders, the direction can not be determined, the path could lead out of the current region, you can not tell. Running on other softwares the algorithms the source and target is connected using edges without problem. If in doubt, I would call it a bug in that other software. Any hint are welcome. Try to expand the current region Markus M -- Miltinho - m...@rc.unesp.br Laboratório de Ecologia Espacial e Conservação - LEEC Depto de Ecologia - UNESP - Rio Claro Av. 24A, 1515- Bela Vista 13506-900 Rio Claro, SP, Brasil Fone: +55 19 3526-9647 (office) 19 3526-9680 (lab) Cel: 19 9853-3220 / 19 9853-5430 Depto Ecologia http://www.rc.unesp.br/ib/ecologia/ PG ECO BIODIV http://www.rc.unesp.br/ib/ecologia/posbiodiversidade/index.php CV http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4792988H6mostrarNroCitacoesISI=truemostrarNroCitacoesScopus=true Google citations http://scholar.google.com/citations?user=OWX_2eAJ ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user -- Regards, Rashad -- Miltinho - m...@rc.unesp.br Laboratório de Ecologia Espacial e Conservação - LEEC Depto de Ecologia - UNESP - Rio Claro Av. 24A, 1515- Bela Vista 13506-900 Rio Claro, SP, Brasil Fone: +55 19 3526-9647 (office) 19 3526-9680 (lab) Cel: 19 9853-3220 / 19 9853-5430 Depto Ecologia http://www.rc.unesp.br/ib/ecologia/ PG ECO BIODIV http://www.rc.unesp.br/ib/ecologia/posbiodiversidade/index.php CV http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4792988H6mostrarNroCitacoesISI=truemostrarNroCitacoesScopus=true Google citations http://scholar.google.com/citations?user=OWX_2eAJ ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.drain problem when flow reach the border
On Sun, Dec 30, 2012 at 8:59 PM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Hi Rashad I tested with the trunk svn, but apparently it still not worked to me. Are you able to test with my datased? https://www.yousendit.com/download/UW16RE9zTkxlM1JBSXNUQw What are the commands you used? I found r.drain input=custo_aux_cost output=custo_aux_cost_drain vector_points=map_target_pt You need to also provide a direction map with the indir option of r.drain. Markus M Thanks! miltinho 2012/12/27, Mohammed Rashad mohammedrasha...@gmail.com: Hi Milton, I think this fix will solve the problem[0]. For elevation data there might be cases where no path exists ie, only single pixel is the selected path. I had tested it by myself and it worked. Please apply the patch and let me know. If any problem comes in compilation or doing r.drain let me know. It will be great if you can share the test data you are using in case not working after applying the patch [0] http://trac.osgeo.org/grass/attachment/ticket/1840/r.drain.diff [1] http://trac.osgeo.org/grass/attachment/ticket/1840/drain.c On Thu, Dec 27, 2012 at 2:31 AM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Hi Mohamed and Markus Mohamed, thanks for your reply, I will wait for a solution within GRASS :-) Markus, thanks for your reply,. Sorry but I disagree a tiny bit, because is expected that between a source and target I will find a solution with the Least Cost path. Do you think that is there any situation where a least cost between source and target will not be found? Maybe if other software provide the soluction, although is not the bestest option, I prefere receive one complete output than a broken one. Happy new year! miltinho 2012/12/23, Markus Metz markus.metz.gisw...@gmail.com: On Sun, Dec 23, 2012 at 7:07 PM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Dear all, I am running a least cost path analysis combining r.cost and r.drain. But on some cases, when the least cost path between source and target reach the border of my map, r.drain stop on that position, and target point isn´t reached. This is correct because at the borders, the direction can not be determined, the path could lead out of the current region, you can not tell. Running on other softwares the algorithms the source and target is connected using edges without problem. If in doubt, I would call it a bug in that other software. Any hint are welcome. Try to expand the current region Markus M -- Miltinho - m...@rc.unesp.br Laboratório de Ecologia Espacial e Conservação - LEEC Depto de Ecologia - UNESP - Rio Claro Av. 24A, 1515- Bela Vista 13506-900 Rio Claro, SP, Brasil Fone: +55 19 3526-9647 (office) 19 3526-9680 (lab) Cel: 19 9853-3220 / 19 9853-5430 Depto Ecologia http://www.rc.unesp.br/ib/ecologia/ PG ECO BIODIV http://www.rc.unesp.br/ib/ecologia/posbiodiversidade/index.php CV http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4792988H6mostrarNroCitacoesISI=truemostrarNroCitacoesScopus=true Google citations http://scholar.google.com/citations?user=OWX_2eAJ ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user -- Regards, Rashad -- Miltinho - m...@rc.unesp.br Laboratório de Ecologia Espacial e Conservação - LEEC Depto de Ecologia - UNESP - Rio Claro Av. 24A, 1515- Bela Vista 13506-900 Rio Claro, SP, Brasil Fone: +55 19 3526-9647 (office) 19 3526-9680 (lab) Cel: 19 9853-3220 / 19 9853-5430 Depto Ecologia http://www.rc.unesp.br/ib/ecologia/ PG ECO BIODIV http://www.rc.unesp.br/ib/ecologia/posbiodiversidade/index.php CV http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4792988H6mostrarNroCitacoesISI=truemostrarNroCitacoesScopus=true Google citations http://scholar.google.com/citations?user=OWX_2eAJ ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.drain problem when flow reach the border
Hi Markus I am using this commands. r.cost -k input=friction_landuse_roads output=cost_map start_points=map_source_pt stop_points=map_target_pt --o r.drain input=cost_map output=drain_map vector_points=map_target_pt --o I have not a direction map, and as for other source-target-friction maps everything works fine without direction map I thougth that this should work for all. If you have the chance, please run the command and take a look that the drain line finish on right border. best wishes miltinho 2012/12/30, Markus Metz markus.metz.gisw...@gmail.com: On Sun, Dec 30, 2012 at 8:59 PM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Hi Rashad I tested with the trunk svn, but apparently it still not worked to me. Are you able to test with my datased? https://www.yousendit.com/download/UW16RE9zTkxlM1JBSXNUQw What are the commands you used? I found r.drain input=custo_aux_cost output=custo_aux_cost_drain vector_points=map_target_pt You need to also provide a direction map with the indir option of r.drain. Markus M Thanks! miltinho 2012/12/27, Mohammed Rashad mohammedrasha...@gmail.com: Hi Milton, I think this fix will solve the problem[0]. For elevation data there might be cases where no path exists ie, only single pixel is the selected path. I had tested it by myself and it worked. Please apply the patch and let me know. If any problem comes in compilation or doing r.drain let me know. It will be great if you can share the test data you are using in case not working after applying the patch [0] http://trac.osgeo.org/grass/attachment/ticket/1840/r.drain.diff [1] http://trac.osgeo.org/grass/attachment/ticket/1840/drain.c On Thu, Dec 27, 2012 at 2:31 AM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Hi Mohamed and Markus Mohamed, thanks for your reply, I will wait for a solution within GRASS :-) Markus, thanks for your reply,. Sorry but I disagree a tiny bit, because is expected that between a source and target I will find a solution with the Least Cost path. Do you think that is there any situation where a least cost between source and target will not be found? Maybe if other software provide the soluction, although is not the bestest option, I prefere receive one complete output than a broken one. Happy new year! miltinho 2012/12/23, Markus Metz markus.metz.gisw...@gmail.com: On Sun, Dec 23, 2012 at 7:07 PM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Dear all, I am running a least cost path analysis combining r.cost and r.drain. But on some cases, when the least cost path between source and target reach the border of my map, r.drain stop on that position, and target point isn´t reached. This is correct because at the borders, the direction can not be determined, the path could lead out of the current region, you can not tell. Running on other softwares the algorithms the source and target is connected using edges without problem. If in doubt, I would call it a bug in that other software. Any hint are welcome. Try to expand the current region Markus M -- Miltinho - m...@rc.unesp.br Laboratório de Ecologia Espacial e Conservação - LEEC Depto de Ecologia - UNESP - Rio Claro Av. 24A, 1515- Bela Vista 13506-900 Rio Claro, SP, Brasil Fone: +55 19 3526-9647 (office) 19 3526-9680 (lab) Cel: 19 9853-3220 / 19 9853-5430 Depto Ecologia http://www.rc.unesp.br/ib/ecologia/ PG ECO BIODIV http://www.rc.unesp.br/ib/ecologia/posbiodiversidade/index.php CV http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4792988H6mostrarNroCitacoesISI=truemostrarNroCitacoesScopus=true Google citations http://scholar.google.com/citations?user=OWX_2eAJ ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user -- Regards, Rashad -- Miltinho - m...@rc.unesp.br Laboratório de Ecologia Espacial e Conservação - LEEC Depto de Ecologia - UNESP - Rio Claro Av. 24A, 1515- Bela Vista 13506-900 Rio Claro, SP, Brasil Fone: +55 19 3526-9647 (office) 19 3526-9680 (lab) Cel: 19 9853-3220 / 19 9853-5430 Depto Ecologia http://www.rc.unesp.br/ib/ecologia/ PG ECO BIODIV http://www.rc.unesp.br/ib/ecologia/posbiodiversidade/index.php CV http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4792988H6mostrarNroCitacoesISI=truemostrarNroCitacoesScopus=true Google citations http://scholar.google.com/citations?user=OWX_2eAJ -- Miltinho - m...@rc.unesp.br Laboratório de Ecologia Espacial e Conservação - LEEC Depto de Ecologia - UNESP - Rio Claro Av. 24A, 1515- Bela Vista 13506-900 Rio Claro, SP, Brasil Fone: +55 19 3526-9647 (office) 19 3526-9680 (lab) Cel: 19 9853-3220 / 19 9853-5430 Depto Ecologia http://www.rc.unesp.br/ib/ecologia/ PG ECO BIODIV http://www.rc.unesp.br/ib/ecologia/posbiodiversidade/index.php CV
Re: [GRASS-user] r.drain problem when flow reach the border
On Wed, Dec 26, 2012 at 10:01 PM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Hi Mohamed and Markus Mohamed, thanks for your reply, I will wait for a solution within GRASS :-) Markus, thanks for your reply,. Sorry but I disagree a tiny bit, because is expected that between a source and target I will find a solution with the Least Cost path. Do you think that is there any situation where a least cost between source and target will not be found? Maybe if other software provide the soluction, although is not the bestest option, I prefere receive one complete output than a broken one. Ah, you are right, if the input is output from r.cost, the cost directions should be used. Depending on the input data and the region extents, the least cost path found may not be the real least cost path, but there should be one solution. There are situations where there is no connection between source and target if source and target are separated by NULL cells and no NULL cost is specified to r.cost. Markus M Happy new year! miltinho 2012/12/23, Markus Metz markus.metz.gisw...@gmail.com: On Sun, Dec 23, 2012 at 7:07 PM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Dear all, I am running a least cost path analysis combining r.cost and r.drain. But on some cases, when the least cost path between source and target reach the border of my map, r.drain stop on that position, and target point isn´t reached. This is correct because at the borders, the direction can not be determined, the path could lead out of the current region, you can not tell. Running on other softwares the algorithms the source and target is connected using edges without problem. If in doubt, I would call it a bug in that other software. Any hint are welcome. Try to expand the current region Markus M -- Miltinho - m...@rc.unesp.br Laboratório de Ecologia Espacial e Conservação - LEEC Depto de Ecologia - UNESP - Rio Claro Av. 24A, 1515- Bela Vista 13506-900 Rio Claro, SP, Brasil Fone: +55 19 3526-9647 (office) 19 3526-9680 (lab) Cel: 19 9853-3220 / 19 9853-5430 Depto Ecologia http://www.rc.unesp.br/ib/ecologia/ PG ECO BIODIV http://www.rc.unesp.br/ib/ecologia/posbiodiversidade/index.php CV http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4792988H6mostrarNroCitacoesISI=truemostrarNroCitacoesScopus=true Google citations http://scholar.google.com/citations?user=OWX_2eAJ ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.drain problem when flow reach the border
On Wed, Dec 26, 2012 at 10:01 PM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Hi Mohamed and Markus Mohamed, thanks for your reply, I will wait for a solution within GRASS :-) Markus, thanks for your reply,. Sorry but I disagree a tiny bit, because is expected that between a source and target I will find a solution with the Least Cost path. Do you think that is there any situation where a least cost between source and target will not be found? Maybe if other software provide the soluction, although is not the bestest option, I prefere receive one complete output than a broken one. r.drain works for me as expected when the input comes from r.cost, i.e. movement directions are supplied. In this case the path does not stop at a border. If the input is a DEM and directions are not supplied, r.drain stops at borders, as it should do, because drainage the direction can not be determined. r.drain, as the name implies, traces a drainage path by following the steepest slope. It is not a least cost path search module, for that you need to use r.cost + r.drain. Markus M Happy new year! miltinho 2012/12/23, Markus Metz markus.metz.gisw...@gmail.com: On Sun, Dec 23, 2012 at 7:07 PM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Dear all, I am running a least cost path analysis combining r.cost and r.drain. But on some cases, when the least cost path between source and target reach the border of my map, r.drain stop on that position, and target point isn´t reached. This is correct because at the borders, the direction can not be determined, the path could lead out of the current region, you can not tell. Running on other softwares the algorithms the source and target is connected using edges without problem. If in doubt, I would call it a bug in that other software. Any hint are welcome. Try to expand the current region Markus M -- Miltinho - m...@rc.unesp.br Laboratório de Ecologia Espacial e Conservação - LEEC Depto de Ecologia - UNESP - Rio Claro Av. 24A, 1515- Bela Vista 13506-900 Rio Claro, SP, Brasil Fone: +55 19 3526-9647 (office) 19 3526-9680 (lab) Cel: 19 9853-3220 / 19 9853-5430 Depto Ecologia http://www.rc.unesp.br/ib/ecologia/ PG ECO BIODIV http://www.rc.unesp.br/ib/ecologia/posbiodiversidade/index.php CV http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4792988H6mostrarNroCitacoesISI=truemostrarNroCitacoesScopus=true Google citations http://scholar.google.com/citations?user=OWX_2eAJ ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.drain problem when flow reach the border
Hi Markus You are right. Thanks for your comments. In fact I don´t thougth on null cell between Source and Target, and agree that extent influences one archive or not a real least cost path solution. Cheers miltinho 2012/12/27, Markus Metz markus.metz.gisw...@gmail.com: On Wed, Dec 26, 2012 at 10:01 PM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Hi Mohamed and Markus Mohamed, thanks for your reply, I will wait for a solution within GRASS :-) Markus, thanks for your reply,. Sorry but I disagree a tiny bit, because is expected that between a source and target I will find a solution with the Least Cost path. Do you think that is there any situation where a least cost between source and target will not be found? Maybe if other software provide the soluction, although is not the bestest option, I prefere receive one complete output than a broken one. Ah, you are right, if the input is output from r.cost, the cost directions should be used. Depending on the input data and the region extents, the least cost path found may not be the real least cost path, but there should be one solution. There are situations where there is no connection between source and target if source and target are separated by NULL cells and no NULL cost is specified to r.cost. Markus M Happy new year! miltinho 2012/12/23, Markus Metz markus.metz.gisw...@gmail.com: On Sun, Dec 23, 2012 at 7:07 PM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Dear all, I am running a least cost path analysis combining r.cost and r.drain. But on some cases, when the least cost path between source and target reach the border of my map, r.drain stop on that position, and target point isn´t reached. This is correct because at the borders, the direction can not be determined, the path could lead out of the current region, you can not tell. Running on other softwares the algorithms the source and target is connected using edges without problem. If in doubt, I would call it a bug in that other software. Any hint are welcome. Try to expand the current region Markus M -- Miltinho - m...@rc.unesp.br Laboratório de Ecologia Espacial e Conservação - LEEC Depto de Ecologia - UNESP - Rio Claro Av. 24A, 1515- Bela Vista 13506-900 Rio Claro, SP, Brasil Fone: +55 19 3526-9647 (office) 19 3526-9680 (lab) Cel: 19 9853-3220 / 19 9853-5430 Depto Ecologia http://www.rc.unesp.br/ib/ecologia/ PG ECO BIODIV http://www.rc.unesp.br/ib/ecologia/posbiodiversidade/index.php CV http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4792988H6mostrarNroCitacoesISI=truemostrarNroCitacoesScopus=true Google citations http://scholar.google.com/citations?user=OWX_2eAJ -- Miltinho - m...@rc.unesp.br Laboratório de Ecologia Espacial e Conservação - LEEC Depto de Ecologia - UNESP - Rio Claro Av. 24A, 1515- Bela Vista 13506-900 Rio Claro, SP, Brasil Fone: +55 19 3526-9647 (office) 19 3526-9680 (lab) Cel: 19 9853-3220 / 19 9853-5430 Depto Ecologia http://www.rc.unesp.br/ib/ecologia/ PG ECO BIODIV http://www.rc.unesp.br/ib/ecologia/posbiodiversidade/index.php CV http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4792988H6mostrarNroCitacoesISI=truemostrarNroCitacoesScopus=true Google citations http://scholar.google.com/citations?user=OWX_2eAJ ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.drain problem when flow reach the border
Hi Mohamed and Markus Mohamed, thanks for your reply, I will wait for a solution within GRASS :-) Markus, thanks for your reply,. Sorry but I disagree a tiny bit, because is expected that between a source and target I will find a solution with the Least Cost path. Do you think that is there any situation where a least cost between source and target will not be found? Maybe if other software provide the soluction, although is not the bestest option, I prefere receive one complete output than a broken one. Happy new year! miltinho 2012/12/23, Markus Metz markus.metz.gisw...@gmail.com: On Sun, Dec 23, 2012 at 7:07 PM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Dear all, I am running a least cost path analysis combining r.cost and r.drain. But on some cases, when the least cost path between source and target reach the border of my map, r.drain stop on that position, and target point isn´t reached. This is correct because at the borders, the direction can not be determined, the path could lead out of the current region, you can not tell. Running on other softwares the algorithms the source and target is connected using edges without problem. If in doubt, I would call it a bug in that other software. Any hint are welcome. Try to expand the current region Markus M -- Miltinho - m...@rc.unesp.br Laboratório de Ecologia Espacial e Conservação - LEEC Depto de Ecologia - UNESP - Rio Claro Av. 24A, 1515- Bela Vista 13506-900 Rio Claro, SP, Brasil Fone: +55 19 3526-9647 (office) 19 3526-9680 (lab) Cel: 19 9853-3220 / 19 9853-5430 Depto Ecologia http://www.rc.unesp.br/ib/ecologia/ PG ECO BIODIV http://www.rc.unesp.br/ib/ecologia/posbiodiversidade/index.php CV http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4792988H6mostrarNroCitacoesISI=truemostrarNroCitacoesScopus=true Google citations http://scholar.google.com/citations?user=OWX_2eAJ ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.drain problem when flow reach the border
Hi Milton, I think this fix will solve the problem[0]. For elevation data there might be cases where no path exists ie, only single pixel is the selected path. I had tested it by myself and it worked. Please apply the patch and let me know. If any problem comes in compilation or doing r.drain let me know. It will be great if you can share the test data you are using in case not working after applying the patch [0] http://trac.osgeo.org/grass/attachment/ticket/1840/r.drain.diff [1] http://trac.osgeo.org/grass/attachment/ticket/1840/drain.c On Thu, Dec 27, 2012 at 2:31 AM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Hi Mohamed and Markus Mohamed, thanks for your reply, I will wait for a solution within GRASS :-) Markus, thanks for your reply,. Sorry but I disagree a tiny bit, because is expected that between a source and target I will find a solution with the Least Cost path. Do you think that is there any situation where a least cost between source and target will not be found? Maybe if other software provide the soluction, although is not the bestest option, I prefere receive one complete output than a broken one. Happy new year! miltinho 2012/12/23, Markus Metz markus.metz.gisw...@gmail.com: On Sun, Dec 23, 2012 at 7:07 PM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Dear all, I am running a least cost path analysis combining r.cost and r.drain. But on some cases, when the least cost path between source and target reach the border of my map, r.drain stop on that position, and target point isn´t reached. This is correct because at the borders, the direction can not be determined, the path could lead out of the current region, you can not tell. Running on other softwares the algorithms the source and target is connected using edges without problem. If in doubt, I would call it a bug in that other software. Any hint are welcome. Try to expand the current region Markus M -- Miltinho - m...@rc.unesp.br Laboratório de Ecologia Espacial e Conservação - LEEC Depto de Ecologia - UNESP - Rio Claro Av. 24A, 1515- Bela Vista 13506-900 Rio Claro, SP, Brasil Fone: +55 19 3526-9647 (office) 19 3526-9680 (lab) Cel: 19 9853-3220 / 19 9853-5430 Depto Ecologia http://www.rc.unesp.br/ib/ecologia/ PG ECO BIODIV http://www.rc.unesp.br/ib/ecologia/posbiodiversidade/index.php CV http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4792988H6mostrarNroCitacoesISI=truemostrarNroCitacoesScopus=true Google citations http://scholar.google.com/citations?user=OWX_2eAJ ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user -- Regards, Rashad ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] r.drain problem when flow reach the border
Dear all, I am running a least cost path analysis combining r.cost and r.drain. But on some cases, when the least cost path between source and target reach the border of my map, r.drain stop on that position, and target point isn´t reached. Running on other softwares the algorithms the source and target is connected using edges without problem. Any hint are welcome. Merry Xmas -- Miltinho - m...@rc.unesp.br Laboratório de Ecologia Espacial e Conservação - LEEC Depto de Ecologia - UNESP - Rio Claro Av. 24A, 1515- Bela Vista 13506-900 Rio Claro, SP, Brasil Fone: +55 19 3526-9647 (office) 19 3526-9680 (lab) Cel: 19 9853-3220 / 19 9853-5430 Depto Ecologia http://www.rc.unesp.br/ib/ecologia/ PG ECO BIODIV http://www.rc.unesp.br/ib/ecologia/posbiodiversidade/index.php CV http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4792988H6mostrarNroCitacoesISI=truemostrarNroCitacoesScopus=true Google citations http://scholar.google.com/citations?user=OWX_2eAJ ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.drain problem when flow reach the border
Hi Milton, I think there is a bug in r.drain direction map calculation. see this thread[0] It may take a day or two to get fixed. I will send you a patch as I cant commit ;) [0] http://lists.osgeo.org/pipermail/grass-user/2012-December/066546.html On Sun, Dec 23, 2012 at 11:37 PM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Dear all, I am running a least cost path analysis combining r.cost and r.drain. But on some cases, when the least cost path between source and target reach the border of my map, r.drain stop on that position, and target point isn´t reached. Running on other softwares the algorithms the source and target is connected using edges without problem. Any hint are welcome. Merry Xmas -- Miltinho - m...@rc.unesp.br Laboratório de Ecologia Espacial e Conservação - LEEC Depto de Ecologia - UNESP - Rio Claro Av. 24A, 1515- Bela Vista 13506-900 Rio Claro, SP, Brasil Fone: +55 19 3526-9647 (office) 19 3526-9680 (lab) Cel: 19 9853-3220 / 19 9853-5430 Depto Ecologia http://www.rc.unesp.br/ib/ecologia/ PG ECO BIODIV http://www.rc.unesp.br/ib/ecologia/posbiodiversidade/index.php CV http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4792988H6mostrarNroCitacoesISI=truemostrarNroCitacoesScopus=true Google citations http://scholar.google.com/citations?user=OWX_2eAJ ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user -- Regards, Rashad ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.drain problem when flow reach the border
On Sun, Dec 23, 2012 at 7:07 PM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Dear all, I am running a least cost path analysis combining r.cost and r.drain. But on some cases, when the least cost path between source and target reach the border of my map, r.drain stop on that position, and target point isn´t reached. This is correct because at the borders, the direction can not be determined, the path could lead out of the current region, you can not tell. Running on other softwares the algorithms the source and target is connected using edges without problem. If in doubt, I would call it a bug in that other software. Any hint are welcome. Try to expand the current region Markus M ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.drain : error message
On Fri, Nov 2, 2012 at 11:13 AM, laurent celati lcel...@latitude-geosystems.com wrote: Hello, I have an error message when i run rdrain. For information i use Grass tools via qgis. I imported a DEM file (32 bit reel/ PCIDSK format .pix /Pixel size x y : 15m) in my Grassdata set. The projection of the DEM file and of the Grass project(location) is UTM 32N Wgs84. When i run r.drain. i have an error message saying : the module has been killed. Which operating system do you use? and which GRASS version? The problem seems come from corrdinates (Map coordinates of starting points). But I have entered UTM coordinates in input. We need to know a bit more about the command you issues. Markus ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] r.drain : error message
Hello, I have an error message when i run rdrain. For information i use Grass tools via qgis. I imported a DEM file (32 bit reel/ PCIDSK format .pix /Pixel size x y : 15m) in my Grassdata set. The projection of the DEM file and of the Grass project(location) is UTM 32N Wgs84. When i run r.drain. i have an error message saying : the module has been killed. The problem seems come from corrdinates (Map coordinates of starting points). But I have entered UTM coordinates in input. Could you throw light for me please? -- View this message in context: http://osgeo-org.1560.n6.nabble.com/r-drain-error-message-tp5013499.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] r.drain
Hi all. I'm testing r.drain, but I cannot get reasonable results over a dtm: the line produced is always much too short, stopping where it seems it should proceed. I exaggerated elevation (*10), as suggested by the manpage, but results were only slightly better. Any suggestion? Thanks. -- http://www.faunalia.it/pc ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.drain
Il giorno gio, 24/03/2011 alle 12.47 +0100, Soeren Gebbert ha scritto: Hi Paolo, try to use r.fill.dir on the elevation map with ~3 - 4 runs before you use r.drain. Thanks Soeren, that improved the results considerably. It would be good to have an option to set the level of filling (by recursion, if nothing better is available). All the best. -- http://www.faunalia.it/pc ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] r.drain indir option
Hi, Is it possible to substitute a 'direction' raster generated from a module other than r.cost, when using the 'indir' option for r.drain? This is for GRASS65. Specifically, I would like to compute a least-cost path based on a friction surface AND direction map. Is this possible? Thanks, Dylan ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
RE: [GRASS-user] r.drain documentation - updated
Stefano: On the other hand I can't understand why in the man page the section entitled BUG says: r.drain currently finds only the lowest point (the cell having the smallest category value) in the input file that can be reached through directly adjacent cells that are less than or equal in value to the cell reached immediately prior to it; therefore, it will not necessarily reach the lowest point in the input file. It currently finds pits in the data, rather than the lowest point present.. Why would a local search be a bug in this case? I think it should be like that by design... Hamish: It is like that by design so really a feature not a bug. The man page should mention you could fill pits first with a module like r.fill.dir or r.terraflow if you want that. (the first is listed in the see also section but not explained AFAICS) I've moved this section from 'Bugs' to 'Notes' to reflect the fact that it is a feature of the module. There was already mention of using r.fill.dir and r.basins.fill for filling local pits, and I've included a mention of r.terraflow in the 'Notes' section and under 'See Also'. I added a section in 'Notes' warning the user about running r.drain on region boundary points, including the part Maris mentioned from the source code in his post. For now the warning is under 'Notes', as I didn't really think is was a bug per se, more of a limitation of the module. I added a hint about using g.region to tweak the region to allow r.drain to find an outlet away from the region boundary. ~ Eric. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] r.drain documentation
Hello everybody, I'm a bit confused about r.drain (I'm working with Debian's backport version 6.2.1). I have noticed that if you give as input in the coordinate parameter a point that stands on the region's edge, r.drain won't move from there: it would output a map with that same single point. Is this a bug? On the other hand I can't understand why in the man page the section entitled BUG says: r.drain currently finds only the lowest point (the cell having the smallest category value) in the input file that can be reached through directly adjacent cells that are less than or equal in value to the cell reached immediately prior to it; therefore, it will not necessarily reach the lowest point in the input file. It currently finds pits in the data, rather than the lowest point present.. Why would a local search be a bug in this case? I think it should be like that by design... I'm not too sure my understanding is correct. What do you think? Thanks a lot in advance, Stefano. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.drain documentation
Stefano Negri wrote: I'm a bit confused about r.drain (I'm working with Debian's backport version 6.2.1). I have noticed that if you give as input in the coordinate parameter a point that stands on the region's edge, r.drain won't move from there: it would output a map with that same single point. Is this a bug? feature. On the other hand I can't understand why in the man page the section entitled BUG says: r.drain currently finds only the lowest point (the cell having the smallest category value) in the input file that can be reached through directly adjacent cells that are less than or equal in value to the cell reached immediately prior to it; therefore, it will not necessarily reach the lowest point in the input file. It currently finds pits in the data, rather than the lowest point present.. Why would a local search be a bug in this case? I think it should be like that by design... It is like that by design so really a feature not a bug. The man page should mention you could fill pits first with a module like r.fill.dir or r.terraflow if you want that. (the first is listed in the see also section but not explained AFAICS) I'm not too sure my understanding is correct. What do you think? You are right I think. My understanding is that it works by starting at the given point and looking for the most downhill cell around it. Then it moves to that cell and looks for the most downhill cell around that. And so on until it can go no further. If your starting cell is only surrounded by cells of higher value (you start in a pit) then it won't move. By being on the edge of the region you have cut down on the numbers of cells around your starting point so there is less chances for finding an outlet point. Zoom right in on the DEM and explore with d.rast.num to confirm. Hamish Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.drain documentation
Thanks for your answers Eric and Hamish. I had already made sure with d.rast.num and I have double checked now on a toy map (a slope on a 100x100 grid): even if there are lower value cells beside a border cell, it won't move from there. Stefano. 2008/2/15, Hamish [EMAIL PROTECTED]: Stefano Negri wrote: I'm a bit confused about r.drain (I'm working with Debian's backport version 6.2.1). I have noticed that if you give as input in the coordinate parameter a point that stands on the region's edge, r.drain won't move from there: it would output a map with that same single point. Is this a bug? feature. On the other hand I can't understand why in the man page the section entitled BUG says: r.drain currently finds only the lowest point (the cell having the smallest category value) in the input file that can be reached through directly adjacent cells that are less than or equal in value to the cell reached immediately prior to it; therefore, it will not necessarily reach the lowest point in the input file. It currently finds pits in the data, rather than the lowest point present.. Why would a local search be a bug in this case? I think it should be like that by design... It is like that by design so really a feature not a bug. The man page should mention you could fill pits first with a module like r.fill.dir or r.terraflow if you want that. (the first is listed in the see also section but not explained AFAICS) I'm not too sure my understanding is correct. What do you think? You are right I think. My understanding is that it works by starting at the given point and looking for the most downhill cell around it. Then it moves to that cell and looks for the most downhill cell around that. And so on until it can go no further. If your starting cell is only surrounded by cells of higher value (you start in a pit) then it won't move. By being on the edge of the region you have cut down on the numbers of cells around your starting point so there is less chances for finding an outlet point. Zoom right in on the DEM and explore with d.rast.num to confirm. Hamish Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
RE: [GRASS-user] r.drain documentation
I'm a bit confused about r.drain (I'm working with Debian's backport version 6.2.1). I have noticed that if you give as input in the coordinate parameter a point that stands on the region's edge, r.drain won't move from there: it would output a map with that same single point. Is this a bug? On the other hand I can't understand why in the man page the section entitled BUG says: r.drain currently finds only the lowest point (the cell having the smallest category value) in the input file that can be reached through directly adjacent cells that are less than or equal in value to the cell reached immediately prior to it; therefore, it will not necessarily reach the lowest point in the input file. It currently finds pits in the data, rather than the lowest point present.. Why would a local search be a bug in this case? I think it should be like that by design... I'm not too sure my understanding is correct. What do you think? Thanks a lot in advance, Stefano. My short answer is I don't know; but I can try to have a look at the module and try to figure out what is happening...I've never used it before, so it will take some trial-and-error to figure. Alternatively, if anyone listening is familiar with r.drain and can previde some hints, I'll certainly update the manpage. ~ Eric. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.drain documentation
Hi, You are right - r.drain will NOT give sane results at region boundary. Here is snippet from filldir.c:107: /* determine the flow direction in each cell. On outer rows and columns * the flow direction is always directly out of the map */ It's a questionable what action r.drain should take if draining process reaches map/region edge and there are reasonable arguments that support current behaviour. Definitely it must be reflected in documentation and probably there could be printed some warning if draining process fails over the edge :) Maris. 2008/2/16, stefano negri [EMAIL PROTECTED]: Thanks for your answers Eric and Hamish. I had already made sure with d.rast.num and I have double checked now on a toy map (a slope on a 100x100 grid): even if there are lower value cells beside a border cell, it won't move from there. Stefano. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user