|
From: <de...@us...> - 2015-09-17 21:38:34
|
Revision: 9168
http://sourceforge.net/p/fudaa/svn/9168
Author: deniger
Date: 2015-09-17 21:38:31 +0000 (Thu, 17 Sep 2015)
Log Message:
-----------
CRUE-669
Modified Paths:
--------------
trunk/soft/fudaa-crue/ui-planimetry/src/main/java/org/fudaa/fudaa/crue/planimetry/controller/LayerTraceGisBuilder.java
Modified: trunk/soft/fudaa-crue/ui-planimetry/src/main/java/org/fudaa/fudaa/crue/planimetry/controller/LayerTraceGisBuilder.java
===================================================================
--- trunk/soft/fudaa-crue/ui-planimetry/src/main/java/org/fudaa/fudaa/crue/planimetry/controller/LayerTraceGisBuilder.java 2015-09-10 19:54:58 UTC (rev 9167)
+++ trunk/soft/fudaa-crue/ui-planimetry/src/main/java/org/fudaa/fudaa/crue/planimetry/controller/LayerTraceGisBuilder.java 2015-09-17 21:38:31 UTC (rev 9168)
@@ -109,6 +109,7 @@
for (int i = nb - 1; i >= 0; i--) {
CatEMHBranche branche = brancheController.getBranche(i);
GISPolyligne brancheGis = brancheController.getBrancheGis(i);
+
TObjectDoubleHashMap<RelationEMHSectionDansBranche> ratiosBySection = LayerSectionGisBuilder.getRatio(i, realDistance,
brancheController);
for (TObjectDoubleIterator it = ratiosBySection.iterator(); it.hasNext();) {
@@ -140,8 +141,10 @@
endAngleInRadians = Math.toRadians(endAngleInDegree);
}
GISPolyligne traceGIS = createLine(profilSection, brancheGis, tmpResult, startAngleInRadians, endAngleInRadians);
- newSectionCollection.addPolyligne(traceGIS, planimetryGisModelContainer.buildTraceData(
- sectionDansBranche, branche, startAngleInDegree, endAngleInDegree), null);
+ if (traceGIS != null) {
+ newSectionCollection.addPolyligne(traceGIS, planimetryGisModelContainer.buildTraceData(
+ sectionDansBranche, branche, startAngleInDegree, endAngleInDegree), null);
+ }
}
}
newSectionCollection.setGeomModifiable(false);
@@ -187,14 +190,13 @@
}
}
-
int segmentidx = tmpResult.getSegmentidx();
Coordinate amont = brancheGis.getCoordinateN(segmentidx);
Coordinate aval = brancheGis.getCoordinateN(segmentidx + 1);
- if (amont.equals2D(aval)) {
+ double norm = amont.distance(aval);
+ if (norm == 0) {
return null;
}
- double norm = amont.distance(aval);
double vx = aval.x - amont.x;
double vy = aval.y - amont.y;
double vxTrace = (vy) / norm;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|