Skip to content

Commit

Permalink
fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
rakow committed Aug 22, 2023
1 parent c44f120 commit 7d71413
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/main/java/org/matsim/prepare/CreateMATSimFacilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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"
Expand Down Expand Up @@ -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));
}
Expand Down Expand Up @@ -160,7 +159,7 @@ private List<Coord> 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()
));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 7d71413

Please sign in to comment.