Skip to content

Commit

Permalink
style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rakow committed Jul 10, 2023
1 parent 768ac91 commit c58a489
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 153 deletions.
Binary file added input/v6.0/berlin-v6.0-routes-ref.csv.gz
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
import java.util.regex.Pattern;

/**
* Data can be obtained at Data portal from Berlin:
* Data can be obtained at Data portal from Berlin.
* <a href="https://fbinter.stadt-berlin.de/fb/?loginkey=alphaDataStart&alphaDataId=s_vmengen2019@senstadt">GeoPortal Berlin</a>
*/
@CommandLine.Command(name = "counts-from-geoportal", description = "Creates MATSim counts from Berlin FIS Broker count data")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ private void readExcelFile(String excel) {

try {
wb = new XSSFWorkbook(excel);
} catch (Exception e) {
} catch (IOException e) {
log.error("Error reading excel file", e);
throw new RuntimeException("Error reading excel file");
}
Expand Down
139 changes: 0 additions & 139 deletions src/main/java/org/matsim/prepare/counts/NetworkGeometryParser.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ abstract class AbstractRouteValidator implements RouteValidator {

protected final CloseableHttpClient httpClient;

public AbstractRouteValidator(String apiKey) {
AbstractRouteValidator(String apiKey) {
this.apiKey = apiKey;

mapper = new ObjectMapper();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
package org.matsim.prepare.traveltime;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.PropertyAccessor;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import org.apache.hc.client5.http.impl.classic.CloseableHttpClient;
import org.apache.hc.client5.http.impl.classic.HttpClients;
import org.apache.hc.core5.http.ContentType;
import org.apache.hc.core5.http.io.support.ClassicRequestBuilder;
import org.matsim.api.core.v01.Coord;
Expand Down Expand Up @@ -77,17 +70,17 @@ private static final class Request {
ZonedDateTime departureTime;
String units = "METRIC";

public Request(Coord from, Coord to, int hour) {
Request(Coord from, Coord to, int hour) {
origin = new Location(from);
destination = new Location(to);
departureTime = RouteValidator.createDateTime(hour);
}
}

private final static class Location {
private static final class Location {
final Map<String, Object> location;

public Location(Coord coord) {
Location(Coord coord) {

location = Map.of("latLng", Map.of(
"latitude", coord.getY(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import java.util.Locale;

/**
* Access route data from mapbox
* Access route data from mapbox.
*/
public class MapboxRouteValidator extends AbstractRouteValidator {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public static void main(String[] args) {
}

@Override
@SuppressWarnings({"IllegalCatch", "NestedTryDepth"})
public Integer call() throws Exception {

Network network = input.getNetwork();
Expand Down Expand Up @@ -253,6 +254,9 @@ private List<Route> sampleRoutes(Network network, LeastCostPathCalculator router
return result;
}

/**
* Defines different available API services.
*/
public enum Api {
none,
google,
Expand Down

0 comments on commit c58a489

Please sign in to comment.