diff --git a/chyf-catchment-delineator/pom.xml b/chyf-catchment-delineator/pom.xml
index 5f1145f..660e096 100644
--- a/chyf-catchment-delineator/pom.xml
+++ b/chyf-catchment-delineator/pom.xml
@@ -11,12 +11,13 @@
4.0.0
chyf-catchment-delineator
CHyF Catchment Delineator
+ ${catchment.version}
net.refractions.chyf
chyf-core
- ${project.version}
+ ${chyf.core.version}
org.geotools
diff --git a/chyf-core/pom.xml b/chyf-core/pom.xml
index 32c0df1..63eb269 100644
--- a/chyf-core/pom.xml
+++ b/chyf-core/pom.xml
@@ -10,6 +10,7 @@
chyf-core
jar
+ ${chyf.core.version}
CHyF Core Library
diff --git a/chyf-flowpath-constructor/pom.xml b/chyf-flowpath-constructor/pom.xml
index cd42c66..adbc223 100644
--- a/chyf-flowpath-constructor/pom.xml
+++ b/chyf-flowpath-constructor/pom.xml
@@ -11,12 +11,13 @@
chyf-flowpath-constructor
jar
CHyF Flowpath Constructor
+ ${flowpath.constructor.version}
net.refractions.chyf
chyf-core
- ${project.version}
+ ${chyf.core.version}
diff --git a/chyf-flowpath-constructor/src/main/java/net/refractions/chyf/flowpathconstructor/directionalize/DirectionalizeEngine.java b/chyf-flowpath-constructor/src/main/java/net/refractions/chyf/flowpathconstructor/directionalize/DirectionalizeEngine.java
index deeb81f..3f8891d 100644
--- a/chyf-flowpath-constructor/src/main/java/net/refractions/chyf/flowpathconstructor/directionalize/DirectionalizeEngine.java
+++ b/chyf-flowpath-constructor/src/main/java/net/refractions/chyf/flowpathconstructor/directionalize/DirectionalizeEngine.java
@@ -20,7 +20,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Set;
-import java.util.stream.Collectors;
import org.geotools.data.simple.SimpleFeatureReader;
import org.locationtech.jts.geom.Coordinate;
@@ -30,11 +29,16 @@
import org.locationtech.jts.geom.prep.PreparedPolygon;
import org.opengis.feature.simple.SimpleFeature;
import org.opengis.feature.type.Name;
-import org.opengis.filter.identity.FeatureId;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import net.refractions.chyf.datasource.ChyfAttribute;
+import net.refractions.chyf.datasource.ChyfDataSource;
+import net.refractions.chyf.datasource.DirectionType;
+import net.refractions.chyf.datasource.EfType;
+import net.refractions.chyf.datasource.FlowDirection;
+import net.refractions.chyf.datasource.Layer;
import net.refractions.chyf.flowpathconstructor.ChyfProperties;
import net.refractions.chyf.flowpathconstructor.FlowpathArgs;
import net.refractions.chyf.flowpathconstructor.datasource.FlowpathGeoPackageDataSource;
@@ -42,12 +46,6 @@
import net.refractions.chyf.flowpathconstructor.directionalize.graph.DGraph;
import net.refractions.chyf.flowpathconstructor.directionalize.graph.DNode;
import net.refractions.chyf.flowpathconstructor.directionalize.graph.EdgeInfo;
-import net.refractions.chyf.datasource.ChyfAttribute;
-import net.refractions.chyf.datasource.ChyfDataSource;
-import net.refractions.chyf.datasource.DirectionType;
-import net.refractions.chyf.datasource.EfType;
-import net.refractions.chyf.datasource.FlowDirection;
-import net.refractions.chyf.datasource.Layer;
/**
* Main class for computing direction on dataset
@@ -119,20 +117,20 @@ public static void doWork(FlowpathGeoPackageDataSource dataSource, ChyfPropertie
//directionalized bank edges
logger.info("processing bank edges");
- HashSet nodec = new HashSet<>();
- for(DNode d : graph.nodes) nodec.add(d.getCoordinate());
- Set bankstoflip = new HashSet<>();
- for (EdgeInfo b : banks) {
- if (nodec.contains(b.getEnd())) {
- }else if (nodec.contains(b.getStart())) {
- //flip
- bankstoflip.add(b.getFeatureId());
- }else {
- throw new Exception("Bank flowpath does not intersect flow network: " + b.getStart());
- }
- }
-
- dataSource.flipFlowEdges(bankstoflip, banks.stream().map(e->e.getFeatureId()).collect(Collectors.toList()));
+// HashSet nodec = new HashSet<>();
+// for(DNode d : graph.nodes) nodec.add(d.getCoordinate());
+// Set bankstoflip = new HashSet<>();
+// for (EdgeInfo b : banks) {
+// if (nodec.contains(b.getEnd())) {
+// }else if (nodec.contains(b.getStart())) {
+// //flip
+// bankstoflip.add(b.getFeatureId());
+// }else {
+// throw new Exception("Bank flowpath does not intersect flow network: " + b.getStart());
+// }
+// }
+//
+// dataSource.flipFlowEdges(bankstoflip, banks.stream().map(e->e.getFeatureId()).collect(Collectors.toList()));
//find sink nodes
logger.info("locating sink nodes");
diff --git a/chyf-flowpath-constructor/src/main/java/net/refractions/chyf/flowpathconstructor/directionalize/Directionalizer.java b/chyf-flowpath-constructor/src/main/java/net/refractions/chyf/flowpathconstructor/directionalize/Directionalizer.java
index 3c9b347..7c3323c 100644
--- a/chyf-flowpath-constructor/src/main/java/net/refractions/chyf/flowpathconstructor/directionalize/Directionalizer.java
+++ b/chyf-flowpath-constructor/src/main/java/net/refractions/chyf/flowpathconstructor/directionalize/Directionalizer.java
@@ -5,6 +5,7 @@
import java.util.List;
import java.util.Set;
+import org.geotools.filter.identity.FeatureIdImpl;
import org.locationtech.jts.geom.Coordinate;
import org.opengis.filter.identity.FeatureId;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
@@ -21,6 +22,7 @@
import net.refractions.chyf.flowpathconstructor.directionalize.graph.DGraph;
import net.refractions.chyf.flowpathconstructor.directionalize.graph.DNode;
import net.refractions.chyf.flowpathconstructor.directionalize.graph.DPath;
+import net.refractions.chyf.flowpathconstructor.directionalize.graph.EdgeInfo;
import net.refractions.chyf.flowpathconstructor.directionalize.graph.Partition;
import net.refractions.chyf.flowpathconstructor.directionalize.graph.PathDirectionalizer;
import net.refractions.chyf.flowpathconstructor.directionalize.graph.SubGraph;
@@ -123,7 +125,6 @@ private void directionalizeGraph(DGraph graph, DNode[] sinkNodes) throws Excepti
for (DNode n : sinkNodes) toProcess.add(n);
while(!toProcess.isEmpty()) {
- //logger.info("Processing sink. Remaining: " + toProcess.size());
DNode sink = toProcess.remove(0);
@@ -141,6 +142,59 @@ private void directionalizeGraph(DGraph graph, DNode[] sinkNodes) throws Excepti
}
}
+
+ if (localSinks.size() > 1) {
+ //we need at least one degree 3 node in the network otherwise it is basically a loop
+ boolean degree3 = false;
+ for (DNode n : sub.getNodes()) {
+ if (n.getDegree() > 2) {
+ degree3 = true;
+ break;
+ }
+ }
+ if (degree3) {
+ //generally not an error, but I've seen a lot of direction errors
+ //in the dataset when this is the case so warn user
+ StringBuilder sb = new StringBuilder();
+ sb.append("A sub network has multiple sinks: " );
+ for (DNode n : localSinks) sb.append(n.toString() + " " );
+ logger.warn(sb.toString());
+
+ //add a single sink node and join all sinks to that node
+ Coordinate c = localSinks.get(0).getCoordinate();
+
+ DNode tempsink = new DNode(new Coordinate(c.x, c.y));
+ graph.getNodes().add(tempsink);
+ //link sink nodes to edges
+ for (DNode s : localSinks) {
+ DEdge temp = new DEdge(s,tempsink,s.getCoordinate(),tempsink.getCoordinate(),
+ new EdgeInfo(s.getCoordinate(), s.getCoordinate(), tempsink.getCoordinate(),
+ tempsink.getCoordinate(), EfType.REACH, new FeatureIdImpl("temp-sink-node"),
+ 0, DirectionType.KNOWN));
+ tempsink.addEdge(temp);
+ s.getEdges().add(temp);
+ graph.getEdges().add(temp);
+ }
+
+ //the sink node needs to have only one in edge
+ DNode tempsink2 = new DNode(new Coordinate(c.x, c.y));
+ tempsink.setSink(true);
+ graph.getNodes().add(tempsink2);
+ DEdge temp = new DEdge(tempsink,tempsink2,tempsink.getCoordinate(),tempsink2.getCoordinate(),
+ new EdgeInfo(tempsink.getCoordinate(), tempsink.getCoordinate(), tempsink2.getCoordinate(),
+ tempsink2.getCoordinate(), EfType.REACH, new FeatureIdImpl("temp-sink-node2"), 0,
+ DirectionType.KNOWN));
+ tempsink.addEdge(temp);
+ tempsink2.getEdges().add(temp);
+ graph.getEdges().add(temp);
+
+
+ localSinks.clear();
+ localSinks.add(tempsink2);
+ sink = tempsink2;
+ sub = SubGraph.computeSubGraph(graph, sink);
+ }
+ }
//find bridge nodes
BridgeFinder bb = new BridgeFinder();
bb.computeBridges(sub, sink);
diff --git a/chyf-flowpath-constructor/src/main/java/net/refractions/chyf/flowpathconstructor/directionalize/graph/PathDirectionalizer.java b/chyf-flowpath-constructor/src/main/java/net/refractions/chyf/flowpathconstructor/directionalize/graph/PathDirectionalizer.java
index 81c016c..9ad12e7 100644
--- a/chyf-flowpath-constructor/src/main/java/net/refractions/chyf/flowpathconstructor/directionalize/graph/PathDirectionalizer.java
+++ b/chyf-flowpath-constructor/src/main/java/net/refractions/chyf/flowpathconstructor/directionalize/graph/PathDirectionalizer.java
@@ -181,6 +181,7 @@ public void dir(DGraph graph, Set sinks, Set sources) throws Excep
path.nodes.forEach(n->n.pathnode = true);
if (!path.edges.isEmpty()) {
directionalizePath(path);
+ path.edges.forEach(e->e.pathedge = true);
paths.add(path);
}
}else {
@@ -206,7 +207,6 @@ public void dir(DGraph graph, Set sinks, Set sources) throws Excep
if (temp == null ) {
temp = PathFinder.findPath(toprocess.getNodeB(), sinks, graph);
}
-// DPath temp = PathFinder.findPath(toprocess.getNodeB(), sinks, graph);
if (temp == null) {
//not path found
@@ -215,13 +215,13 @@ public void dir(DGraph graph, Set sinks, Set sources) throws Excep
continue;
}
//flag nodes as pathnodes
- temp.nodes.forEach(n->n.pathnode = true);
+
//add start node/edge to path
temp.nodes.add(0, toprocess.getNodeA());
temp.edges.add(0, toprocess);
directionalizePath(temp);
-
+
boolean canflip = true;
//check for cycle and flip is necessary
if (Directionalizer.cycleCheck(temp, graph)) {
@@ -231,10 +231,46 @@ public void dir(DGraph graph, Set sinks, Set sources) throws Excep
Collections.reverse(temp.nodes);
for (DEdge e : temp.edges) e.flip();
if (Directionalizer.cycleCheck(temp, graph)) {
- throw new Exception("Cannot add path as both directions for this path creates a cycle. " + temp.toString());
+
+ //can we truncate this path
+ DPath temp2 = new DPath();
+ for (int i = 0; i < temp.edges.size(); i ++) {
+ if (temp.edges.get(i).getNodeB().pathnode) {
+ //stop here
+ temp2.getEdges().add(temp.getEdges().get(i));
+ if (i == 0) temp2.getNodes().add(temp.getEdges().get(i).getNodeA());
+ temp2.getNodes().add(temp.getEdges().get(i).getNodeB());
+ break;
+ }
+
+ temp2.getEdges().add(temp.getEdges().get(i));
+ if (i == 0) temp2.getNodes().add(temp.getEdges().get(i).getNodeA());
+ temp2.getNodes().add(temp.getEdges().get(i).getNodeB());
+
+
+ }
+ if (temp.edges.size() > temp2.edges.size()) {
+ for (DEdge e : temp.edges) {
+ if (!temp2.edges.contains(e)) {
+ e.resetKnown();
+ }
+ }
+ if (Directionalizer.cycleCheck(temp2, graph)) {
+ throw new Exception("Cannot add path as both directions for this path creates a cycle. " + temp.toString());
+ }else {
+ System.out.println("USING TRUNCATED PATH");
+ temp = temp2;
+ }
+
+ }else {
+ throw new Exception("Cannot add path as both directions for this path creates a cycle. " + temp.toString());
+ }
}
}
+ temp.nodes.forEach(n->n.pathnode = true);
+ temp.edges.forEach(e->e.pathedge = true);
+
if (canflip) {
//can go either way without cycle
@@ -413,7 +449,7 @@ private void directionalizePath(DPath path) throws Exception{
}else {
path.edges.get(k).setKnown();
}
- path.edges.get(k).pathedge = true;
+// path.edges.get(k).pathedge = true;
}
}
@@ -442,6 +478,7 @@ public DPath findStraightestPath(DEdge inEdge, Set sinks, DGraph graph) t
double mangle = Double.MAX_VALUE;
DEdge lnextEdge = null;
DNode lnextNode = null;
+
nextNode.pathvisited = true;
for (DEdge out : nextNode.getEdges()) {
if (out.getDType() == DirectionType.KNOWN) {
diff --git a/chyf-flowpath-constructor/src/main/java/net/refractions/chyf/flowpathconstructor/directionalize/graph/TreeDirection.java b/chyf-flowpath-constructor/src/main/java/net/refractions/chyf/flowpathconstructor/directionalize/graph/TreeDirection.java
index ef8b60b..34c6a45 100644
--- a/chyf-flowpath-constructor/src/main/java/net/refractions/chyf/flowpathconstructor/directionalize/graph/TreeDirection.java
+++ b/chyf-flowpath-constructor/src/main/java/net/refractions/chyf/flowpathconstructor/directionalize/graph/TreeDirection.java
@@ -96,7 +96,12 @@ public void directionalize(DGraph graph, List localSinks) throws Exceptio
break;
}
if (e.getNodeB() != sink) {
- e.flip();
+ if (localSinks.contains(e.getNodeB())) {
+ logger.error("Potential loop detected at " + sink.toString() + " - both ends of this subnetwork are classified as sinks.");
+ break;
+ }else {
+ e.flip();
+ }
}else {
e.setKnown();
}
diff --git a/chyf-flowpath-constructor/src/main/java/net/refractions/chyf/flowpathconstructor/skeletonizer/points/PointEngine.java b/chyf-flowpath-constructor/src/main/java/net/refractions/chyf/flowpathconstructor/skeletonizer/points/PointEngine.java
index 563e090..912b314 100644
--- a/chyf-flowpath-constructor/src/main/java/net/refractions/chyf/flowpathconstructor/skeletonizer/points/PointEngine.java
+++ b/chyf-flowpath-constructor/src/main/java/net/refractions/chyf/flowpathconstructor/skeletonizer/points/PointEngine.java
@@ -94,7 +94,7 @@ public static void doWork(FlowpathGeoPackageDataSource dataSource, ChyfPropertie
logger.info("POINT GENERATOR: " + cnt);
cnt++;
-
+
ftouch.clear();
ptouch.clear();
diff --git a/chyf-flowpath-constructor/src/main/java/net/refractions/chyf/flowpathconstructor/skeletonizer/points/PointGenerator.java b/chyf-flowpath-constructor/src/main/java/net/refractions/chyf/flowpathconstructor/skeletonizer/points/PointGenerator.java
index 5a70061..0671d47 100644
--- a/chyf-flowpath-constructor/src/main/java/net/refractions/chyf/flowpathconstructor/skeletonizer/points/PointGenerator.java
+++ b/chyf-flowpath-constructor/src/main/java/net/refractions/chyf/flowpathconstructor/skeletonizer/points/PointGenerator.java
@@ -391,7 +391,9 @@ private Coordinate findLongestMidPoint(LineString ls, List touches, Set
cnt = (cnt+1) % (ls.getCoordinates().length - 1);
}
//find midpoint between first and cnt and create node
- options.put(distance, findMidpoint(coords, false));
+ if (coords.size() > 1) {
+ options.put(distance, findMidpoint(coords, false));
+ }
return options.get(options.keySet().stream().reduce(Math::max).get());
}
@@ -420,22 +422,23 @@ private void processLineString(LineString ls, Set inpoints, Set addBanks(Polygon waterbody, List flowpoints, Set otherpolys) throws Exception{
if (flowpoints.isEmpty()) return Collections.emptySet();
-
-
Set banks = new HashSet<>();
Set flows = new HashSet<>();
- boolean hasheadwater = false;
+ Coordinate skip = null;
for(ConstructionPoint p : flowpoints) {
flows.add(p.getCoordinate());
- if (p.getType() == NodeType.HEADWATER) hasheadwater = true;
- if (p.getType() == NodeType.TERMINAL) hasheadwater = true;
+ if (p.getType() == NodeType.HEADWATER) {
+ skip = p.getCoordinate();
+ }
+ if (p.getType() == NodeType.TERMINAL) {
+ if (skip == null) skip = p.getCoordinate();
+ }
}
List toprocess = new ArrayList<>();
toprocess.add(waterbody.getExteriorRing());
- waterbody.getExteriorRing().setUserData(hasheadwater);
for (int i = 0; i < waterbody.getNumInteriorRing(); i ++) {
toprocess.add(waterbody.getInteriorRingN(i));
@@ -469,7 +472,7 @@ private Set addBanks(Polygon waterbody, List items2 = merger.getMergedLineStrings();
for (LineString i : items2) {
- generateBanks(i, flows, (boolean)ls.getUserData(), banks);
+ generateBanks(i, flows, skip, banks);
}
}
@@ -481,12 +484,13 @@ private Set addBanks(Polygon waterbody, List flows, boolean hasheadwater, Set banks) throws Exception{
+ private void generateBanks(LineString ls, Set flows, Coordinate skip, Set banks) throws Exception{
Coordinate[] cs = ls.getCoordinates();
if (cs[0].equals2D(cs[cs.length - 1])) { //linear ring
@@ -508,9 +512,11 @@ private void generateBanks(LineString ls, Set flows, boolean hashead
coords.add(n);
if (flows.contains(n)) {
//find the midpoint between first and cnt and create node
- Coordinate bankPnt = findMidpoint(coords, false);
- bankPnt = findCoordinate(coords, bankPnt);
- banks.add(new ConstructionPoint(bankPnt,NodeType.BANK, FlowDirection.INPUT, (PolygonInfo) workingWaterbody.getUserData()));
+ if (skip == null || !coords.get(0).equals2D(skip)) {
+ Coordinate bankPnt = findMidpoint(coords, false);
+ bankPnt = findCoordinate(coords, bankPnt);
+ banks.add(new ConstructionPoint(bankPnt,NodeType.BANK, FlowDirection.INPUT, (PolygonInfo) workingWaterbody.getUserData()));
+ }
coords = new ArrayList<>();
coords.add(n);
}
@@ -518,21 +524,24 @@ private void generateBanks(LineString ls, Set flows, boolean hashead
}
//find midpoint between first and cnt and create node
coords.add(cs[start]);
- if (coords.size() > 1 && !hasheadwater) banks.add(new ConstructionPoint(findMidpoint(coords, false),NodeType.BANK, FlowDirection.INPUT, (PolygonInfo) workingWaterbody.getUserData()));
+ if (skip == null || !coords.get(0).equals2D(skip)) banks.add(new ConstructionPoint(findMidpoint(coords, false),NodeType.BANK, FlowDirection.INPUT, (PolygonInfo) workingWaterbody.getUserData()));
+
}else {
List coords = new ArrayList<>();
for (int i = 0; i < cs.length; i ++) {
coords.add(cs[i]);
if (flows.contains(cs[i]) && i != 0) {
- Coordinate bankPnt = findMidpoint(coords, false);
- bankPnt = findCoordinate(coords, bankPnt);
- banks.add(new ConstructionPoint(bankPnt,NodeType.BANK, FlowDirection.INPUT, (PolygonInfo) workingWaterbody.getUserData()));
+ if (skip == null || !coords.get(0).equals2D(skip)) {
+ Coordinate bankPnt = findMidpoint(coords, false);
+ bankPnt = findCoordinate(coords, bankPnt);
+ banks.add(new ConstructionPoint(bankPnt,NodeType.BANK, FlowDirection.INPUT, (PolygonInfo) workingWaterbody.getUserData()));
+ }
coords.clear();
coords.add(cs[i]);
}
}
- if (!hasheadwater && coords.size() > 1) banks.add(new ConstructionPoint(findMidpoint(coords, false),NodeType.BANK, FlowDirection.INPUT, (PolygonInfo) workingWaterbody.getUserData()));
+ if ((skip == null || !coords.get(0).equals2D(skip)) && coords.size() > 1) banks.add(new ConstructionPoint(findMidpoint(coords, false),NodeType.BANK, FlowDirection.INPUT, (PolygonInfo) workingWaterbody.getUserData()));
}
}
diff --git a/chyf-flowpath-constructor/src/test/java/net/refractions/chyf/flowpathconstructor/CadbDataTest.java b/chyf-flowpath-constructor/src/test/java/net/refractions/chyf/flowpathconstructor/CadbDataTest.java
index 94b2c60..76119cf 100644
--- a/chyf-flowpath-constructor/src/test/java/net/refractions/chyf/flowpathconstructor/CadbDataTest.java
+++ b/chyf-flowpath-constructor/src/test/java/net/refractions/chyf/flowpathconstructor/CadbDataTest.java
@@ -21,10 +21,7 @@
import org.junit.Assert;
import org.junit.Test;
import org.locationtech.jts.geom.Coordinate;
-import org.locationtech.jts.geom.GeometryFactory;
-import org.locationtech.jts.geom.LineString;
import org.locationtech.jts.geom.Polygon;
-import org.locationtech.jts.geom.prep.PreparedPolygon;
import org.locationtech.jts.io.WKTReader;
import net.refractions.chyf.datasource.FlowDirection;
diff --git a/chyf-flowpath-constructor/src/test/java/net/refractions/chyf/flowpathconstructor/DirectionalizeTest.java b/chyf-flowpath-constructor/src/test/java/net/refractions/chyf/flowpathconstructor/DirectionalizeTest.java
index 8322607..17f1d8c 100644
--- a/chyf-flowpath-constructor/src/test/java/net/refractions/chyf/flowpathconstructor/DirectionalizeTest.java
+++ b/chyf-flowpath-constructor/src/test/java/net/refractions/chyf/flowpathconstructor/DirectionalizeTest.java
@@ -42,7 +42,56 @@
public class DirectionalizeTest {
+
+ @Test
+ public void testDegree4Bug() throws Exception{
+ String[] edges = new String[] {
+ "LineString (-56.1738465388923629 48.1538226304847683, -56.17383919302086071 48.15379958181745224, -56.17382685931336539 48.15377224921251553, -56.17381094797227092 48.15374690794338619, -56.17379835283730927 48.1537311200616216, -56.17377647877354008 48.15370909768544294, -56.17365516272131742 48.15360509004312206, -56.17356250141155982 48.15357006108361304, -56.17342211244615413 48.15352136957375961, -56.1733935436061671 48.15351290182599797, -56.17335410303405752 48.15350510139658979, -56.17331312099278762 48.15350128942540664, -56.17327059748252793 48.15350146591244851, -56.17322653250303688 48.15350563085772251, -56.17318092605457736 48.15351378426120021, -56.17288794942524532 48.15357979536181432)",
+ "LineString (-56.17346410546855395 48.15431927868949913, -56.17351254803566007 48.1543124487957428, -56.17355491269359646 48.15429968670578376, -56.17372137839770119 48.15421964085013684, -56.17373902987237955 48.15420976802784736, -56.17377912118936933 48.15417838341521417, -56.17387798689843237 48.15411566905937946, -56.17389355925946148 48.1541030924237532, -56.1740008485967266 48.15397177880820578, -56.17399331010587815 48.15394798361680984, -56.17397938060714324 48.15391900304007322, -56.17396202835791996 48.15389382122221207, -56.17394855866371017 48.15387914376523071, -56.17393356774706348 48.15386615464552733, -56.17390822908000558 48.15384983659836138, -56.1738465388923629 48.1538226304847683)",
+ "LineString (-56.17289973401313574 48.15363312705168397, -56.1728726983497495 48.1537423928756283, -56.17285903940404523 48.15382052088769882, -56.17285253203740325 48.1538901503861041, -56.1728533843805522 48.15395355314647219)",
+ "LineString (-56.17339249329470618 48.15414528597979427, -56.17337140507651583 48.15412707844306794, -56.17326125975793616 48.15402262358290386, -56.17321745436778713 48.15398604343633338, -56.17319806293877349 48.15396551480785092)",
+ "LineString (-56.1738465388923629 48.1538226304847683, -56.17382273848756569 48.15384417554802354, -56.17380363254343223 48.15385785292612297, -56.17378450486324937 48.15386840032022064, -56.17375400565509125 48.15388208374844226, -56.17373804055308284 48.15389306128930258, -56.17362995636963774 48.15398962201392408, -56.17361479451715667 48.15400158277406462, -56.17349110063382511 48.15406671339926703, -56.17339249329470618 48.15414528597979427)",
+ "LineString (-56.17343850951240825 48.15431337806077039, -56.17344084531075055 48.15432383437608621, -56.17342222336740321 48.15435918000147808, -56.17336201359460546 48.1544464745416505, -56.17330472581554801 48.15453868346931898, -56.17324679106634733 48.15461236585213101, -56.17311324642550829 48.15476865497708303, -56.17305391646608825 48.1548559741208777, -56.17300892649970478 48.15499219517181473, -56.17298511893308444 48.15505176689791966, -56.17276401020734511 48.15528069457062088, -56.1727263651094475 48.15532690488694811, -56.17269271148098397 48.1553765422040243, -56.17266810686121659 48.15541978890427544, -56.17265929905607891 48.1554898936763891, -56.17264729475871121 48.15555650517431729, -56.17259506528234425 48.15561423785060668, -56.17255982358604882 48.1556582824542474, -56.17243342172182707 48.1558501731712596, -56.17234716392344041 48.15596231790146931, -56.17232989032302726 48.15598847509937741, -56.17231420686668031 48.15601665601658254, -56.17229576914900235 48.15605737858062696, -56.1722837960288004 48.15609028150957016, -56.17227030542603927 48.1561373000890498, -56.17226204194452777 48.15617492880366513, -56.17224215257347453 48.15621379923889123, -56.17222848304916738 48.15624454321513781, -56.17220435475390872 48.15631011737819733, -56.1721942827806231 48.15634359656294805, -56.17219380510591265 48.15638365728174364, -56.17211954294759124 48.1564715157782075, -56.17208906226555598 48.15651206406656826, -56.1720516967075838 48.15657124785596466, -56.17201385485297749 48.15664339708700936, -56.17197714308144185 48.15667719419862181, -56.17190433157792029 48.15673638453092309, -56.17186142007533078 48.15677815821080543, -56.17182876664180924 48.15681590621517927, -56.17169872813539655 48.15697896588497429, -56.17156353684264758 48.15727842476548659, -56.17154587224663231 48.15732490136749533, -56.17152647277276145 48.15738782060589074)",
+ "LineString (-56.17346410546855395 48.15431927868949913, -56.1734513994528939 48.15432060863880537, -56.17343850951240825 48.15431337806077039)",
+ "LineString (-56.17343850951240825 48.15431337806077039, -56.17341082044801226 48.15419410015633161, -56.17339249329470618 48.15414528597979427)",
+ "LineString (-56.17343850951240825 48.15431337806077039, -56.17327285258231484 48.15427690569465113, -56.1731461539218131 48.15426356644837824, -56.17303978624156713 48.15423018704066749, -56.17299753966918274 48.1542104123899648, -56.17292518626948095 48.15415971744067747, -56.17291179328810813 48.15414468460239306, -56.17290653060060635 48.15413546433633485, -56.17287182282627356 48.15405291594240822, -56.17286418447627483 48.15403104464070339, -56.17285648424005728 48.15399377274875548, -56.1728533843805522 48.15395355314647219)",
+ "LineString (-56.17319806293877349 48.15396551480785092, -56.17317882750821667 48.15394342522611737, -56.17314644337180596 48.15389567278619865, -56.17311756923123056 48.15386004070586523, -56.17309171536950174 48.15383371961974035, -56.17303018575653795 48.15377960278107849, -56.17299826810275221 48.1537483621343867, -56.17295505246662657 48.15370112127456537, -56.17289973401313574 48.15363312705168397)",
+ "LineString (-56.17289973401313574 48.15363312705168397, -56.17288794942524532 48.15357979536181432)",
+ "LineString (-56.17331874725046958 48.15247185526420282, -56.17321771400213493 48.15258462348108282, -56.1731896184086068 48.15261321269109374, -56.17315261027007267 48.15264599707158766, -56.17306999180670601 48.15271156465028923, -56.17302712990065316 48.15275162525262687, -56.17300076238451823 48.15278063866216485, -56.17294525198924049 48.15284684880123223, -56.17285968898673332 48.15293607755256033, -56.17283261839435227 48.1529664612708217, -56.17278855784918079 48.15302441705457426, -56.17275414768430863 48.15307893985170296, -56.17272783896903121 48.15312779285699918, -56.17267440682760338 48.15323946195221083, -56.17267753188112778 48.1532609794578903, -56.17268028857595397 48.15326951676324541, -56.1726936474290568 48.15330749108542818, -56.17271242933410491 48.15335376729642292, -56.1727426129001941 48.15341632950103445, -56.17277733351483704 48.15347629646583272, -56.17282994279646857 48.15353014079519767, -56.17288794942524532 48.15357979536181432)",
+
+ "LINESTRING (-56.17095823779889 48.1582380851948, -56.17051995568352 48.15862058595004)",
+ "LINESTRING (-56.17152647277276 48.15738782060589, -56.17082542503666 48.15770683414587, -56.17095823779889 48.1582380851948)",
+ "LINESTRING (-56.17152647277276 48.15738782060589, -56.171781676924745 48.15765105278573, -56.17167542671496 48.15808667864586, -56.17114683192126 48.1582673040025, -56.17095823779889 48.1582380851948)",
+ "LINESTRING (-56.17331874725047 48.1524718552642, -56.170702787190116 48.15307995448517, -56.16992810524585 48.155243027446424, -56.170763152016946 48.15706403305567, -56.17152647277276 48.15738782060589)",
+ "LINESTRING (-56.17413352151471 48.15190284036207, -56.17331874725047 48.1524718552642)",
+
+
+ };
+
+ Coordinate sink = new Coordinate( -56.17051995568352, 48.15862058595004);
+ directionalize(edges, sink, getLatLong(), getPropertiesDegree());
+ }
+ @Test
+ public void testCoastlineSourceSink() throws Exception{
+ String[] edges = new String[] {
+ "LINESTRING (0 0, 0 1, 1 1)",
+ "LINESTRING (1 1, 1 0)",
+ //"LINESTRING (1 1, 2 0)",
+ };
+ Coordinate sink1 = new Coordinate(0, 0);
+ Coordinate sink2 = new Coordinate(1, 0);
+
+ List sinks = new ArrayList<>();
+ sinks.add(sink1);
+ sinks.add(sink2);
+
+ DGraph graph = makeGraph(edges, DirectionType.KNOWN);
+ Directionalizer dd = new Directionalizer(getLatLong(), getPropertiesDegree());
+ dd.directionalize(graph, sinks);
+
+ printEdges(graph);
+ }
@Test
public void testAnglePath2() throws Exception{
@@ -678,6 +727,10 @@ public void testMultiSinks() throws Exception {
}
private DGraph makeGraph(String[] edges) throws ParseException {
+ return makeGraph(edges, DirectionType.UNKNOWN);
+ }
+
+ private DGraph makeGraph(String[] edges, DirectionType type) throws ParseException {
int i = 0;
WKTReader reader = new WKTReader();
List gedges = new ArrayList<>();
@@ -689,7 +742,7 @@ private DGraph makeGraph(String[] edges) throws ParseException {
ls.getCoordinateN(1),
ls.getCoordinateN(ls.getCoordinates().length - 2),
ls.getCoordinateN(ls.getCoordinates().length - 1),
- EfType.SKELETON, new FeatureIdImpl(i + ""), ls.getLength(), DirectionType.UNKNOWN);
+ EfType.SKELETON, new FeatureIdImpl(i + ""), ls.getLength(), type);
i++;
gedges.add(info);
flows.put(info.getID(), ls);
@@ -698,7 +751,7 @@ private DGraph makeGraph(String[] edges) throws ParseException {
DGraph graph = DGraph.buildGraphLines(gedges);
return graph;
}
-
+
private void printEdges(DGraph g) {
g.edges.forEach(e -> {
if (e.getID() != null)
diff --git a/chyf-flowpath-constructor/src/test/java/net/refractions/chyf/flowpathconstructor/PointGeneratorTest.java b/chyf-flowpath-constructor/src/test/java/net/refractions/chyf/flowpathconstructor/PointGeneratorTest.java
index 954ef92..3abcb1a 100644
--- a/chyf-flowpath-constructor/src/test/java/net/refractions/chyf/flowpathconstructor/PointGeneratorTest.java
+++ b/chyf-flowpath-constructor/src/test/java/net/refractions/chyf/flowpathconstructor/PointGeneratorTest.java
@@ -32,7 +32,6 @@
import org.locationtech.jts.io.WKTReader;
import net.refractions.chyf.datasource.FlowDirection;
-import net.refractions.chyf.flowpathconstructor.ChyfProperties;
import net.refractions.chyf.flowpathconstructor.ChyfProperties.Property;
import net.refractions.chyf.flowpathconstructor.datasource.FlowpathGeoPackageDataSource.NodeType;
import net.refractions.chyf.flowpathconstructor.skeletonizer.points.ConstructionPoint;
@@ -70,7 +69,7 @@ public void testIsolatedSelfIntersecting() throws Exception{
expected.add(new ConstructionPoint(new Coordinate(-91.3474269, 47.6426803),NodeType.HEADWATER,FlowDirection.INPUT, null));
expected.add(new ConstructionPoint(new Coordinate(-91.344514, 47.6441762),NodeType.TERMINAL,FlowDirection.OUTPUT, null));
expected.add(new ConstructionPoint(new Coordinate(-91.3487186, 47.6428251),NodeType.BANK,FlowDirection.INPUT, null));
- expected.add(new ConstructionPoint(new Coordinate(-91.3510455, 47.647081),NodeType.BANK,FlowDirection.INPUT, null));
+ expected.add(new ConstructionPoint(new Coordinate(-91.3430125, 47.6370375),NodeType.BANK,FlowDirection.INPUT, null));
Assert.assertEquals("invalid number of nodes", expected.size(), pnts.size());
setEquals(expected, pnts);
@@ -225,7 +224,7 @@ public void wbMultiLineSamePoint() throws Exception{
Set expected = new HashSet<>();
expected.add(new ConstructionPoint(new Coordinate(1125.2, 865.4),NodeType.TERMINAL,FlowDirection.OUTPUT, null));
expected.add(new ConstructionPoint(new Coordinate(615.2, 888.9),NodeType.FLOWPATH,FlowDirection.INPUT, null));
- expected.add(new ConstructionPoint(new Coordinate(778.6, 744.4),NodeType.BANK,FlowDirection.INPUT, null));
+ expected.add(new ConstructionPoint(new Coordinate(923.1, 983.0),NodeType.BANK,FlowDirection.INPUT, null));
Assert.assertEquals("invalid number of nodes", expected.size(), pnts.size());
setEquals(expected, pnts);
@@ -703,7 +702,7 @@ public void testSingleOut() throws Exception {
Set expected = new HashSet<>();
expected.add(new ConstructionPoint(new Coordinate(-73.3160047, 45.5521535), NodeType.HEADWATER, FlowDirection.INPUT, null));
expected.add(new ConstructionPoint(new Coordinate(-73.3142681, 45.550576), NodeType.FLOWPATH, FlowDirection.OUTPUT, null));
- expected.add(new ConstructionPoint(new Coordinate(-73.3145981, 45.5514674), NodeType.BANK, FlowDirection.INPUT, null));
+ expected.add(new ConstructionPoint(new Coordinate(-73.3159578, 45.5508397), NodeType.BANK, FlowDirection.INPUT, null));
Assert.assertEquals("invalid number of nodes", expected.size(), pnts.size());
setEquals(expected, pnts);
@@ -740,9 +739,9 @@ public void testIsolatedWaterbody() throws Exception {
List pnts = pg.getPoints();
Set expected = new HashSet<>();
- expected.add(new ConstructionPoint(new Coordinate(-73.3240431,45.5413862), NodeType.TERMINAL, FlowDirection.OUTPUT, null));
- expected.add(new ConstructionPoint(new Coordinate(-73.3268319,45.5422723), NodeType.BANK, FlowDirection.INPUT, null));
- expected.add(new ConstructionPoint(new Coordinate(-73.3268155,45.5393028), NodeType.HEADWATER, FlowDirection.INPUT, null));
+ expected.add(new ConstructionPoint(new Coordinate(-73.3240431, 45.5413862), NodeType.TERMINAL, FlowDirection.OUTPUT, null));
+ expected.add(new ConstructionPoint(new Coordinate(-73.3268155, 45.5393028), NodeType.HEADWATER, FlowDirection.INPUT, null));
+ expected.add(new ConstructionPoint(new Coordinate(-73.322512, 45.5396022), NodeType.BANK, FlowDirection.INPUT, null));
Assert.assertEquals("invalid number of nodes", expected.size(), pnts.size());
setEquals(expected, pnts);
@@ -756,8 +755,8 @@ public void testIsolatedWaterbody() throws Exception {
expected = new HashSet<>();
expected.add(new ConstructionPoint(new Coordinate(-73.3389781, 45.5354423), NodeType.HEADWATER, FlowDirection.INPUT, null));
- expected.add(new ConstructionPoint(new Coordinate(-73.345556,45.5413273), NodeType.TERMINAL, FlowDirection.OUTPUT, null));
- expected.add(new ConstructionPoint(new Coordinate(-73.343272,45.5383907), NodeType.BANK, FlowDirection.INPUT, null));
+ expected.add(new ConstructionPoint(new Coordinate(-73.345556, 45.5413273), NodeType.TERMINAL, FlowDirection.OUTPUT, null));
+ expected.add(new ConstructionPoint(new Coordinate(-73.3408763, 45.5388913), NodeType.BANK, FlowDirection.INPUT, null));
Assert.assertEquals("invalid number of nodes", expected.size(), pnts.size());
setEquals(expected, pnts);
@@ -773,7 +772,7 @@ public void testIsolatedWaterbody() throws Exception {
expected.add(new ConstructionPoint(new Coordinate(-73.1255718, 45.6092503), NodeType.HEADWATER, FlowDirection.INPUT, null));
expected.add(new ConstructionPoint(new Coordinate(-73.1280229, 45.6089073), NodeType.TERMINAL, FlowDirection.OUTPUT, null));
expected.add(new ConstructionPoint(new Coordinate(-73.1268408, 45.6093084), NodeType.BANK, FlowDirection.INPUT, null));
- expected.add(new ConstructionPoint(new Coordinate(-73.1264731, 45.6086863), NodeType.BANK, FlowDirection.INPUT, null));
+ expected.add(new ConstructionPoint(new Coordinate(-73.1273626, 45.6098771), NodeType.BANK, FlowDirection.INPUT, null));
Assert.assertEquals("invalid number of nodes", expected.size(), pnts.size());
setEquals(expected, pnts);
@@ -837,7 +836,53 @@ public void testWaterbodyComplex() throws Exception{
polygonSetEquals(expectedWbs, pg.getUpdatedPolygons());
}
+ @Test
+ public void testMultiOutHeadwater() throws Exception{
+ String wb = "POLYGON ((-55.82813399999997728 47.69994010000004891, -55.8282285999999317 47.69978800000006913, -55.82843439999993507 47.69970000000006394, -55.82884059999997817 47.69983920000004218, -55.82888569999994388 47.6999046000000817, -55.82869829999998501 47.69999040000004698, -55.82830449999994471 47.70008730000006381, -55.82813399999997728 47.69994010000004891))";
+ String line1 = "LINESTRING (-55.82830449999994471 47.70008730000006381, -55.82817109999996319 47.70019900000005464, -55.82819509999995944 47.70033100000006243, -55.82838689999994131 47.70067470000003595, -55.82823259999997845 47.70111620000005814, -55.82793529999997872 47.7013688000000684, -55.82789619999994102 47.70151450000003024, -55.82779089999996813 47.701661500000057, -55.82756779999994023 47.70171930000003613, -55.8274244999999496 47.70171660000005431)";
+ String line2 = "LINESTRING (-55.82813399999997728 47.69994010000004891, -55.82798889999997982 47.69989270000007764)";
+
+ Polygon polygon = (Polygon)reader.read(wb);
+
+ ArrayList lines = new ArrayList<>();
+ ArrayList polys = new ArrayList<>();
+
+ lines.add((LineString)reader.read(line1));
+ lines.add((LineString)reader.read(line2));
+
+ PointGenerator pg = createPointGenerator();
+ pg.processPolygon(polygon, polys, lines);
+ Collection pnts = pg.getPoints();
+
+ ArrayList expected = new ArrayList<>();
+ expected.add(new ConstructionPoint(new Coordinate(-55.82813399999998, 47.69994010000005),NodeType.FLOWPATH,FlowDirection.OUTPUT, null));
+ expected.add(new ConstructionPoint(new Coordinate(-55.828304499999945, 47.700087300000064),NodeType.FLOWPATH,FlowDirection.OUTPUT, null));
+ expected.add(new ConstructionPoint(new Coordinate(-55.82884059999998, 47.69983920000004),NodeType.HEADWATER,FlowDirection.INPUT, null));
+ expected.add(new ConstructionPoint(new Coordinate(-55.828434399999935, 47.699700000000064),NodeType.BANK,FlowDirection.INPUT, null));
+ expected.add(new ConstructionPoint(new Coordinate(-55.82821924999996, 47.700013700000056),NodeType.BANK,FlowDirection.INPUT, null));
+ Assert.assertEquals("invalid number of nodes", expected.size(), pnts.size());
+ setEquals(expected, pnts);
+
+ ArrayList expectedWbs = new ArrayList<>();
+ expectedWbs.add((Polygon)reader.read("POLYGON ((-55.82813399999998 47.69994010000005, -55.82822859999993 47.69978800000007, -55.828434399999935 47.699700000000064, -55.82884059999998 47.69983920000004, -55.828885699999944 47.69990460000008, -55.828698299999985 47.69999040000005, -55.828304499999945 47.700087300000064, -55.82821924999996 47.700013700000056, -55.82813399999998 47.69994010000005))"));
+
+ polygonSetEquals(expectedWbs, pg.getUpdatedPolygons());
+ }
+
+
+
+ private boolean equals(ConstructionPoint a, ConstructionPoint b) {
+ if (!a.getCoordinate().equals2D(b.getCoordinate())) return false;
+ if (!a.getType().equals(b.getType())) return false;
+ if (!a.getDirection().equals(b.getDirection())) return false;
+ return true;
+ }
+
+ private boolean equals(Polygon a, Polygon b) {
+ return a.equalsExact(b);
+ }
+
private void setEquals(Collection expected, Collection actual) {
for (ConstructionPoint p : expected) {
boolean found = false;
@@ -852,7 +897,7 @@ private void setEquals(Collection expected, Collection expected, Collection actual) {
for (Polygon p : expected) {
boolean found = false;
@@ -867,15 +912,6 @@ private void polygonSetEquals(Collection expected, Collection
}
}
}
-
- private boolean equals(ConstructionPoint a, ConstructionPoint b) {
- if (!a.getCoordinate().equals2D(b.getCoordinate())) return false;
- if (!a.getType().equals(b.getType())) return false;
- if (!a.getDirection().equals(b.getDirection())) return false;
- return true;
- }
-
- private boolean equals(Polygon a, Polygon b) {
- return a.equalsExact(b);
- }
+
+
}
diff --git a/chyf-processing-tools/bank-only-constructor.bat b/chyf-processing-tools/bank-only-constructor.bat
index 3b499ba..9bac655 100644
--- a/chyf-processing-tools/bank-only-constructor.bat
+++ b/chyf-processing-tools/bank-only-constructor.bat
@@ -1 +1 @@
-java -cp lib/*;lib-chyf/chyf-core-${project.version}.jar;lib-chyf/chyf-flowpath-constructor-${project.version}.jar net.refractions.chyf.flowpathconstructor.skeletonizer.bank.BankEngine %*
\ No newline at end of file
+java -cp lib/*;lib-chyf/chyf-core-${chyf.core.version}.jar;lib-chyf/chyf-flowpath-constructor-${flowpath.constructor.version}.jar net.refractions.chyf.flowpathconstructor.skeletonizer.bank.BankEngine %*
\ No newline at end of file
diff --git a/chyf-processing-tools/bank-only-constructor.sh b/chyf-processing-tools/bank-only-constructor.sh
index 209432c..0ac920e 100644
--- a/chyf-processing-tools/bank-only-constructor.sh
+++ b/chyf-processing-tools/bank-only-constructor.sh
@@ -1,2 +1,2 @@
#!/bin/sh
-java -cp lib\*;lib-chyf\chyf-core-${project.version}.jar;lib-chyf\chyf-flowpath-constructor-${project.version}.jar net.refractions.chyf.flowpathconstructor.skeletonizer.bank.BankEngine $@
\ No newline at end of file
+java -cp lib\*;lib-chyf\chyf-core-${chyf.core.version}.jar;lib-chyf\chyf-flowpath-constructor-${flowpath.constructor.version}.jar net.refractions.chyf.flowpathconstructor.skeletonizer.bank.BankEngine $@
\ No newline at end of file
diff --git a/chyf-processing-tools/catchment-delineator.bat b/chyf-processing-tools/catchment-delineator.bat
index 5e5157a..4eac928 100644
--- a/chyf-processing-tools/catchment-delineator.bat
+++ b/chyf-processing-tools/catchment-delineator.bat
@@ -1 +1 @@
-java -cp lib/*;lib-chyf/chyf-core-${project.version}.jar;lib-chyf/chyf-catchment-delineator-${project.version}.jar net.refractions.chyf.watershed.builder.CatchmentDelineator %*
\ No newline at end of file
+java -cp lib/*;lib-chyf/chyf-core-${chyf.core.version}.jar;lib-chyf/chyf-catchment-delineator-${catchment.version}.jar net.refractions.chyf.watershed.builder.CatchmentDelineator %*
\ No newline at end of file
diff --git a/chyf-processing-tools/catchment-delineator.sh b/chyf-processing-tools/catchment-delineator.sh
index eaa50c1..5e8d8ee 100644
--- a/chyf-processing-tools/catchment-delineator.sh
+++ b/chyf-processing-tools/catchment-delineator.sh
@@ -1,2 +1,2 @@
#!/bin/sh
-java -cp lib\*:lib-chyf\chyf-core-${project.version}.jar;lib-chyf\chyf-catchment-delineator-${project.version}.jar net.refractions.chyf.watershed.builder.CatchmentDelineator $@
\ No newline at end of file
+java -cp lib\*:lib-chyf\chyf-core-${chyf.core.version}.jar;lib-chyf\chyf-catchment-delineator-${catchment.version}.jar net.refractions.chyf.watershed.builder.CatchmentDelineator $@
\ No newline at end of file
diff --git a/chyf-processing-tools/flowpath-constructor.bat b/chyf-processing-tools/flowpath-constructor.bat
index 61b20e5..5d9bafa 100644
--- a/chyf-processing-tools/flowpath-constructor.bat
+++ b/chyf-processing-tools/flowpath-constructor.bat
@@ -1 +1 @@
-java -cp lib/*;lib-chyf/chyf-core-${project.version}.jar;lib-chyf/chyf-flowpath-constructor-${project.version}.jar net.refractions.chyf.flowpathconstructor.FlowpathConstructor %*
\ No newline at end of file
+java -cp lib/*;lib-chyf/chyf-core-${chyf.core.version}.jar;lib-chyf/chyf-flowpath-constructor-${flowpath.constructor.version}.jar net.refractions.chyf.flowpathconstructor.FlowpathConstructor %*
\ No newline at end of file
diff --git a/chyf-processing-tools/flowpath-constructor.sh b/chyf-processing-tools/flowpath-constructor.sh
index e46b51d..7ed043e 100644
--- a/chyf-processing-tools/flowpath-constructor.sh
+++ b/chyf-processing-tools/flowpath-constructor.sh
@@ -1,2 +1,2 @@
#!/bin/sh
-java -cp lib\*;lib-chyf\chyf-core-${project.version}.jar;lib-chyf\chyf-flowpath-constructor-${project.version}.jar net.refractions.chyf.flowpathconstructor.FlowpathConstructor $@
\ No newline at end of file
+java -cp lib\*;lib-chyf\chyf-core-${chyf.core.version}.jar;lib-chyf\chyf-flowpath-constructor-${flowpath.constructor.version}.jar net.refractions.chyf.flowpathconstructor.FlowpathConstructor $@
\ No newline at end of file
diff --git a/chyf-processing-tools/geopackage-reprojector.bat b/chyf-processing-tools/geopackage-reprojector.bat
index 4d167ed..87568c8 100644
--- a/chyf-processing-tools/geopackage-reprojector.bat
+++ b/chyf-processing-tools/geopackage-reprojector.bat
@@ -1 +1 @@
-java -cp lib/*;lib-chyf/chyf-core-${project.version}.jar;lib-chyf/chyf-catchment-delineator-${project.version}.jar net.refractions.chyf.util.gpkg.GeoPackageReprojector %*
\ No newline at end of file
+java -cp lib/*;lib-chyf/chyf-core-${chyf.core.version}.jar;lib-chyf/chyf-catchment-delineator-${catchment.version}.jar net.refractions.chyf.util.gpkg.GeoPackageReprojector %*
\ No newline at end of file
diff --git a/chyf-processing-tools/geopackage-reprojector.sh b/chyf-processing-tools/geopackage-reprojector.sh
index b783d72..3264ea8 100644
--- a/chyf-processing-tools/geopackage-reprojector.sh
+++ b/chyf-processing-tools/geopackage-reprojector.sh
@@ -1,2 +1,2 @@
#!/bin/sh
-java -cp lib\*:lib-chyf\chyf-core-${project.version}.jar;lib-chyf\chyf-catchment-delineator-${project.version}.jar net.refractions.chyf.util.gpkg.GeoPackageReprojector $@
\ No newline at end of file
+java -cp lib\*:lib-chyf\chyf-core-${chyf.core.version}.jar;lib-chyf\chyf-catchment-delineator-${catchment.version}.jar net.refractions.chyf.util.gpkg.GeoPackageReprojector $@
\ No newline at end of file
diff --git a/chyf-processing-tools/pom.xml b/chyf-processing-tools/pom.xml
index 663f868..247f208 100644
--- a/chyf-processing-tools/pom.xml
+++ b/chyf-processing-tools/pom.xml
@@ -1,54 +1,54 @@
-
-
-
- net.refractions.chyf
- chyf-root
- 1.0.1
-
-
- 4.0.0
- chyf-processing-tools
- pom
-
- CHyF Processing Tools
- A set of tools for processing data into the CHyF format
-
-
- ${project.artifactId}-${project.version}-${timestamp}
-
-
-
+
+
+
+ net.refractions.chyf
+ chyf-root
+ 1.0.1
+
+
+ 4.0.0
+ chyf-processing-tools
+ ${chyf.processingtools.version}
+ pom
+ CHyF Processing Tools
+ A set of tools for processing data into the CHyF format
+
+
+ ${project.artifactId}-${project.version}-${timestamp}
+
+
org.apache.maven.plugins
maven-assembly-plugin
-
+
- windows
+ windows
package
single
false
- mvn-assembly.xml
+
+ mvn-assembly.xml
+
-
-
-
-
-
-
-
- net.refractions.chyf
- chyf-flowpath-constructor
- ${project.version}
-
-
- net.refractions.chyf
- chyf-catchment-delineator
- ${project.version}
-
-
-
+
+
+
+
+
+ net.refractions.chyf
+ chyf-flowpath-constructor
+ ${flowpath.constructor.version}
+
+
+ net.refractions.chyf
+ chyf-catchment-delineator
+ ${catchment.version}
+
+
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index a0297cf..f657ddc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,15 +9,23 @@
pom
+
+ 1.0.2
+
+ 1.0.1
+
+ 1.0.2
+
+ 1.0.1
+
UTF-8
21.1
5.5.2
1.1.7
1.7.25
1.4
-
${maven.build.timestamp}
- yyyyMMddHHmm
+ yyyyMMddHHmm
@@ -25,7 +33,7 @@
chyf-flowpath-constructor
chyf-catchment-delineator
chyf-processing-tools
- chyf-web
+