Drain dir with net_fixed

12 views
Skip to first unread message

Niccolo Tubini

unread,
May 20, 2020, 3:29:50 AM5/20/20
to jgrasstools
Hi All,

I am trying to create the map of the drainage directions using the method net_fixed otherwise I am not able to extract the network and the mask of my basin.
Unfortunaltely I do not understand how to use the net_fixed option, and specifically how to create the map containing the drainage directions along the network. I have a raster map of the network that I obtained rasterzing the shapefile of the network but I have no idea on how to define the drainage directions along the network. I tried with the rastermap calculator to combining the raster map of the network and the map of flow directions but this did not fix the probelm. I think this is not the right way since there is a problem with the topography and this pass through the flow directions map.

Any suggestions are welcome,
thanks in advance.
Best,
Niccolò



Silvia Franceschi

unread,
May 21, 2020, 12:24:28 PM5/21/20
to jgras...@googlegroups.com
Dear Niccolò,
creating a raster map of the drainage directions along the network is
something that really depend on the tools you and the GIS you usually
use. The tool is based on the concept that usually the real network
differ in small parts from the one extracted from the DTM so, what I
do is:
- extract the drainage directions of the DTM
- extract the network based on the DTM
- cut the drainage directions on the network
- edit the parts of the new map where I want to modify something

There is a tool in the HortonMachine which can help doing some macro
changes in the DTM in order to obtain a network similar to the real
one. This tool is called BobTheBuilder.

This is what I usually do when I have to provide the map of the
drainage directions along the network, but this is absolutely
something one have to think considering the specific use case and the
available tools.

Hope this helps.

Silvia
> --
> You received this message because you are subscribed to the Google Groups "jgrasstools" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jgrasstools...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jgrasstools/35d5f603-de75-4d46-905a-4ec22749eab2%40googlegroups.com.



--
ing. Silvia Franceschi
Via Roma, 64
38030 Castello di Fiemme (TN)

tel: 0039 -3384501332

Niccolo Tubini

unread,
May 22, 2020, 2:54:05 PM5/22/20
to jgras...@googlegroups.com
Dear Silvia,
my problem is with the Fersina in Trento I have problem to extract the network from ponte Cornicchio and the Adige.
I look at BobTheBuilder (it is very nice) but I do not know how to modify the DEM. So, following your suggestion I cut the flow direction map with the network of the Province and manually changed the values of the drainage directions. To cope with this task I used the Serval plugin in QGIS.
I tried to run the drain dir component in OMS with the LTD model and providing the raster map of the flow direction defined along the network. And I got this  error

>>>> Error: Exception in component 'org.jgrasstools.hortonmachine.modules.geomorphology.draindir.OmsDrainDir@20bd8be5':
java.lang.ArrayIndexOutOfBoundsException: -1
at com.sun.media.jai.iterator.RandomIterFallback.makeCurrent(RandomIterFallback.java:103)
at com.sun.media.jai.iterator.RandomIterFallback.getSampleDouble(RandomIterFallback.java:133)
at org.jgrasstools.hortonmachine.modules.geomorphology.draindir.OmsDrainDir.newDirections(OmsDrainDir.java:651)
at org.jgrasstools.hortonmachine.modules.geomorphology.draindir.OmsDrainDir.process(OmsDrainDir.java:184)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at oms3.Utils$1.invoke(Utils.java:129)
at oms3.ComponentAccess.exec(ComponentAccess.java:190)
at oms3.Controller$2.run(Controller.java:527)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

All the raster map I used have the same number of cells, the header of the asc file is always the same. I tried also within gvsig and I got the same error.

The problem is only when I provide the inFlowNet map

Thanks in advance,
Niccolò

Silvia Franceschi

unread,
May 23, 2020, 12:39:39 PM5/23/20
to jgras...@googlegroups.com
Ciao Niccolò,
I think that you have some drainage directions that goes in an
opposite way between the two maps... there are some inconsistencies in
the map of the drainage directions cut on the net.
Try to check it and maybe start with less modifications and add some
others step by step.
Please use the last version of the HortonMAchine library available on
the website.

Silvia
> To view this discussion on the web visit https://groups.google.com/d/msgid/jgrasstools/CAEixok_sY4QjvQ37rbtK8%2BcKV_me%2BjMehUnX0Yn98SyrfnuTUQ%40mail.gmail.com.

Niccolo Tubini

unread,
May 25, 2020, 2:44:04 AM5/25/20
to jgras...@googlegroups.com
Ciao Silvia,
ok I'll try!
Thank you very much

niccolò

Reply all
Reply to author
Forward
0 new messages