Explorar o código

港口测试底图栅格json

huangchunxi hai 3 meses
pai
achega
027f285ffa
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/main/java/com/ecnu/platform/test/TestPortGrid.groovy

+ 2 - 2
src/main/java/com/ecnu/platform/test/TestPortGrid.groovy

@@ -74,7 +74,7 @@ class TestPortGrid {
                 algBaseMapArea.setType("lane")
 
                 double xNext = xJobLane + k * gridInterval
-                if (xNext + gridInterval < widthJobLane){
+                if ((k+1) * gridInterval < widthJobLane){
                     for (int j = 0;j < 5; j++){
                         coordinateJobGrid += xNext + xUnitList.get(j) * gridInterval + ","
                         coordinateJobGrid += yNext + yUnitList.get(j) * heightJobLane
@@ -124,7 +124,7 @@ class TestPortGrid {
                 algBaseMapArea.setType("lane")
 
                 double xNext = xTrafficLane + k * gridInterval
-                if (xNext + gridInterval < widthJobLane){
+                if ((k+1) * gridInterval < widthTrafficLane){
                     for (int j = 0;j < 5; j++){
                         coordinateTrafficGrid += xNext + xUnitList.get(j) * gridInterval + ","
                         coordinateTrafficGrid += yNext + yUnitList.get(j) * heightTrafficLane