Changeset 18185 in josm for trunk/src/org
- Timestamp:
- 2021-08-31T18:19:49+02:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/imagery/vectortile/mapbox/Geometry.java
r18183 r18185 48 48 int y = 0; 49 49 // Area is used to determine the inner/outer of a polygon 50 final int maxArraySize = commands.stream().filter(command -> command.getType() != Command.ClosePath).mapToInt(command -> command.getOperations().length).sum(); 50 final int maxArraySize = commands.stream().filter(command -> command.getType() != Command.ClosePath) 51 .mapToInt(command -> command.getOperations().length).sum(); 51 52 final List<Integer> xArray = new ArrayList<>(maxArraySize); 52 53 final List<Integer> yArray = new ArrayList<>(maxArraySize); … … 79 80 } 80 81 81 final double areaAreaSq = calculateSurveyorsArea(xArray.stream().mapToInt(i -> i).toArray(), yArray.stream().mapToInt(i -> i).toArray()); 82 final double areaAreaSq = calculateSurveyorsArea(xArray.stream().mapToInt(i -> i).toArray(), 83 yArray.stream().mapToInt(i -> i).toArray()); 82 84 Area nArea = new Area(line); 83 85 // SonarLint thinks that this is never > 0. It can be. … … 89 91 throw new IllegalArgumentException(tr("{0} cannot have zero area", geometryType)); 90 92 } 93 xArray.clear(); 94 yArray.clear(); 91 95 } else { 92 96 throw new IllegalArgumentException(tr("{0} with {1} arguments is not understood", geometryType, operations.length));
Note:
See TracChangeset
for help on using the changeset viewer.