Skip to content

Commit

Permalink
Atualizando a versão do R5 para 7.2.
Browse files Browse the repository at this point in the history
Pequenos ajustes e limpeza de código.
  • Loading branch information
mvpsaraiva committed Oct 20, 2024
1 parent 93e7ba0 commit db3de06
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import com.conveyal.r5.analyst.fare.FareBounds;
import com.conveyal.r5.analyst.fare.InRoutingFareCalculator;
import com.conveyal.r5.analyst.fare.TransferAllowance;
import com.conveyal.r5.profile.McRaptorSuboptimalPathProfileRouter;
import com.conveyal.r5.transit.RouteInfo;
import com.conveyal.r5.transit.TransitLayer;
Expand Down
1 change: 1 addition & 0 deletions java-r5rcore/src/org/ipea/r5r/Network/NetworkChecker.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public static boolean checkR5NetworkVersion(String dataFolder) throws FileNotFou
byte[] header = new byte[HEADER.length];
input.read(header, 0, header.length);
if (!Arrays.equals(HEADER, header)) {
input.close();
throw new RuntimeException("Unrecognized file header. Is this an R5 Kryo network?");
}
String formatVersion = kryo.readObject(input, String.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import org.ipea.r5r.RoutingProperties;
import org.ipea.r5r.Utils.Utils;

import java.io.IOException;
import java.text.ParseException;
import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.atomic.AtomicInteger;
Expand Down
2 changes: 0 additions & 2 deletions java-r5rcore/src/org/ipea/r5r/Process/R5Process.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
package org.ipea.r5r.Process;

import com.conveyal.r5.analyst.FreeFormPointSet;
import com.conveyal.r5.analyst.cluster.PathResult;
import com.conveyal.r5.analyst.cluster.RegionalTask;
import com.conveyal.r5.analyst.scenario.Scenario;
import com.conveyal.r5.api.util.LegMode;
import com.conveyal.r5.api.util.TransitModes;
import com.conveyal.r5.profile.StreetMode;
import com.conveyal.r5.transit.TransportNetwork;
import org.ipea.r5r.Fares.RuleBasedInRoutingFareCalculator;
import org.ipea.r5r.RDataFrame;
import org.ipea.r5r.RoutingProperties;
import org.ipea.r5r.Utils.Utils;
Expand Down
4 changes: 3 additions & 1 deletion r-package/R/isochrone.R
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,10 @@ isochrone <- function(r5r_core,

network_e <- r5r::street_network_to_sf(r5r_core)$edges

sf::st_agr(network_e) = "constant"

destinations <- sf::st_centroid(network_e)
}
}

# rename id col
names(destinations)[1] <- 'id'
Expand Down
2 changes: 1 addition & 1 deletion r-package/tests/testthat/test-z_r5r_cache.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ test_that("r5r_cache", {
r5r::download_r5(force_update = FALSE)

# cache dir
cache_d <- paste0('r5r/r5_jar_v', "7.1.0")
cache_d <- paste0('r5r/r5_jar_v', r5r_env$r5_jar_version)
cache_dir <- tools::R_user_dir(cache_d, which = 'cache')

# list cached files
Expand Down

0 comments on commit db3de06

Please sign in to comment.