###### tags: `h2beaver` h2beaver temp note === # Note In `~/h2beaver-public-y56/catchment-generator`, I have ```= -rw-rw-r-- 1 y56 y56 3482 五 25 02:56 App.py drwxrwxr-x 2 y56 y56 4096 五 25 02:56 catchment/ drwxrwxr-x 5 y56 y56 4096 五 25 04:53 catchment-yilan-vector/ -rw-rw-r-- 1 y56 y56 393 五 25 06:36 Dockerfile drwxrwxr-x 8 y56 y56 4096 五 25 02:56 .git/ -rw-rw-r-- 1 y56 y56 14 五 25 02:56 .gitignore -rwxrwxrwx 1 y56 y56 1964 五 25 03:51 maven-release-poc.txt* -rw-rw-r-- 1 y56 y56 8042 五 25 06:39 note.md -rw-rw-r-- 1 y56 y56 4117 五 25 03:51 README.md drwxrwxr-x 5 y56 y56 4096 五 25 04:49 river-yilan-vector/ drwxrwxr-x 5 y56 y56 4096 五 25 04:49 terrain-taiwan-raster_20m/ drwxrwxr-x 2 y56 y56 4096 五 25 02:56 tests/ ``` And a `storage` dir, parallel to `catchment-generator` dir ## Docker --- DONE We need `sudo`. If want to get rid of sudo, read https://docs.docker.com/install/linux/linux-postinstall/ Execute `sudo docker build -t catchment-generator .` Get ```= Sending build context to Docker daemon 498.7MB Step 1/5 : FROM mundialis/grass-gis-stable ---> 8ef9afda02c9 Step 2/5 : WORKDIR /app ---> Using cache ---> 96b4a7d108b5 Step 3/5 : ADD ./ /app ---> 2fc5678859cb Step 4/5 : ENTRYPOINT ["python"] ---> Running in 54b660a37a4a Removing intermediate container 54b660a37a4a ---> b87e4d41365d Step 5/5 : CMD ["-V"] ---> Running in 3b4346684337 Removing intermediate container 3b4346684337 ---> 9fa2ac34936e Successfully built 9fa2ac34936e Successfully tagged catchment-generator:latest ``` The `Dockfile` contains infomation needed for Docker to build. I don't know how to write a dockfile ## Register --- DONE Register new user (or login) in our h2beaver GitLab: https://140.124.61.32/ (may need to use Chrome or other brower allow in-secure https connection) Done before. ## ssh key --- DONE prepare ssh-tunnel to be able to access Follow https://140.124.61.32/help/ssh/README#generating-a-new-ssh-key-pair Command `ssh -T git@140.124.61.32` succeed. ```Welcome to GitLab, @y56!``` ## Cloning data --- DONE Clone the 3 repos into local I put the three into `catchment-generator/`, by clone, with ssh https://140.124.61.32/h2beaver/terrain-taiwan-raster_20m https://140.124.61.32/h2beaver/river-yilan-vector https://140.124.61.32/h2beaver/catchment-yilan-vector ## Linux command --- DONE Try to do `ssh dev-user@140.124.61.32 -L8088:localhost:8088` ### ~~try_1, using 'git', fail~~ ~~`ssh git@140.124.61.32 -L8088:localhost:8088`~~ > ~~PTY allocation request failed on channel 2~~ > ~~Welcome to GitLab, @y56!~~ > ~~Connection to 140.124.61.32 closed.~~ > ~~bind: Address already in use~~ > ~~channel_setup_fwd_listener_tcpip: cannot listen to port: 8088~~ > ~~Could not request local forwarding.~~ > ~~PTY allocation request failed on channel 0~~ > ~~Welcome to GitLab, @y56!~~ > ~~Connection to 140.124.61.32 closed.~~ ### ~~try_2, using 'y56', fail~~ ~~`ssh y56@140.124.61.32 -L8088:localhost:8088`~~ ~~It asks me for password. I use the one by which I can log into `140.124.61.32` as `y56`. (Many checks. No typo.) But FAIL! QQ. I also tried blank, fail.~~ ~~Server knows I am y56. So the ssh key does work. But no interactive shell for me.~~ ### try_3, literally using 'dev-user', fail, QQ, DONE `ssh dev-user@140.124.61.32 -L8088:localhost:8088` It asks me for password. I tried blank, fail. GOOD. I got the password. ### some other learning notes #### ssh -L ```= -L [bind_address:]port:host:hostport -L [bind_address:]port:remote_socket -L local_socket:host:hostport -L local_socket:remote_socket Specifies that connections to the given TCP port or Unix socket on the local (client) host are to be forwarded to the given host and port, or Unix socket, on the remote side. This works by allocating a socket to listen to either a TCP port on the local side, optionally bound to the specified bind_address, or to a Unix socket. Whenever a connection is made to the local port or socket, the connection is forwarded over the secure channel, and a connection is made to either host port hostport, or the Unix socket remote_socket, from the remote machine. Port forwardings can also be specified in the configuration file. Only the superuser can forward privileged ports. IPv6 addresses can be specified by enclosing the address in square brackets. By default, the local port is bound in accordance with the GatewayPorts setting. However, an explicit bind_address may be used to bind the connection to a specific address. The bind_address of “localhost” indicates that the listening port be bound for local use only, while an empty address or ‘*’ indicates that the port should be available from all interfaces. ``` #### 8088 port 8088 #Radan http https://serverfault.com/questions/398462/what-is-radan-http for use for proxies (along with 8000, 8080, 8888) #### ssh -T ` -T Disable pseudo-terminal allocation.` https://stackoverflow.com/questions/17900760/what-is-pseudo-tty-allocation-ssh-and-github ## Step 5: try to access `http://localhost:8088` --- DONE try access: http://localhost:8088, the 'Welcome to Apache Archiva' page ### ~~fail~~ ~~I have to run a container first.~~ ~~No, `http://localhost:8088` is not from docker, it is from ssh.~~ ### interesting discovory Since I used `nginx` previously to test whether my docker is workinhg well, the `http://localhost:8088` is somehow occupied by nginx's webpage. This continues to happend on both Google Chrome and Firefox. However, by using a incogniton/private page, I can reach the `Welcome to Apache Archiva` page. And this still happens after I did `docker rmi` to remove the image of `nginx` (of courese no containers are running, checked by `docker container ls`) Before `ssh dev-user@140.124.61.32 -L8088:localhost:8088`, I have `This site can’t be reached` `localhost refused to connect`, but after I ssh, a normal page shows `ngnic` page and a incogniton page shows `Welcome to Apache Archiva` page. ![](https://i.imgur.com/du6S85A.png) #### ~~fail 1~~ ~~`sudo docker run -d -p 80:80 --name webserver002 catchment-generator`~~ ~~`569f8f944ea7d7773aeb2efb8f4bd09aa45ea315ab4b3be91c3da51dd759523c`~~ #### ~~fail 2~~ ~~`sudo docker run catchment-generator`~~ ~~`Python 2.7.15rc1`~~ ### useful commands #### `sudo docker container list` ```= CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES ``` So... I am not running any containers. #### `sudo docker images` ```= REPOSITORY TAG IMAGE ID CREATED SIZE catchment-generator latest 8f4ee3d4231a 2 minutes ago 1.94GB <none> <none> 26e40f96fd8f 43 minutes ago 1.94GB <none> <none> 889561880be9 3 hours ago 1.45GB mundialis/grass-gis-stable latest 8ef9afda02c9 5 days ago 1.45GB nginx latest 53f3fd8007f7 2 weeks ago 109MB hello-world latest fce289e99eb9 4 months ago 1.84kB ``` #### try editing Dockfile `#` is for command in dockfiles. I try to enable `EXPOSE 80`. So I modify the dockfile into ```dockerfile= # # FROM lisastillwell/py-grass FROM mundialis/grass-gis-stable # Container working directory /app WORKDIR /app # clone ./ into container /app ADD ./ /app # Python2.7 requirements.txt #RUN pip install -r requirements.txt # Expose port EXPOSE 80 # Environment variable #ENV NAME World ENTRYPOINT ["python"] # Run CMD when container start app.py CMD ["-V"] #CMD ["python","example.py"] ``` build again and try the belows ```= Sending build context to Docker daemon 498.7MB Step 1/6 : FROM mundialis/grass-gis-stable ---> 8ef9afda02c9 Step 2/6 : WORKDIR /app ---> Using cache ---> 96b4a7d108b5 Step 3/6 : ADD ./ /app ---> Using cache ---> edd547f85003 Step 4/6 : EXPOSE 80 ---> Using cache ---> 4e318a451fd5 Step 5/6 : ENTRYPOINT ["python"] ---> Using cache ---> 898c76dd075c Step 6/6 : CMD ["-V"] ---> Using cache ---> 8f4ee3d4231a Successfully built 8f4ee3d4231a Successfully tagged catchment-generator:latest ``` ##### fail 1 `sudo docker run -d -p 80:80 --name webserver001 catchment-generator` `70e3b34cd9e6f02418264cdf735c33acc0c1417053517dff428ae30d3d743820` ##### fail 2 `sudo docker run catchment-generator` `Python 2.7.15rc1` #### BTW I once used `docker run -d -p 80:80 --name webserver nginx` to test. With ``` CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 1089912c7ae8 nginx "nginx -g 'daemon of…" 23 minutes ago Up 23 minutes 0.0.0.0:8088->80/tcp webserver ``` And `http://localhost:8088` works. ## Step 6: DONE create a settings.xml file in ~/.m2, to store archiva username and password They are **literally** `h2` and `h2password`. ```xml= <settings> <servers> <server> <id>archiva.internal</id> <username>h2</username> <password>h2password</password> </server> <server> <id>archiva.snapshots</id> <username>h2</username> <password>h2password</password> </server> </servers> </settings> ``` ## Step 7: DONE > goto terrain-taiwan-raster_20m folder > update version defined in pom.xml to 2016-1-{some number not use yet} > run the command: > mvn deploy > > after deploy, the new version should be added into archiva, can be checked in this url: > http://localhost:8088/#artifact/h2beaver/terrain-taiwan-raster_20m ### 1 `mvn install` in `catchment-generator/river-yilan-vector` OK ### 2 - edit `catchment-generator/catchment-yilan-vector/assembly/h2.xml` to uncomment the section - `mvn install` in `catchment-generator/catchment-yilan-vector` - OK ### 3 - edit `catchment-generator/terrain-taiwan-raster_20m/pom.xml` into ```xml= <groupId>h2beaver</groupId> <artifactId>terrain-taiwan-raster_20m</artifactId> <version>2016-1-1</version> ``` - Run `mvn deploy` in `catchment-generator/terrain-taiwan-raster_20m` - I create `2016-1-1-TEST` and `2016-1-1` as tests. OK ## Step 8: DONE > goto catchment-yilan-vector folder > update dependency version of terrain-taiwan-raster_20m to the new version of Step 7 > run the command: > mvn clean compile > ### - change `catchment-generator/catchment-yilan-vector/pom.xml` into ```= <groupId>h2beaver</groupId> <artifactId>terrain-taiwan-raster_20m</artifactId> <version>2016-1-1-TEST</version> ``` - `mvn clean compile` OK ## Step 9: YET > try to use QGIS or other GIS to show the two layers: > catchment-yilan-vector/workspace/river-yilan-vector-resources-zip/river.geojson > catchment-yilan-vector/workspace/h2_basin.geojson Can't find `catchment-yilan-vector/workspace/h2_basin.geojson` :::info go back to **step 8** `mvn clean compile` edit the ` catchment-generator/catchment-yilan-vector/scripts/run-catchment-generator.sh ` from ```bash=12 echo "docker run -v $ABSOLUTE_UNPACK_DATAPATH:/storage catchment-generator App.py -d $TERRAIN_FILENAME -c $RIVER_FILENAME -b \"$BOUND\" $*" docker run -v $ABSOLUTE_UNPACK_DATAPATH:/storage catchment-generator App.py -d $TERRAIN_FILENAME -c $RIVER_FILENAME -b "$BOUN D" $* ``` into ```bash=12 echo "sudo docker run -v $ABSOLUTE_UNPACK_DATAPATH:/storage catchment-generator App.py -d $TERRAIN_FILENAME -c $RIVER_FILENAME -b \"$BOUND\" $*" sudo docker run -v $ABSOLUTE_UNPACK_DATAPATH:/storage catchment-generator App.py -d $TERRAIN_FILENAME -c $RIVER_FILENAME -b "$BOUN D" $* ``` QQ stopping at ```bash [INFO] Executing tasks main: [sudo] password for y56: [exec] sudo docker run -v /home/y56/h2beaver-public-y56/catchment-generator/catchment-yilan-vector/workspace:/storage catchment-generator App.py -d terrain-taiwan-raster_20m-resources-zip/dem_20m.tif -c river-yilan-vector-resources-zip/river.geojson -b "2721707;2704385;305588;285588" -p h2 -h 30 -w 200 ``` I don't know how/when to keyin my passwork. Anyway, after some random tries, the `sudo` catches my password. (It seems like I successfully execute `sudo` and get my privilege before I execute `mvn clean compile`.) ::: :::info To reduce the size of computaion, I try to shrink the input area. from ```bash= echo "sudo docker run -v $ABSOLUTE_UNPACK_DATAPATH:/storage catchment-generator App.py -d $TERRAIN_FILENAME -c $RIVER_FILENAME -b \"$BOUND\" $*" sudo docker run -v $ABSOLUTE_UNPACK_DATAPATH:/storage catchment-generator App.py -d $TERRAIN_FILENAME -c $RIVER_FILENAME -b "$BOUND" $* ``` to ```bash= echo "sudo docker run -v $ABSOLUTE_UNPACK_DATAPATH:/storage catchment-generator App.py -d $TERRAIN_FILENAME -c $RIVER_FILENAME -b \"2721707;2714385;305588;295588\" $*" sudo docker run -v $ABSOLUTE_UNPACK_DATAPATH:/storage catchment-generator App.py -d $TERRAIN_FILENAME -c $RIVER_FILENAME -b "2721707;2714385;305588;295588" $* ``` My `mvn clean install` gives me ``` WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release [INFO] Scanning for projects... [INFO] [INFO] ------------------< h2beaver:catchment-yilan-vector >------------------- [INFO] Building Test to use maven to pack data 1.1-SNAPSHOT [INFO] --------------------------------[ pom ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ catchment-yilan-vector --- [INFO] Deleting /home/y56/h2beaver-public-y56/catchment-generator/catchment-yilan-vector/target [INFO] Deleting /home/y56/h2beaver-public-y56/catchment-generator/catchment-yilan-vector/workspace (includes = [], excludes = []) [INFO] [INFO] --- maven-dependency-plugin:3.1.1:unpack-dependencies (unpack-dependencies) @ catchment-yilan-vector --- [INFO] Unpacking /home/y56/.m2/repository/h2beaver/terrain-taiwan-raster_20m/2016-1-1-TEST/terrain-taiwan-raster_20m-2016-1-1-TEST-resources.zip to /home/y56/h2beaver-public-y56/catchment-generator/catchment-yilan-vector/workspace/terrain-taiwan-raster_20m-resources-zip with includes "" and excludes "" [INFO] Unpacking /home/y56/.m2/repository/h2beaver/river-yilan-vector/20190430-SNAPSHOT/river-yilan-vector-20190430-SNAPSHOT-resources.zip to /home/y56/h2beaver-public-y56/catchment-generator/catchment-yilan-vector/workspace/river-yilan-vector-resources-zip with includes "" and excludes "" [INFO] [INFO] --- maven-antrun-plugin:1.8:run (catchment-generation) @ catchment-yilan-vector --- [WARNING] Parameter tasks is deprecated, use target instead [INFO] Executing tasks main: [exec] sudo docker run -v /home/y56/h2beaver-public-y56/catchment-generator/catchment-yilan-vector/workspace:/storage catchment-generator App.py -d terrain-taiwan-raster_20m-resources-zip/dem_20m.tif -c river-yilan-vector-resources-zip/river.geojson -b "2721707;2714385;305588;295588" -p h2 -h 30 -w 200 [exec] Over-riding projection check [exec] Importing raster map <h2_dem>... [exec] 100% [exec] projection: 99 (TWD97 / TM2 zone 121) [exec] zone: 0 [exec] datum: towgs84=0,0,0,0,0,0,0 [exec] ellipsoid: grs80 [exec] north: 2801730 [exec] south: 2419490 [exec] west: 148310 [exec] east: 351810 [exec] nsres: 20 [exec] ewres: 20 [exec] rows: 19112 [exec] cols: 10175 [exec] cells: 194464600 [exec] Check if OGR layer <river> contains polygons... [exec] 100% [exec] Creating attribute table for layer <river>... [exec] Importing 9769 features (OGR layer <river>)... [exec] 100% [exec] ----------------------------------------------------- [exec] Building topology for vector map <h2_input_channel@PERMANENT>... [exec] Registering primitives... [exec] [exec] Reading raster map... 100% [exec] Processing lines... ``` And run over 10 min without stop. ::: ## Try to fix - `git checkout b17e9ab887308e2b8cbc7a3f48dba6a5244c416e` in `catchment-generator` ```bash= y56@y56-X450JF:~/h2beaver-public-y56/catchment-generator$ git status HEAD detached at b17e9ab Untracked files: (use "git add <file>..." to include in what will be committed) catchment-yilan-vector/ river-yilan-vector/ terrain-taiwan-raster_20m/ nothing added to commit but untracked files present (use "git add" to track) ``` - `sudo docker build -t catchment-generator .` in `catchment-generator` ```bash= Sending build context to Docker daemon 1.1GB Step 1/5 : FROM mundialis/grass-gis-stable ---> 8ef9afda02c9 Step 2/5 : WORKDIR /app ---> Using cache ---> 96b4a7d108b5 Step 3/5 : ADD ./ /app ---> b0a55397229c Step 4/5 : ENTRYPOINT ["python"] ---> Running in a69155784a53 Removing intermediate container a69155784a53 ---> 8bdbba268ee5 Step 5/5 : CMD ["-V"] ---> Running in 4d5c35af8068 Removing intermediate container 4d5c35af8068 ---> 8e5673d7001c Successfully built 8e5673d7001c Successfully tagged catchment-generator:latest ``` - `mvn install` in `catchment-generator/river-yilan-vector` ```bash= WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release [INFO] Scanning for projects... [INFO] [INFO] --------------------< h2beaver:river-yilan-vector >--------------------- [INFO] Building River geojson of 蘭陽溪 20190430-SNAPSHOT [INFO] --------------------------------[ pom ]--------------------------------- [INFO] [INFO] --- maven-assembly-plugin:2.2-beta-5:single (create-distribution) @ river-yilan-vector --- [INFO] Reading assembly descriptor: assembly/h2.xml [INFO] Building zip: /home/y56/h2beaver-public-y56/catchment-generator/river-yilan-vector/target/river-yilan-vector-20190430-SNAPSHOT-resources.zip [INFO] [INFO] --- maven-install-plugin:2.4:install (default-install) @ river-yilan-vector --- [INFO] Installing /home/y56/h2beaver-public-y56/catchment-generator/river-yilan-vector/pom.xml to /home/y56/.m2/repository/h2beaver/river-yilan-vector/20190430-SNAPSHOT/river-yilan-vector-20190430-SNAPSHOT.pom [INFO] Installing /home/y56/h2beaver-public-y56/catchment-generator/river-yilan-vector/target/river-yilan-vector-20190430-SNAPSHOT-resources.zip to /home/y56/.m2/repository/h2beaver/river-yilan-vector/20190430-SNAPSHOT/river-yilan-vector-20190430-SNAPSHOT-resources.zip [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.340 s [INFO] Finished at: 2019-05-29T17:19:19+08:00 [INFO] ------------------------------------------------------------------------ ``` - `mvn install` in `catchment-generator/catchment-yilan-vector`, with my `catchment-generator/catchment-yilan-vector/assembly/h2.xml` having no comment-to-ignore section ```bash= WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release [INFO] Scanning for projects... [INFO] [INFO] ------------------< h2beaver:catchment-yilan-vector >------------------- [INFO] Building Test to use maven to pack data 1.1-SNAPSHOT [INFO] --------------------------------[ pom ]--------------------------------- [INFO] [INFO] --- maven-dependency-plugin:3.1.1:unpack-dependencies (unpack-dependencies) @ catchment-yilan-vector --- [INFO] Unpacking /home/y56/.m2/repository/h2beaver/terrain-taiwan-raster_20m/2016-1-1-TEST/terrain-taiwan-raster_20m-2016-1-1-TEST-resources.zip to /home/y56/h2beaver-public-y56/catchment-generator/catchment-yilan-vector/workspace/terrain-taiwan-raster_20m-resources-zip with includes "" and excludes "" [INFO] Unpacking /home/y56/.m2/repository/h2beaver/river-yilan-vector/20190430-SNAPSHOT/river-yilan-vector-20190430-SNAPSHOT-resources.zip to /home/y56/h2beaver-public-y56/catchment-generator/catchment-yilan-vector/workspace/river-yilan-vector-resources-zip with includes "" and excludes "" [INFO] h2beaver:terrain-taiwan-raster_20m:zip:resources:2016-1-1-TEST already exists in destination. [INFO] [INFO] --- maven-antrun-plugin:1.8:run (catchment-generation) @ catchment-yilan-vector --- [WARNING] Parameter tasks is deprecated, use target instead [INFO] Executing tasks main: [exec] sudo docker run -v /home/y56/h2beaver-public-y56/catchment-generator/catchment-yilan-vector/workspace:/storage catchment-generator App.py -d terrain-taiwan-raster_20m-resources-zip/dem_20m.tif -c river-yilan-vector-resources-zip/river.geojson -b "2721707;2714385;305588;295588" -p h2 -h 30 -w 200 [exec] Over-riding projection check [exec] Importing raster map <h2_dem>... [exec] 100% [exec] projection: 99 (TWD97 / TM2 zone 121) [exec] zone: 0 [exec] datum: towgs84=0,0,0,0,0,0,0 [exec] ellipsoid: grs80 [exec] north: 2801730 [exec] south: 2419490 [exec] west: 148310 [exec] east: 351810 [exec] nsres: 20 [exec] ewres: 20 [exec] rows: 19112 [exec] cols: 10175 [exec] cells: 194464600 [exec] Check if OGR layer <river> contains polygons... [exec] 100% [exec] Creating attribute table for layer <river>... [exec] Importing 9769 features (OGR layer <river>)... [exec] 100% [exec] ----------------------------------------------------- [exec] Building topology for vector map <h2_input_channel@PERMANENT>... [exec] Registering primitives... [exec] [exec] Reading raster map... 100% [exec] Processing lines... [exec] 100% [exec] Writing raster map... [exec] Reading input elevation raster map... [exec] 100% [exec] Filling sinks... [exec] Determining flow directions for ambiguous cases... [exec] Found 68 unresolved areas [exec] Repeat to get the final directions... [exec] Found 1 unresolved area [exec] Writing output raster maps... [exec] 100% [exec] SECTION 1a (of 5): Initiating Memory. [exec] SECTION 1b (of 5): Determining Offmap Flow. [exec] 100% [exec] SECTION 2: A* Search. [exec] 100% [exec] SECTION 3a: Accumulating Surface Flow with MFD. [exec] 100% [exec] SECTION 3b: Adjusting drainage directions. [exec] 100% [exec] SECTION 4: Watershed determination. [exec] 100% [exec] SECTION 5: Closing Maps. [exec] 100% [exec] Extracting areas... [exec] 100% [exec] Writing areas... [exec] 100% [exec] Building topology for vector map <h2_bas_v@PERMANENT>... [exec] Registering primitives... [exec] [exec] Building areas... 100% [exec] Attaching islands... [exec] 100% [exec] Attaching centroids... [exec] 100% [exec] r.to.vect complete. [exec] Exporting 3 areas (may take some time)... [exec] 100% [exec] v.out.ogr complete. 3 features (Polygon type) written to <h2_bas_v> [exec] (GeoJSON format). [exec] Extracting areas... [exec] 100% [exec] Writing areas... [exec] 100% [exec] Building topology for vector map <h2_str_v@PERMANENT>... [exec] Registering primitives... [exec] [exec] Building areas... 100% [exec] Attaching islands... [exec] 100% [exec] Attaching centroids... [exec] 100% [exec] r.to.vect complete. [exec] ['-d', 'terrain-taiwan-raster_20m-resources-zip/dem_20m.tif', '-c', 'river-yilan-vector-resources-zip/river.geojson', '-b', '2721707;2714385;305588;295588', '-p', 'h2', '-h', '30', '-w', '200'] [exec] terrain-taiwan-raster_20m-resources-zip/dem_20m.tif [exec] river-yilan-vector-resources-zip/river.geojson [exec] 2721707;2714385;305588;295588 [exec] h2 [exec] 30 [exec] 200 [exec] Initializing a computational session [exec] ['grass', '-c', 'epsg: 3826', '-e', '/tmp/grassdata/c2bf6b7775bba0cc8cb0e24cda2cd63c'] [exec] Created location /tmp/grassdata/c2bf6b7775bba0cc8cb0e24cda2cd63c [exec] ================== [exec] Process: import DEM to GRASS [exec] ================== [exec] Process: set computational boundary [exec] ================== [exec] Process: dig_preset_channel [exec] ================== [exec] Process: DEM fill-dir algorithm [exec] ================== [exec] Process: generate Catchment (global mode)... [exec] Given Threshold: 30000.000000 [exec] Given Max_Slope_length: 1000.000000 [exec] [exec] ================== [exec] Exporting Geojson [exec] Adding CRS tag and value (EPSG:3826) to basin geojson [exec] Exporting stream Geojson [exec] Adding CRS tag and value (EPSG:3826) to stream geojson [exec] Exporting GeoJSON process done! [exec] Processed Basin data: h2_basin.geojson is writen [exec] Done! [exec] This session costs 53.670292 sec [exec] WARNING: 199 boundaries found, but not requested to be exported. Verify [exec] 'type' parameter. [exec] WARNING: 100 centroids found, but not requested to be exported. Verify [exec] 'type' parameter. [exec] WARNING: 100 areas found, but not requested to be exported. Verify 'type' [exec] parameter. [exec] WARNING: No lines found, but requested to be exported. Will skip this [exec] feature type. [exec] Exporting 0 features... [exec] 100% [exec] WARNING: Output layer is empty, no features written [exec] v.out.ogr complete. 0 features (Line String type) written to <h2_str_v> [exec] (GeoJSON format). [INFO] Executed tasks [INFO] [INFO] --- maven-assembly-plugin:2.2-beta-5:single (create-distribution) @ catchment-yilan-vector --- [INFO] Reading assembly descriptor: assembly/h2.xml [INFO] Building zip: /home/y56/h2beaver-public-y56/catchment-generator/catchment-yilan-vector/target/catchment-yilan-vector-1.1-SNAPSHOT-resources.zip [INFO] [INFO] --- maven-install-plugin:2.4:install (default-install) @ catchment-yilan-vector --- [INFO] Installing /home/y56/h2beaver-public-y56/catchment-generator/catchment-yilan-vector/pom.xml to /home/y56/.m2/repository/h2beaver/catchment-yilan-vector/1.1-SNAPSHOT/catchment-yilan-vector-1.1-SNAPSHOT.pom [INFO] Installing /home/y56/h2beaver-public-y56/catchment-generator/catchment-yilan-vector/target/catchment-yilan-vector-1.1-SNAPSHOT-resources.zip to /home/y56/.m2/repository/h2beaver/catchment-yilan-vector/1.1-SNAPSHOT/catchment-yilan-vector-1.1-SNAPSHOT-resources.zip [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:14 min [INFO] Finished at: 2019-05-29T17:22:29+08:00 [INFO] ------------------------------------------------------------------------ ``` - edit `catchment-generator/terrain-taiwan-raster_20m/pom.xml` as ```xml <groupId>h2beaver</groupId> <artifactId>terrain-taiwan-raster_20m</artifactId> <version>2016-1-1-TEST-rollback-b17e9ab887308e2b8cbc7a3f48dba6a5244c416e</version> ``` - Run `mvn deploy` in `catchment-generator/terrain-taiwan-raster_20m` - Be sure `ssh dev-user@140.124.61.32 -L8088:localhost:8088` is still alive ```bash= WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release [INFO] Scanning for projects... [INFO] [INFO] -----------------< h2beaver:terrain-taiwan-raster_20m >----------------- [INFO] Building Terrain data from https://data.gov.tw/dataset/35430 2016-1-1-TEST-rollback-b17e9ab887308e2b8cbc7a3f48dba6a5244c416e [INFO] --------------------------------[ pom ]--------------------------------- [INFO] [INFO] --- maven-assembly-plugin:2.2-beta-5:single (create-distribution) @ terrain-taiwan-raster_20m --- [INFO] Reading assembly descriptor: assembly/h2.xml [INFO] Building zip: /home/y56/h2beaver-public-y56/catchment-generator/terrain-taiwan-raster_20m/target/terrain-taiwan-raster_20m-2016-1-1-TEST-rollback-b17e9ab887308e2b8cbc7a3f48dba6a5244c416e-resources.zip [INFO] [INFO] --- maven-install-plugin:2.4:install (default-install) @ terrain-taiwan-raster_20m --- [INFO] Installing /home/y56/h2beaver-public-y56/catchment-generator/terrain-taiwan-raster_20m/pom.xml to /home/y56/.m2/repository/h2beaver/terrain-taiwan-raster_20m/2016-1-1-TEST-rollback-b17e9ab887308e2b8cbc7a3f48dba6a5244c416e/terrain-taiwan-raster_20m-2016-1-1-TEST-rollback-b17e9ab887308e2b8cbc7a3f48dba6a5244c416e.pom [INFO] Installing /home/y56/h2beaver-public-y56/catchment-generator/terrain-taiwan-raster_20m/target/terrain-taiwan-raster_20m-2016-1-1-TEST-rollback-b17e9ab887308e2b8cbc7a3f48dba6a5244c416e-resources.zip to /home/y56/.m2/repository/h2beaver/terrain-taiwan-raster_20m/2016-1-1-TEST-rollback-b17e9ab887308e2b8cbc7a3f48dba6a5244c416e/terrain-taiwan-raster_20m-2016-1-1-TEST-rollback-b17e9ab887308e2b8cbc7a3f48dba6a5244c416e-resources.zip [INFO] [INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ terrain-taiwan-raster_20m --- Uploading to archiva.internal: http://localhost:8088/repository/internal/h2beaver/terrain-taiwan-raster_20m/2016-1-1-TEST-rollback-b17e9ab887308e2b8cbc7a3f48dba6a5244c416e/terrain-taiwan-raster_20m-2016-1-1-TEST-rollback-b17e9ab887308e2b8cbc7a3f48dba6a5244c416e.pom Uploaded to archiva.internal: http://localhost:8088/repository/internal/h2beaver/terrain-taiwan-raster_20m/2016-1-1-TEST-rollback-b17e9ab887308e2b8cbc7a3f48dba6a5244c416e/terrain-taiwan-raster_20m-2016-1-1-TEST-rollback-b17e9ab887308e2b8cbc7a3f48dba6a5244c416e.pom (1.9 kB at 1.5 kB/s) Downloading from archiva.internal: http://localhost:8088/repository/internal/h2beaver/terrain-taiwan-raster_20m/maven-metadata.xml Downloaded from archiva.internal: http://localhost:8088/repository/internal/h2beaver/terrain-taiwan-raster_20m/maven-metadata.xml (421 B at 616 B/s) Uploading to archiva.internal: http://localhost:8088/repository/internal/h2beaver/terrain-taiwan-raster_20m/maven-metadata.xml Uploaded to archiva.internal: http://localhost:8088/repository/internal/h2beaver/terrain-taiwan-raster_20m/maven-metadata.xml (564 B at 11 kB/s) Uploading to archiva.internal: http://localhost:8088/repository/internal/h2beaver/terrain-taiwan-raster_20m/2016-1-1-TEST-rollback-b17e9ab887308e2b8cbc7a3f48dba6a5244c416e/terrain-taiwan-raster_20m-2016-1-1-TEST-rollback-b17e9ab887308e2b8cbc7a3f48dba6a5244c416e-resources.zip Uploaded to archiva.internal: http://localhost:8088/repository/internal/h2beaver/terrain-taiwan-raster_20m/2016-1-1-TEST-rollback-b17e9ab887308e2b8cbc7a3f48dba6a5244c416e/terrain-taiwan-raster_20m-2016-1-1-TEST-rollback-b17e9ab887308e2b8cbc7a3f48dba6a5244c416e-resources.zip (103 MB at 2.3 MB/s) [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 58.719 s [INFO] Finished at: 2019-05-29T19:19:23+08:00 [INFO] ------------------------------------------------------------------------ ``` - The deploying is confirmed by checking http://localhost:8088/#artifact/h2beaver/terrain-taiwan-raster_20m ![](https://i.imgur.com/UCCpKGH.png) - Change `catchment-generator/catchment-yilan-vector/pom.xml` into ```xml= <groupId>h2beaver</groupId> <artifactId>terrain-taiwan-raster_20m</artifactId> <version>2016-1-1-TEST-rollback-b17e9ab887308e2b8cbc7a3f48dba6a5244c416e</version> ``` - I am ruuning a size-reduced job with `catchment-generator/catchment-yilan-vector/scripts/run-catchment-generator.sh` modified into ```bash= echo "sudo docker run -v $ABSOLUTE_UNPACK_DATAPATH:/storage catchment-generator App.py -d $TERRAIN_FILENAME -c $RIVER_FILENAME -b \"2721707;2714385;305588;295588\" $*" sudo docker run -v $ABSOLUTE_UNPACK_DATAPATH:/storage catchment-generator App.py -d $TERRAIN_FILENAME -c $RIVER_FILENAME -b "2721707;2714385;305588;295588" $* ``` - Execute `mvn clean compile` in `catchment-generator/catchment-yilan-vector` - Make sure your `sudo docker` is still alive - It runs within 3 min ```bash= WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release [INFO] Scanning for projects... [INFO] [INFO] ------------------< h2beaver:catchment-yilan-vector >------------------- [INFO] Building Test to use maven to pack data 1.1-SNAPSHOT [INFO] --------------------------------[ pom ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ catchment-yilan-vector --- [INFO] Deleting /home/y56/h2beaver-public-y56/catchment-generator/catchment-yilan-vector/target [INFO] Deleting /home/y56/h2beaver-public-y56/catchment-generator/catchment-yilan-vector/workspace (includes = [], excludes = []) [INFO] [INFO] --- maven-dependency-plugin:3.1.1:unpack-dependencies (unpack-dependencies) @ catchment-yilan-vector --- [INFO] Unpacking /home/y56/.m2/repository/h2beaver/terrain-taiwan-raster_20m/2016-1-1-TEST-rollback-b17e9ab887308e2b8cbc7a3f48dba6a5244c416e/terrain-taiwan-raster_20m-2016-1-1-TEST-rollback-b17e9ab887308e2b8cbc7a3f48dba6a5244c416e-resources.zip to /home/y56/h2beaver-public-y56/catchment-generator/catchment-yilan-vector/workspace/terrain-taiwan-raster_20m-resources-zip with includes "" and excludes "" [INFO] Unpacking /home/y56/.m2/repository/h2beaver/river-yilan-vector/20190430-SNAPSHOT/river-yilan-vector-20190430-SNAPSHOT-resources.zip to /home/y56/h2beaver-public-y56/catchment-generator/catchment-yilan-vector/workspace/river-yilan-vector-resources-zip with includes "" and excludes "" [INFO] [INFO] --- maven-antrun-plugin:1.8:run (catchment-generation) @ catchment-yilan-vector --- [WARNING] Parameter tasks is deprecated, use target instead [INFO] Executing tasks main: [exec] sudo docker run -v /home/y56/h2beaver-public-y56/catchment-generator/catchment-yilan-vector/workspace:/storage catchment-generator App.py -d terrain-taiwan-raster_20m-resources-zip/dem_20m.tif -c river-yilan-vector-resources-zip/river.geojson -b "2721707;2714385;305588;295588" -p h2 -h 30 -w 200 [exec] Over-riding projection check [exec] Importing raster map <h2_dem>... [exec] 100% [exec] projection: 99 (TWD97 / TM2 zone 121) [exec] zone: 0 [exec] datum: towgs84=0,0,0,0,0,0,0 [exec] ellipsoid: grs80 [exec] north: 2801730 [exec] south: 2419490 [exec] west: 148310 [exec] east: 351810 [exec] nsres: 20 [exec] ewres: 20 [exec] rows: 19112 [exec] cols: 10175 [exec] cells: 194464600 [exec] Check if OGR layer <river> contains polygons... [exec] 100% [exec] Creating attribute table for layer <river>... [exec] Importing 9769 features (OGR layer <river>)... [exec] 100% [exec] ----------------------------------------------------- [exec] Building topology for vector map <h2_input_channel@PERMANENT>... [exec] Registering primitives... [exec] [exec] Reading raster map... 100% [exec] Processing lines... [exec] 100% [exec] Writing raster map... [exec] Reading input elevation raster map... [exec] 100% [exec] Filling sinks... [exec] Determining flow directions for ambiguous cases... [exec] Found 68 unresolved areas [exec] Repeat to get the final directions... [exec] Found 1 unresolved area [exec] Writing output raster maps... [exec] 100% [exec] SECTION 1a (of 5): Initiating Memory. [exec] SECTION 1b (of 5): Determining Offmap Flow. [exec] 100% [exec] SECTION 2: A* Search. [exec] 100% [exec] SECTION 3a: Accumulating Surface Flow with MFD. [exec] 100% [exec] SECTION 3b: Adjusting drainage directions. [exec] 100% [exec] SECTION 4: Watershed determination. [exec] 100% [exec] SECTION 5: Closing Maps. [exec] 100% [exec] Extracting areas... [exec] 100% [exec] Writing areas... [exec] 100% [exec] Building topology for vector map <h2_bas_v@PERMANENT>... [exec] Registering primitives... [exec] [exec] Building areas... 100% [exec] Attaching islands... [exec] 100% [exec] Attaching centroids... [exec] 100% [exec] r.to.vect complete. [exec] Exporting 3 areas (may take some time)... [exec] 100% [exec] v.out.ogr complete. 3 features (Polygon type) written to <h2_bas_v> [exec] (GeoJSON format). [exec] Extracting areas... [exec] 100% [exec] Writing areas... [exec] 100% [exec] Building topology for vector map <h2_str_v@PERMANENT>... [exec] Registering primitives... [exec] [exec] Building areas... 100% [exec] Attaching islands... [exec] 100% [exec] Attaching centroids... [exec] 100% [exec] r.to.vect complete. [exec] ['-d', 'terrain-taiwan-raster_20m-resources-zip/dem_20m.tif', '-c', 'river-yilan-vector-resources-zip/river.geojson', '-b', '2721707;2714385;305588;295588', '-p', 'h2', '-h', '30', '-w', '200'] [exec] terrain-taiwan-raster_20m-resources-zip/dem_20m.tif [exec] river-yilan-vector-resources-zip/river.geojson [exec] 2721707;2714385;305588;295588 [exec] h2 [exec] 30 [exec] 200 [exec] Initializing a computational session [exec] ['grass', '-c', 'epsg: 3826', '-e', '/tmp/grassdata/9a93dca98c6a9f61dbcadfb70ea4fafe'] [exec] Created location /tmp/grassdata/9a93dca98c6a9f61dbcadfb70ea4fafe [exec] ================== [exec] Process: import DEM to GRASS [exec] ================== [exec] Process: set computational boundary [exec] ================== [exec] Process: dig_preset_channel [exec] ================== [exec] Process: DEM fill-dir algorithm [exec] ================== [exec] Process: generate Catchment (global mode)... [exec] Given Threshold: 30000.000000 [exec] Given Max_Slope_length: 1000.000000 [exec] [exec] ================== [exec] Exporting Geojson [exec] Adding CRS tag and value (EPSG:3826) to basin geojson [exec] Exporting stream Geojson [exec] Adding CRS tag and value (EPSG:3826) to stream geojson [exec] Exporting GeoJSON process done! [exec] Processed Basin data: h2_basin.geojson is writen [exec] Done! [exec] This session costs 58.362250 sec [exec] WARNING: 199 boundaries found, but not requested to be exported. Verify [exec] 'type' parameter. [exec] WARNING: 100 centroids found, but not requested to be exported. Verify [exec] 'type' parameter. [exec] WARNING: 100 areas found, but not requested to be exported. Verify 'type' [exec] parameter. [exec] WARNING: No lines found, but requested to be exported. Will skip this [exec] feature type. [exec] Exporting 0 features... [exec] 100% [exec] WARNING: Output layer is empty, no features written [exec] v.out.ogr complete. 0 features (Line String type) written to <h2_str_v> [exec] (GeoJSON format). [INFO] Executed tasks [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:14 min [INFO] Finished at: 2019-05-29T19:31:54+08:00 [INFO] ------------------------------------------------------------------------ ``` - One more try, using the original`catchment-generator/catchment-yilan-vector/scripts/run-catchment-generator.sh` as ```bash= echo "sudo docker run -v $ABSOLUTE_UNPACK_DATAPATH:/storage catchment-generator App.py -d $TERRAIN_FILENAME -c $RIVER_FILENAME -b \"$BOUND\" $*" sudo docker run -v $ABSOLUTE_UNPACK_DATAPATH:/storage catchment-generator App.py -d $TERRAIN_FILENAME -c $RIVER_FILENAME -b "$BOUND" $* ``` - And run `mvn clean compile` in `catchment-generator/catchment-yilan-vector` again - Make sure your sudo docker is still alive - It runs within 5 min ```b WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release [INFO] Scanning for projects... [INFO] [INFO] ------------------< h2beaver:catchment-yilan-vector >------------------- [INFO] Building Test to use maven to pack data 1.1-SNAPSHOT [INFO] --------------------------------[ pom ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ catchment-yilan-vector --- [INFO] Deleting /home/y56/h2beaver-public-y56/catchment-generator/catchment-yilan-vector/target [INFO] Deleting /home/y56/h2beaver-public-y56/catchment-generator/catchment-yilan-vector/workspace (includes = [], excludes = []) [INFO] [INFO] --- maven-dependency-plugin:3.1.1:unpack-dependencies (unpack-dependencies) @ catchment-yilan-vector --- [INFO] Unpacking /home/y56/.m2/repository/h2beaver/terrain-taiwan-raster_20m/2016-1-1-TEST-rollback-b17e9ab887308e2b8cbc7a3f48dba6a5244c416e/terrain-taiwan-raster_20m-2016-1-1-TEST-rollback-b17e9ab887308e2b8cbc7a3f48dba6a5244c416e-resources.zip to /home/y56/h2beaver-public-y56/catchment-generator/catchment-yilan-vector/workspace/terrain-taiwan-raster_20m-resources-zip with includes "" and excludes "" [INFO] Unpacking /home/y56/.m2/repository/h2beaver/river-yilan-vector/20190430-SNAPSHOT/river-yilan-vector-20190430-SNAPSHOT-resources.zip to /home/y56/h2beaver-public-y56/catchment-generator/catchment-yilan-vector/workspace/river-yilan-vector-resources-zip with includes "" and excludes "" [INFO] [INFO] --- maven-antrun-plugin:1.8:run (catchment-generation) @ catchment-yilan-vector --- [WARNING] Parameter tasks is deprecated, use target instead [INFO] Executing tasks main: [exec] sudo docker run -v /home/y56/h2beaver-public-y56/catchment-generator/catchment-yilan-vector/workspace:/storage catchment-generator App.py -d terrain-taiwan-raster_20m-resources-zip/dem_20m.tif -c river-yilan-vector-resources-zip/river.geojson -b "2721707;2704385;305588;285588" -p h2 -h 30 -w 200 [exec] Over-riding projection check [exec] Importing raster map <h2_dem>... [exec] 100% [exec] projection: 99 (TWD97 / TM2 zone 121) [exec] zone: 0 [exec] datum: towgs84=0,0,0,0,0,0,0 [exec] ellipsoid: grs80 [exec] north: 2801730 [exec] south: 2419490 [exec] west: 148310 [exec] east: 351810 [exec] nsres: 20 [exec] ewres: 20 [exec] rows: 19112 [exec] cols: 10175 [exec] cells: 194464600 [exec] Check if OGR layer <river> contains polygons... [exec] 100% [exec] Creating attribute table for layer <river>... [exec] Importing 9769 features (OGR layer <river>)... [exec] 100% [exec] ----------------------------------------------------- [exec] Building topology for vector map <h2_input_channel@PERMANENT>... [exec] Registering primitives... [exec] [exec] Reading raster map... 100% [exec] Processing lines... [exec] 100% [exec] Writing raster map... [exec] Reading input elevation raster map... [exec] 100% [exec] Filling sinks... [exec] Determining flow directions for ambiguous cases... [exec] Found 462 unresolved areas [exec] Repeat to get the final directions... [exec] Found 14 unresolved areas [exec] Writing output raster maps... [exec] 100% [exec] SECTION 1a (of 5): Initiating Memory. [exec] SECTION 1b (of 5): Determining Offmap Flow. [exec] 100% [exec] SECTION 2: A* Search. [exec] 100% [exec] SECTION 3a: Accumulating Surface Flow with MFD. [exec] 100% [exec] SECTION 3b: Adjusting drainage directions. [exec] 100% [exec] SECTION 4: Watershed determination. [exec] 100% [exec] SECTION 5: Closing Maps. [exec] 100% [exec] Extracting areas... [exec] 100% [exec] Writing areas... [exec] 100% [exec] Building topology for vector map <h2_bas_v@PERMANENT>... [exec] Registering primitives... [exec] [exec] Building areas... 100% [exec] Attaching islands... [exec] 100% [exec] Attaching centroids... [exec] 100% [exec] r.to.vect complete. [exec] Exporting 141 areas (may take some time)... [exec] 100% [exec] v.out.ogr complete. 141 features (Polygon type) written to <h2_bas_v> [exec] (GeoJSON format). [exec] Extracting areas... [exec] 100% [exec] Writing areas... [exec] 100% [exec] Building topology for vector map <h2_str_v@PERMANENT>... [exec] Registering primitives... [exec] [exec] ['-d', 'terrain-taiwan-raster_20m-resources-zip/dem_20m.tif', '-c', 'river-yilan-vector-resources-zip/river.geojson', '-b', '2721707;2704385;305588;285588', '-p', 'h2', '-h', '30', '-w', '200'] [exec] terrain-taiwan-raster_20m-resources-zip/dem_20m.tif [exec] river-yilan-vector-resources-zip/river.geojson [exec] 2721707;2704385;305588;285588 [exec] h2 [exec] 30 [exec] 200 [exec] Initializing a computational session [exec] ['grass', '-c', 'epsg: 3826', '-e', '/tmp/grassdata/a26623e9f62276f0cf7ec8632470ce84'] [exec] Created location /tmp/grassdata/a26623e9f62276f0cf7ec8632470ce84 [exec] ================== [exec] Process: import DEM to GRASS [exec] ================== [exec] Process: set computational boundary [exec] ================== [exec] Process: dig_preset_channel [exec] ================== [exec] Process: DEM fill-dir algorithm [exec] ================== [exec] Process: generate Catchment (global mode)... [exec] Given Threshold: 30000.000000 [exec] Given Max_Slope_length: 1000.000000 [exec] [exec] ================== [exec] Exporting Geojson [exec] Adding CRS tag and value (EPSG:3826) to basin geojson [exec] Exporting stream Geojson [exec] Adding CRS tag and value (EPSG:3826) to stream geojson [exec] Exporting GeoJSON process done! [exec] Processed Basin data: h2_basin.geojson is writen [exec] Done! [exec] This session costs 218.377887 sec [exec] Building areas... 100% [exec] Attaching islands... [exec] 100% [exec] Attaching centroids... [exec] 100% [exec] r.to.vect complete. [exec] WARNING: 2267 boundaries found, but not requested to be exported. Verify [exec] 'type' parameter. [exec] WARNING: 1109 centroids found, but not requested to be exported. Verify [exec] 'type' parameter. [exec] WARNING: 1111 areas found, but not requested to be exported. Verify 'type' [exec] parameter. [exec] WARNING: No lines found, but requested to be exported. Will skip this [exec] feature type. [exec] Exporting 0 features... [exec] 100% [exec] WARNING: Output layer is empty, no features written [exec] v.out.ogr complete. 0 features (Line String type) written to <h2_str_v> [exec] (GeoJSON format). [INFO] Executed tasks [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 03:54 min [INFO] Finished at: 2019-05-29T20:03:00+08:00 [INFO] ------------------------------------------------------------------------ ``` ## - I now have `catchment-generator/catchment-yilan-vector/workspace/h2_basin.geojson` !