Skip to content

Commit

Permalink
hack: use SpeedMatcher via ShapefileLts mod
Browse files Browse the repository at this point in the history
  • Loading branch information
ansoncfit committed May 23, 2022
1 parent 2564cb1 commit 039cc70
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import com.conveyal.analysis.datasource.DataSourceException;
import com.conveyal.file.FileStorageFormat;
import com.conveyal.file.FileStorageKey;
import com.conveyal.r5.shapefile.LtsMatcher;
import com.conveyal.r5.shapefile.SpeedMatcher;
import com.conveyal.r5.transit.TransportNetwork;
import com.conveyal.r5.transit.TransportNetworkCache;
import com.conveyal.r5.util.ExceptionUtils;
Expand Down Expand Up @@ -56,7 +56,7 @@ public boolean apply (TransportNetwork network) {
// Replicate the entire flags array so we can write to it (following copy-on-write policy).
// Otherwise the TIntAugmentedList only allows extending the base graph.
network.streetLayer.edgeStore.flags = new TIntArrayList(network.streetLayer.edgeStore.flags);
LtsMatcher shapefileMatcher = new LtsMatcher(network.streetLayer);
SpeedMatcher shapefileMatcher = new SpeedMatcher(network.streetLayer);
try {
shapefileMatcher.match(localFile.getAbsolutePath(), ltsAttribute);
} catch (Exception e) {
Expand Down

0 comments on commit 039cc70

Please sign in to comment.