diff --git a/src/main/java/org/matsim/prepare/CreateMATSimFacilities.java b/src/main/java/org/matsim/prepare/CreateMATSimFacilities.java index f3d6a0fc..a63bcfc8 100644 --- a/src/main/java/org/matsim/prepare/CreateMATSimFacilities.java +++ b/src/main/java/org/matsim/prepare/CreateMATSimFacilities.java @@ -14,6 +14,7 @@ import org.matsim.application.options.ShpOptions; import org.matsim.core.network.NetworkUtils; import org.matsim.core.network.algorithms.TransportModeNetworkFilter; +import org.matsim.core.utils.geometry.CoordUtils; import org.matsim.core.utils.geometry.geotools.MGC; import org.matsim.facilities.*; import org.opengis.feature.simple.SimpleFeature; @@ -25,8 +26,6 @@ import java.util.function.Function; import java.util.stream.Collectors; -import static org.matsim.prepare.RunOpenBerlinCalibration.roundCoord; - @CommandLine.Command( name = "facilities", description = "Creates MATSim facilities from shape-file and network" @@ -92,7 +91,7 @@ public Integer call() throws Exception { continue; } - ActivityFacility facility = f.createActivityFacility(id, roundCoord(new Coord(x.getAsDouble(), y.getAsDouble()))); + ActivityFacility facility = f.createActivityFacility(id, CoordUtils.round(new Coord(x.getAsDouble(), y.getAsDouble()))); for (String act : h.activities) { facility.addActivityOption(f.createActivityOption(act)); } @@ -160,7 +159,7 @@ private List samplePoints(MultiPolygon geometry, int n) { int max = n * 10; for (int i = 0; i < max && result.size() < n; i++) { - Coord coord = roundCoord(new Coord( + Coord coord = CoordUtils.round(new Coord( bbox.getMinX() + (bbox.getMaxX() - bbox.getMinX()) * rnd.nextDouble(), bbox.getMinY() + (bbox.getMaxY() - bbox.getMinY()) * rnd.nextDouble() )); diff --git a/src/main/java/org/matsim/prepare/network/FreeSpeedOptimizer.java b/src/main/java/org/matsim/prepare/network/FreeSpeedOptimizer.java index 3d6ca0de..41f82c08 100644 --- a/src/main/java/org/matsim/prepare/network/FreeSpeedOptimizer.java +++ b/src/main/java/org/matsim/prepare/network/FreeSpeedOptimizer.java @@ -29,6 +29,7 @@ import org.matsim.api.core.v01.network.Node; import org.matsim.application.CommandSpec; import org.matsim.application.MATSimAppCommand; +import org.matsim.application.analysis.traffic.traveltime.SampleValidationRoutes; import org.matsim.application.options.InputOptions; import org.matsim.contrib.osm.networkReader.LinkProperties; import org.matsim.core.network.NetworkUtils; @@ -37,7 +38,6 @@ import org.matsim.core.router.util.LeastCostPathCalculator; import org.matsim.core.trafficmonitoring.FreeSpeedTravelTime; import org.matsim.core.utils.geometry.CoordUtils; -import org.matsim.prepare.traveltime.SampleValidationRoutes; import picocli.CommandLine; import java.io.File;