├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── config.yml │ └── issue_template.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ ├── push-packages.yml │ ├── remove-old-artifacts.yml │ └── run_maven_tests.yml ├── .gitignore ├── .gitlab-ci.yml ├── .travis.yml ├── CHANGELOG.md ├── CONTRIBUTING.md ├── CONTRIBUTORS.md ├── LICENSE.txt ├── NOTICE.md ├── PULL_REQUEST_TEMPLATE.md ├── README.md ├── appveyor.yml ├── benchmark ├── benchmark.sh ├── download_map.sh ├── little_custom.yml ├── post_benchmark.sh └── very_custom.yml ├── client-hc ├── README.md ├── pom.xml └── src │ ├── main │ └── java │ │ └── com │ │ └── graphhopper │ │ └── api │ │ ├── GHMRequest.java │ │ ├── GHMatrixAbstractRequester.java │ │ ├── GHMatrixBatchRequester.java │ │ ├── GHMatrixSyncRequester.java │ │ ├── GraphHopperGeocoding.java │ │ ├── GraphHopperMatrixWeb.java │ │ ├── GraphHopperWeb.java │ │ ├── GzipRequestInterceptor.java │ │ ├── MatrixResponse.java │ │ └── model │ │ ├── GHGeocodingEntry.java │ │ ├── GHGeocodingRequest.java │ │ └── GHGeocodingResponse.java │ └── test │ ├── java │ └── com │ │ └── graphhopper │ │ └── api │ │ ├── AbstractGHMatrixWebTester.java │ │ ├── Examples.java │ │ ├── GHMRequestTest.java │ │ ├── GHMatrixBatchTest.java │ │ ├── GHMatrixSyncTest.java │ │ ├── GraphHopperWebTest.java │ │ └── model │ │ └── GHGeocodingResponseRepresentationTest.java │ └── resources │ ├── com │ └── graphhopper │ │ └── api │ │ ├── google-matrix1.json │ │ ├── matrix-connection-not-found-fail-fast.json │ │ ├── matrix-point-not-found-fail-fast.json │ │ ├── matrix-weights-only.json │ │ ├── matrix.json │ │ └── matrix_error.json │ └── fixtures │ └── geocoding-response.json ├── config-example.yml ├── core ├── files │ ├── Laufamholzstrasse.osm.xml │ ├── N43E007.hgt.zip │ ├── N48W125.hgt.zip │ ├── N49E011.hgt.zip │ ├── N50E011.hgt.zip │ ├── N52E008.hgt.zip │ ├── N55W003.hgt.zip │ ├── S29W072.hgt.zip │ ├── andorra.osm.gz │ ├── andorra.osm.pbf │ ├── belarus-east.osm.gz │ ├── berlin-siegessaeule.osm.gz │ ├── campo-grande.osm.gz │ ├── check-swap-usage.sh │ ├── checkstyle.xml │ ├── circle-bug.osm.gz │ ├── edge_based_subnetwork.osm.xml.gz │ ├── krautsand.osm.gz │ ├── krems.osm.gz │ ├── licenses │ │ ├── D3-LICENSE.txt │ │ ├── MAPBOX-LICENSE.txt │ │ ├── autocomplete-license.txt │ │ └── copying-osmosis.txt │ ├── map-bug432.osm.gz │ ├── map-sidewalk-no.osm.gz │ ├── monaco.osm.gz │ ├── moscow.osm.gz │ ├── north-bayreuth.osm.gz │ ├── postgis │ │ └── gh_from_a_to_b_local.sql │ ├── settings.xml │ ├── split.geo.json │ ├── test_simple_pturn.osm.xml │ ├── test_simple_turncosts.osm.xml │ └── update-translations.sh ├── nb-configuration.xml ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── graphhopper │ │ │ ├── GraphHopper.java │ │ │ ├── GraphHopperConfig.java │ │ │ ├── apache │ │ │ └── commons │ │ │ │ ├── collections │ │ │ │ └── IntFloatBinaryHeap.java │ │ │ │ └── lang3 │ │ │ │ └── StringUtils.java │ │ │ ├── coll │ │ │ ├── GHBitSet.java │ │ │ ├── GHBitSetImpl.java │ │ │ ├── GHIntHashSet.java │ │ │ ├── GHIntLongHashMap.java │ │ │ ├── GHIntObjectHashMap.java │ │ │ ├── GHLongArrayList.java │ │ │ ├── GHLongHashSet.java │ │ │ ├── GHLongIntBTree.java │ │ │ ├── GHLongLongHashMap.java │ │ │ ├── GHLongObjectHashMap.java │ │ │ ├── GHObjectIntHashMap.java │ │ │ ├── GHSortedCollection.java │ │ │ ├── GHTBitSet.java │ │ │ ├── GHTreeMapComposed.java │ │ │ ├── LongIntMap.java │ │ │ ├── MapEntry.java │ │ │ ├── MinHeapWithUpdate.java │ │ │ └── OSMIDMap.java │ │ │ ├── config │ │ │ ├── CHProfile.java │ │ │ ├── LMProfile.java │ │ │ └── Profile.java │ │ │ ├── debatty │ │ │ └── java │ │ │ │ └── stringsimilarity │ │ │ │ └── JaroWinkler.java │ │ │ ├── geohash │ │ │ └── SpatialKeyAlgo.java │ │ │ ├── isochrone │ │ │ └── algorithm │ │ │ │ ├── ContourBuilder.java │ │ │ │ ├── JTSTriangulator.java │ │ │ │ ├── QuadEdgeAsReadableQuadEdge.java │ │ │ │ ├── QuadEdgeSubdivisionAsReadableTriangulation.java │ │ │ │ ├── ReadableQuadEdge.java │ │ │ │ ├── ReadableTriangulation.java │ │ │ │ ├── ShortestPathTree.java │ │ │ │ ├── Triangulation.java │ │ │ │ ├── TriangulationAsReadableTriangulation.java │ │ │ │ └── Triangulator.java │ │ │ ├── reader │ │ │ ├── ConditionalInspector.java │ │ │ ├── ConditionalSpeedInspector.java │ │ │ ├── ConditionalTagInspector.java │ │ │ ├── OSMTurnRelation.java │ │ │ ├── PillarInfo.java │ │ │ ├── ReaderElement.java │ │ │ ├── ReaderNode.java │ │ │ ├── ReaderRelation.java │ │ │ ├── ReaderWay.java │ │ │ ├── dem │ │ │ │ ├── AbstractSRTMElevationProvider.java │ │ │ │ ├── AbstractTiffElevationProvider.java │ │ │ │ ├── CGIARProvider.java │ │ │ │ ├── EdgeElevationInterpolator.java │ │ │ │ ├── EdgeSampling.java │ │ │ │ ├── ElevationInterpolator.java │ │ │ │ ├── ElevationProvider.java │ │ │ │ ├── GMTEDProvider.java │ │ │ │ ├── GraphElevationSmoothing.java │ │ │ │ ├── HeightTile.java │ │ │ │ ├── MultiSourceElevationProvider.java │ │ │ │ ├── NodeElevationInterpolator.java │ │ │ │ ├── SRTMGL1Provider.java │ │ │ │ ├── SRTMProvider.java │ │ │ │ ├── SkadiProvider.java │ │ │ │ └── TileBasedElevationProvider.java │ │ │ └── osm │ │ │ │ ├── GraphHopperOSM.java │ │ │ │ ├── OSMFileHeader.java │ │ │ │ ├── OSMInput.java │ │ │ │ ├── OSMInputFile.java │ │ │ │ ├── OSMReader.java │ │ │ │ ├── OSMReaderUtility.java │ │ │ │ ├── OSMXMLHelper.java │ │ │ │ ├── conditional │ │ │ │ ├── ConditionalOSMSpeedInspector.java │ │ │ │ ├── ConditionalOSMTagInspector.java │ │ │ │ ├── ConditionalParser.java │ │ │ │ ├── ConditionalValueParser.java │ │ │ │ ├── DateRange.java │ │ │ │ ├── DateRangeParser.java │ │ │ │ └── ParsedCalendar.java │ │ │ │ └── pbf │ │ │ │ ├── PbfBlobDecoder.java │ │ │ │ ├── PbfBlobDecoderListener.java │ │ │ │ ├── PbfBlobResult.java │ │ │ │ ├── PbfDecoder.java │ │ │ │ ├── PbfFieldDecoder.java │ │ │ │ ├── PbfRawBlob.java │ │ │ │ ├── PbfReader.java │ │ │ │ ├── PbfStreamSplitter.java │ │ │ │ └── Sink.java │ │ │ ├── routing │ │ │ ├── AStar.java │ │ │ ├── AStarBidirection.java │ │ │ ├── AStarBidirectionCH.java │ │ │ ├── AStarBidirectionEdgeCHNoSOD.java │ │ │ ├── AbstractBidirAlgo.java │ │ │ ├── AbstractBidirCHAlgo.java │ │ │ ├── AbstractBidirectionEdgeCHNoSOD.java │ │ │ ├── AbstractNonCHBidirAlgo.java │ │ │ ├── AbstractRoutingAlgorithm.java │ │ │ ├── AlgorithmOptions.java │ │ │ ├── AlternativeRoute.java │ │ │ ├── AlternativeRouteCH.java │ │ │ ├── AlternativeRouteEdgeCH.java │ │ │ ├── BidirPathExtractor.java │ │ │ ├── BidirRoutingAlgorithm.java │ │ │ ├── CHPathCalculator.java │ │ │ ├── DefaultBidirPathExtractor.java │ │ │ ├── DefaultWeightingFactory.java │ │ │ ├── Dijkstra.java │ │ │ ├── DijkstraBidirectionCH.java │ │ │ ├── DijkstraBidirectionCHNoSOD.java │ │ │ ├── DijkstraBidirectionEdgeCHNoSOD.java │ │ │ ├── DijkstraBidirectionRef.java │ │ │ ├── DijkstraOneToMany.java │ │ │ ├── DirectionResolver.java │ │ │ ├── DirectionResolverResult.java │ │ │ ├── EdgeRestrictions.java │ │ │ ├── ExtendedGHRequest.java │ │ │ ├── FlexiblePathCalculator.java │ │ │ ├── HeadingResolver.java │ │ │ ├── InstructionsFromEdges.java │ │ │ ├── InstructionsHelper.java │ │ │ ├── InstructionsOutgoingEdges.java │ │ │ ├── MultiplePointsNotFoundException.java │ │ │ ├── Path.java │ │ │ ├── PathCalculator.java │ │ │ ├── PathExtractor.java │ │ │ ├── ProfileResolver.java │ │ │ ├── RoundTripRouting.java │ │ │ ├── Router.java │ │ │ ├── RouterConfig.java │ │ │ ├── RoutingAlgorithm.java │ │ │ ├── RoutingAlgorithmFactory.java │ │ │ ├── RoutingAlgorithmFactorySimple.java │ │ │ ├── SPTEntry.java │ │ │ ├── TDAStar.java │ │ │ ├── TDDijkstra.java │ │ │ ├── TDPathExtractor.java │ │ │ ├── ViaRouting.java │ │ │ ├── WeightingFactory.java │ │ │ ├── ch │ │ │ │ ├── AStarCHEntry.java │ │ │ │ ├── CHEntry.java │ │ │ │ ├── CHParameters.java │ │ │ │ ├── CHPreparationGraph.java │ │ │ │ ├── CHPreparationHandler.java │ │ │ │ ├── CHRoutingAlgorithmFactory.java │ │ │ │ ├── EdgeBasedCHBidirPathExtractor.java │ │ │ │ ├── EdgeBasedNodeContractor.java │ │ │ │ ├── EdgeBasedWitnessPathSearcher.java │ │ │ │ ├── NodeBasedCHBidirPathExtractor.java │ │ │ │ ├── NodeBasedNodeContractor.java │ │ │ │ ├── NodeBasedWitnessPathSearcher.java │ │ │ │ ├── NodeContractor.java │ │ │ │ ├── NodeOrderingProvider.java │ │ │ │ ├── OnFlyStatisticsCalculator.java │ │ │ │ ├── PrepareCHEntry.java │ │ │ │ ├── PrepareContractionHierarchies.java │ │ │ │ ├── PrepareEncoder.java │ │ │ │ ├── PrepareGraphEdgeExplorer.java │ │ │ │ ├── PrepareGraphEdgeIterator.java │ │ │ │ ├── PrepareGraphOrigEdgeExplorer.java │ │ │ │ ├── PrepareGraphOrigEdgeIterator.java │ │ │ │ └── ShortcutUnpacker.java │ │ │ ├── ev │ │ │ │ ├── BikeNetwork.java │ │ │ │ ├── BooleanEncodedValue.java │ │ │ │ ├── Country.java │ │ │ │ ├── DecimalEncodedValue.java │ │ │ │ ├── DefaultEncodedValueFactory.java │ │ │ │ ├── EncodedValue.java │ │ │ │ ├── EncodedValueFactory.java │ │ │ │ ├── EncodedValueLookup.java │ │ │ │ ├── EnumEncodedValue.java │ │ │ │ ├── FootNetwork.java │ │ │ │ ├── GetOffBike.java │ │ │ │ ├── Hazmat.java │ │ │ │ ├── HazmatTunnel.java │ │ │ │ ├── HazmatWater.java │ │ │ │ ├── HikeRating.java │ │ │ │ ├── HorseRating.java │ │ │ │ ├── IntEncodedValue.java │ │ │ │ ├── Lanes.java │ │ │ │ ├── MaxAxleLoad.java │ │ │ │ ├── MaxHeight.java │ │ │ │ ├── MaxLength.java │ │ │ │ ├── MaxSpeed.java │ │ │ │ ├── MaxWeight.java │ │ │ │ ├── MaxWidth.java │ │ │ │ ├── MtbRating.java │ │ │ │ ├── RoadAccess.java │ │ │ │ ├── RoadClass.java │ │ │ │ ├── RoadClassLink.java │ │ │ │ ├── RoadEnvironment.java │ │ │ │ ├── Roundabout.java │ │ │ │ ├── RouteNetwork.java │ │ │ │ ├── SimpleBooleanEncodedValue.java │ │ │ │ ├── Smoothness.java │ │ │ │ ├── StringEncodedValue.java │ │ │ │ ├── Subnetwork.java │ │ │ │ ├── Surface.java │ │ │ │ ├── Toll.java │ │ │ │ ├── TrackType.java │ │ │ │ ├── TurnCost.java │ │ │ │ ├── UnsignedDecimalEncodedValue.java │ │ │ │ └── UnsignedIntEncodedValue.java │ │ │ ├── lm │ │ │ │ ├── LMApproximator.java │ │ │ │ ├── LMConfig.java │ │ │ │ ├── LMPreparationHandler.java │ │ │ │ ├── LMRoutingAlgorithmFactory.java │ │ │ │ ├── LandmarkStorage.java │ │ │ │ ├── LandmarkSuggestion.java │ │ │ │ ├── PerfectApproximator.java │ │ │ │ ├── PrepareLandmarks.java │ │ │ │ └── SplitArea.java │ │ │ ├── querygraph │ │ │ │ ├── EdgeChangeBuilder.java │ │ │ │ ├── EdgeIteratorStateHelper.java │ │ │ │ ├── EdgeKeys.java │ │ │ │ ├── QueryGraph.java │ │ │ │ ├── QueryOverlay.java │ │ │ │ ├── QueryOverlayBuilder.java │ │ │ │ ├── QueryRoutingCHGraph.java │ │ │ │ ├── QueryRoutingCoreGraph.java │ │ │ │ ├── VirtualEdgeIterator.java │ │ │ │ └── VirtualEdgeIteratorState.java │ │ │ ├── subnetwork │ │ │ │ ├── EdgeBasedTarjanSCC.java │ │ │ │ ├── PrepareRoutingSubnetworks.java │ │ │ │ ├── SubnetworkStorage.java │ │ │ │ └── TarjanSCC.java │ │ │ ├── util │ │ │ │ ├── AbstractAdjustedSpeedCalculator.java │ │ │ │ ├── AbstractAlgoPreparation.java │ │ │ │ ├── AbstractFlagEncoder.java │ │ │ │ ├── AccessEdgeFilter.java │ │ │ │ ├── AccessFilter.java │ │ │ │ ├── AllEdgesIterator.java │ │ │ │ ├── AreaIndex.java │ │ │ │ ├── Bike2WeightFlagEncoder.java │ │ │ │ ├── BikeCommonFlagEncoder.java │ │ │ │ ├── BikeFlagEncoder.java │ │ │ │ ├── Car4WDFlagEncoder.java │ │ │ │ ├── CarFlagEncoder.java │ │ │ │ ├── ConditionalAccessEdgeFilter.java │ │ │ │ ├── ConditionalSpeedCalculator.java │ │ │ │ ├── CustomArea.java │ │ │ │ ├── DefaultEdgeFilterFactory.java │ │ │ │ ├── DefaultFlagEncoderFactory.java │ │ │ │ ├── DefaultPathProcessor.java │ │ │ │ ├── DefaultPathProcessorFactory.java │ │ │ │ ├── DefaultSnapFilter.java │ │ │ │ ├── DefaultSpeedCalculator.java │ │ │ │ ├── EdgeFilter.java │ │ │ │ ├── EdgeFilterFactory.java │ │ │ │ ├── EncodingManager.java │ │ │ │ ├── FerrySpeedCalculator.java │ │ │ │ ├── FiniteWeightFilter.java │ │ │ │ ├── FlagEncoder.java │ │ │ │ ├── FlagEncoderFactory.java │ │ │ │ ├── FootFlagEncoder.java │ │ │ │ ├── HikeFlagEncoder.java │ │ │ │ ├── MotorcycleFlagEncoder.java │ │ │ │ ├── MountainBikeFlagEncoder.java │ │ │ │ ├── NameSimilarityEdgeFilter.java │ │ │ │ ├── PathProcessor.java │ │ │ │ ├── PathProcessorFactory.java │ │ │ │ ├── PriorityCode.java │ │ │ │ ├── RacingBikeFlagEncoder.java │ │ │ │ ├── SnapPreventionEdgeFilter.java │ │ │ │ ├── SpeedCalculator.java │ │ │ │ ├── TimeDependentAccessEdgeFilter.java │ │ │ │ ├── TimeDependentConditionalEvaluator.java │ │ │ │ ├── TimeDependentEdgeFilter.java │ │ │ │ ├── TimePoint.java │ │ │ │ ├── TransportationMode.java │ │ │ │ ├── TraversalMode.java │ │ │ │ ├── WheelchairFlagEncoder.java │ │ │ │ ├── countryrules │ │ │ │ │ ├── AustriaCountryRule.java │ │ │ │ │ ├── CountryRule.java │ │ │ │ │ ├── CountryRuleFactory.java │ │ │ │ │ └── GermanyCountryRule.java │ │ │ │ ├── parsers │ │ │ │ │ ├── CountryParser.java │ │ │ │ │ ├── DefaultTagParserFactory.java │ │ │ │ │ ├── OSMBikeNetworkTagParser.java │ │ │ │ │ ├── OSMFootNetworkTagParser.java │ │ │ │ │ ├── OSMGetOffBikeParser.java │ │ │ │ │ ├── OSMHazmatParser.java │ │ │ │ │ ├── OSMHazmatTunnelParser.java │ │ │ │ │ ├── OSMHazmatWaterParser.java │ │ │ │ │ ├── OSMHikeRatingParser.java │ │ │ │ │ ├── OSMHorseRatingParser.java │ │ │ │ │ ├── OSMLanesParser.java │ │ │ │ │ ├── OSMMaxAxleLoadParser.java │ │ │ │ │ ├── OSMMaxHeightParser.java │ │ │ │ │ ├── OSMMaxLengthParser.java │ │ │ │ │ ├── OSMMaxSpeedParser.java │ │ │ │ │ ├── OSMMaxWeightParser.java │ │ │ │ │ ├── OSMMaxWidthParser.java │ │ │ │ │ ├── OSMMtbRatingParser.java │ │ │ │ │ ├── OSMRoadAccessParser.java │ │ │ │ │ ├── OSMRoadClassLinkParser.java │ │ │ │ │ ├── OSMRoadClassParser.java │ │ │ │ │ ├── OSMRoadEnvironmentParser.java │ │ │ │ │ ├── OSMRoundaboutParser.java │ │ │ │ │ ├── OSMSmoothnessParser.java │ │ │ │ │ ├── OSMSurfaceParser.java │ │ │ │ │ ├── OSMTollParser.java │ │ │ │ │ ├── OSMTrackTypeParser.java │ │ │ │ │ ├── OSMTurnRelationParser.java │ │ │ │ │ ├── RelationTagParser.java │ │ │ │ │ ├── TagParser.java │ │ │ │ │ ├── TagParserFactory.java │ │ │ │ │ ├── TurnCostParser.java │ │ │ │ │ └── helpers │ │ │ │ │ │ └── OSMValueExtractor.java │ │ │ │ └── tour │ │ │ │ │ ├── MultiPointTour.java │ │ │ │ │ ├── SinglePointTour.java │ │ │ │ │ └── TourStrategy.java │ │ │ └── weighting │ │ │ │ ├── AbstractAdjustedWeighting.java │ │ │ │ ├── AbstractWeighting.java │ │ │ │ ├── AvoidEdgesWeighting.java │ │ │ │ ├── BalancedWeightApproximator.java │ │ │ │ ├── BeelineWeightApproximator.java │ │ │ │ ├── BlockAreaWeighting.java │ │ │ │ ├── CurvatureWeighting.java │ │ │ │ ├── DefaultTurnCostProvider.java │ │ │ │ ├── FastestWeighting.java │ │ │ │ ├── PriorityWeighting.java │ │ │ │ ├── QueryGraphWeighting.java │ │ │ │ ├── ShortFastestWeighting.java │ │ │ │ ├── ShortestWeighting.java │ │ │ │ ├── TimeDependentAccessWeighting.java │ │ │ │ ├── TurnCostProvider.java │ │ │ │ ├── WeightApproximator.java │ │ │ │ ├── Weighting.java │ │ │ │ ├── WeightingFactory.java │ │ │ │ └── custom │ │ │ │ ├── CustomModelParser.java │ │ │ │ ├── CustomProfile.java │ │ │ │ ├── CustomWeighting.java │ │ │ │ ├── CustomWeightingHelper.java │ │ │ │ └── ExpressionVisitor.java │ │ │ ├── search │ │ │ ├── ConditionalIndex.java │ │ │ ├── NameIndex.java │ │ │ └── StringIndex.java │ │ │ ├── storage │ │ │ ├── AbstractDataAccess.java │ │ │ ├── BaseGraph.java │ │ │ ├── CHConfig.java │ │ │ ├── CHEdgeFilter.java │ │ │ ├── CHProfile.java │ │ │ ├── CHStorage.java │ │ │ ├── CHStorageBuilder.java │ │ │ ├── ConditionalEdges.java │ │ │ ├── ConditionalEdgesMap.java │ │ │ ├── DAType.java │ │ │ ├── DataAccess.java │ │ │ ├── Directory.java │ │ │ ├── ExtendedNodeAccess.java │ │ │ ├── ExtendedStorageSequence.java │ │ │ ├── GHDirectory.java │ │ │ ├── GHLock.java │ │ │ ├── GHNodeAccess.java │ │ │ ├── Graph.java │ │ │ ├── GraphBuilder.java │ │ │ ├── GraphEdgeIdFinder.java │ │ │ ├── GraphExtension.java │ │ │ ├── GraphHopperStorage.java │ │ │ ├── GraphStorageFactory.java │ │ │ ├── IntsRef.java │ │ │ ├── LockFactory.java │ │ │ ├── MMapDataAccess.java │ │ │ ├── MMapDirectory.java │ │ │ ├── NativeFSLockFactory.java │ │ │ ├── NodeAccess.java │ │ │ ├── RAMDataAccess.java │ │ │ ├── RAMDirectory.java │ │ │ ├── RAMIntDataAccess.java │ │ │ ├── RoutingCHEdgeExplorer.java │ │ │ ├── RoutingCHEdgeIterator.java │ │ │ ├── RoutingCHEdgeIteratorImpl.java │ │ │ ├── RoutingCHEdgeIteratorState.java │ │ │ ├── RoutingCHEdgeIteratorStateImpl.java │ │ │ ├── RoutingCHGraph.java │ │ │ ├── RoutingCHGraphImpl.java │ │ │ ├── SimpleFSLockFactory.java │ │ │ ├── Storable.java │ │ │ ├── StorableProperties.java │ │ │ ├── TurnCostStorage.java │ │ │ ├── VLongStorage.java │ │ │ └── index │ │ │ │ ├── InMemConstructionIndex.java │ │ │ │ ├── IndexStructureInfo.java │ │ │ │ ├── LineIntIndex.java │ │ │ │ ├── LocationIndex.java │ │ │ │ ├── LocationIndexTree.java │ │ │ │ ├── PixelGridTraversal.java │ │ │ │ └── Snap.java │ │ │ └── util │ │ │ ├── AngleCalc.java │ │ │ ├── ArrayUtil.java │ │ │ ├── BitUtil.java │ │ │ ├── BitUtilBig.java │ │ │ ├── BitUtilLittle.java │ │ │ ├── BreadthFirstSearch.java │ │ │ ├── CHEdgeIteratorState.java │ │ │ ├── Constants.java │ │ │ ├── DateTimeHelper.java │ │ │ ├── DepthFirstSearch.java │ │ │ ├── DistanceCalc.java │ │ │ ├── DistanceCalc3D.java │ │ │ ├── DistanceCalcEarth.java │ │ │ ├── DistanceCalcEuclidean.java │ │ │ ├── DistancePlaneProjection.java │ │ │ ├── DouglasPeucker.java │ │ │ ├── Downloader.java │ │ │ ├── EdgeExplorer.java │ │ │ ├── EdgeIterator.java │ │ │ ├── EdgeIteratorState.java │ │ │ ├── FetchMode.java │ │ │ ├── GHUtility.java │ │ │ ├── GitInfo.java │ │ │ ├── Instructions.java │ │ │ ├── MiniPerfTest.java │ │ │ ├── NotThreadSafe.java │ │ │ ├── PathMerger.java │ │ │ ├── PathSimplification.java │ │ │ ├── ProgressListener.java │ │ │ ├── SimpleIntDeque.java │ │ │ ├── StopWatch.java │ │ │ ├── TranslationMap.java │ │ │ ├── Unzipper.java │ │ │ ├── XFirstSearch.java │ │ │ ├── details │ │ │ ├── AbstractPathDetailsBuilder.java │ │ │ ├── AverageSpeedDetails.java │ │ │ ├── BooleanDetails.java │ │ │ ├── DecimalDetails.java │ │ │ ├── DistanceDetails.java │ │ │ ├── EdgeIdDetails.java │ │ │ ├── EdgeKeyDetails.java │ │ │ ├── EnumDetails.java │ │ │ ├── IntDetails.java │ │ │ ├── PathDetailsBuilder.java │ │ │ ├── PathDetailsBuilderFactory.java │ │ │ ├── PathDetailsFromEdges.java │ │ │ ├── StreetNameDetails.java │ │ │ ├── StringDetails.java │ │ │ ├── TimeDetails.java │ │ │ └── WeightDetails.java │ │ │ └── shapes │ │ │ ├── BBox.java │ │ │ ├── Circle.java │ │ │ ├── Polygon.java │ │ │ └── Shape.java │ └── resources │ │ └── com │ │ └── graphhopper │ │ ├── builddate │ │ ├── countries │ │ └── countries.geojson │ │ ├── gitinfo │ │ ├── reader │ │ └── dem │ │ │ ├── Africa_names.txt │ │ │ ├── Australia_names.txt │ │ │ ├── Eurasia_names.txt │ │ │ ├── Islands_names.txt │ │ │ ├── North_America_names.txt │ │ │ └── South_America_names.txt │ │ ├── routing │ │ └── lm │ │ │ └── map.geo.json │ │ ├── util │ │ ├── ar.txt │ │ ├── ast.txt │ │ ├── bg.txt │ │ ├── bn_BN.txt │ │ ├── ca.txt │ │ ├── cs_CZ.txt │ │ ├── da_DK.txt │ │ ├── de_DE.txt │ │ ├── el.txt │ │ ├── en_US.txt │ │ ├── eo.txt │ │ ├── es.txt │ │ ├── fa.txt │ │ ├── fi.txt │ │ ├── fil.txt │ │ ├── fr_CH.txt │ │ ├── fr_FR.txt │ │ ├── gl.txt │ │ ├── he.txt │ │ ├── hr_HR.txt │ │ ├── hsb.txt │ │ ├── hu_HU.txt │ │ ├── in_ID.txt │ │ ├── it.txt │ │ ├── ja.txt │ │ ├── ko.txt │ │ ├── lt_LT.txt │ │ ├── ne.txt │ │ ├── nl.txt │ │ ├── pl_PL.txt │ │ ├── pt_BR.txt │ │ ├── pt_PT.txt │ │ ├── ro.txt │ │ ├── ru.txt │ │ ├── sk.txt │ │ ├── sl_SI.txt │ │ ├── sr_RS.txt │ │ ├── sv_SE.txt │ │ ├── tr.txt │ │ ├── uk.txt │ │ ├── vi_VN.txt │ │ ├── zh_CN.txt │ │ ├── zh_HK.txt │ │ └── zh_TW.txt │ │ └── version │ └── test │ ├── java │ └── com │ │ └── graphhopper │ │ ├── GraphHopperProfileTest.java │ │ ├── GraphHopperTest.java │ │ ├── apache │ │ └── commons │ │ │ ├── collections │ │ │ └── IntFloatBinaryHeapTest.java │ │ │ └── lang3 │ │ │ └── StringUtilsTest.java │ │ ├── coll │ │ ├── AbstractMyBitSetTest.java │ │ ├── BinaryHeapTestInterface.java │ │ ├── BitSetImplTest.java │ │ ├── GHLongIntBTreeTest.java │ │ ├── GHSortedCollectionTest.java │ │ ├── GHTBitSetTest.java │ │ ├── GHTreeMapComposedTest.java │ │ ├── MinHeapWithUpdateTest.java │ │ └── OSMIDMapTest.java │ │ ├── geohash │ │ └── SpatialKeyAlgoTest.java │ │ ├── isochrone │ │ └── algorithm │ │ │ ├── QuadEdgeSubdivisionTest.java │ │ │ └── ShortestPathTreeTest.java │ │ ├── reader │ │ ├── OSMElementTest.java │ │ ├── dem │ │ │ ├── BridgeElevationInterpolatorTest.java │ │ │ ├── CGIARProviderTest.java │ │ │ ├── EdgeElevationInterpolatorTest.java │ │ │ ├── EdgeSamplingTest.java │ │ │ ├── ElevationInterpolatorTest.java │ │ │ ├── GMTEDProviderTest.java │ │ │ ├── GraphElevationSmoothingTest.java │ │ │ ├── HeightTileTest.java │ │ │ ├── MultiSourceElevationProviderTest.java │ │ │ ├── SRTMGL1ProviderTest.java │ │ │ ├── SRTMProviderTest.java │ │ │ ├── SkadiProviderTest.java │ │ │ └── TunnelElevationInterpolatorTest.java │ │ └── osm │ │ │ ├── GraphHopperOSMTest.java │ │ │ ├── OSMReaderTest.java │ │ │ ├── OSMReaderUtilityTest.java │ │ │ ├── OSMTurnRelationTest.java │ │ │ └── conditional │ │ │ ├── CalendarBasedTest.java │ │ │ ├── ConditionalOSMSpeedInspectorTest.java │ │ │ ├── ConditionalOSMTagInspectorTest.java │ │ │ ├── ConditionalParserTest.java │ │ │ └── DateRangeParserTest.java │ │ ├── routing │ │ ├── AlternativeRouteCHTest.java │ │ ├── AlternativeRouteEdgeCHTest.java │ │ ├── AlternativeRouteTest.java │ │ ├── CHQueryWithTurnCostsTest.java │ │ ├── DefaultBidirPathExtractorTest.java │ │ ├── DijkstraBidirectionCHTest.java │ │ ├── DijkstraOneToManyTest.java │ │ ├── DirectedBidirectionalDijkstraTest.java │ │ ├── DirectedRoutingTest.java │ │ ├── DirectionResolverOnQueryGraphTest.java │ │ ├── DirectionResolverTest.java │ │ ├── EdgeBasedRoutingAlgorithmTest.java │ │ ├── HeadingResolverTest.java │ │ ├── HeadingRoutingTest.java │ │ ├── PathTest.java │ │ ├── PriorityRoutingTest.java │ │ ├── ProfileResolverTest.java │ │ ├── QueryRoutingCHGraphTest.java │ │ ├── RandomCHRoutingTest.java │ │ ├── RandomizedRoutingTest.java │ │ ├── RoundTripRoutingTest.java │ │ ├── RoutingAlgorithmTest.java │ │ ├── RoutingAlgorithmWithOSMTest.java │ │ ├── TrafficChangeWithNodeOrderingReusingTest.java │ │ ├── ch │ │ │ ├── CHPreparationGraphTest.java │ │ │ ├── CHPreparationHandlerTest.java │ │ │ ├── CHProfileSelectorTest.java │ │ │ ├── CHTurnCostTest.java │ │ │ ├── EdgeBasedNodeContractorTest.java │ │ │ ├── EdgeBasedWitnessPathSearcherTest.java │ │ │ ├── NodeBasedNodeContractorTest.java │ │ │ ├── NodeBasedWitnessPathSearcherTest.java │ │ │ ├── OnFlyStatisticsCalculatorTest.java │ │ │ └── PrepareContractionHierarchiesTest.java │ │ ├── ev │ │ │ ├── BooleanEncodedValueTest.java │ │ │ ├── DecimalEncodedValueTest.java │ │ │ ├── DefaultEncodedValueFactoryTest.java │ │ │ ├── EnumEncodedValueTest.java │ │ │ ├── IntEncodedValueTest.java │ │ │ ├── MaxWeightTest.java │ │ │ ├── RoadAccessTest.java │ │ │ ├── StringEncodedValueTest.java │ │ │ └── UnsignedDecimalEncodedValueTest.java │ │ ├── lm │ │ │ ├── LMApproximatorTest.java │ │ │ ├── LMIssueTest.java │ │ │ ├── LMPreparationHandlerTest.java │ │ │ ├── LMProfileSelectorTest.java │ │ │ ├── LandmarkStorageTest.java │ │ │ └── PrepareLandmarksTest.java │ │ ├── querygraph │ │ │ └── QueryGraphTest.java │ │ ├── subnetwork │ │ │ ├── EdgeBasedTarjanSCCTest.java │ │ │ ├── PrepareRoutingSubnetworksTest.java │ │ │ ├── SubnetworkStorageTest.java │ │ │ └── TarjanSCCTest.java │ │ ├── util │ │ │ ├── AbstractBikeFlagEncoderTester.java │ │ │ ├── AccessFilterTest.java │ │ │ ├── Bike2WeightFlagEncoderTest.java │ │ │ ├── BikeFlagEncoderTest.java │ │ │ ├── Car4WDFlagEncoderTest.java │ │ │ ├── CarFlagEncoderTest.java │ │ │ ├── ConditionalAccessTest.java │ │ │ ├── EncodingManagerTest.java │ │ │ ├── FerrySpeedCalculatorTest.java │ │ │ ├── FootFlagEncoderTest.java │ │ │ ├── HikeFlagEncoderTest.java │ │ │ ├── MotorcycleFlagEncoderTest.java │ │ │ ├── MountainBikeFlagEncoderTest.java │ │ │ ├── NameSimilarityEdgeFilterTest.java │ │ │ ├── RacingBikeFlagEncoderTest.java │ │ │ ├── SnapPreventionEdgeFilterTest.java │ │ │ ├── TimeDependentAccessEdgeFilterTest.java │ │ │ ├── WheelchairFlagEncoderTest.java │ │ │ ├── countryrules │ │ │ │ └── CountryRuleTest.java │ │ │ ├── parsers │ │ │ │ ├── OSMGetOffBikeParserTest.java │ │ │ │ ├── OSMHazmatParserTest.java │ │ │ │ ├── OSMHazmatTunnelParserTest.java │ │ │ │ ├── OSMHazmatWaterParserTest.java │ │ │ │ ├── OSMLanesParserTest.java │ │ │ │ ├── OSMMaxAxleLoadParserTest.java │ │ │ │ ├── OSMMaxSpeedParserTest.java │ │ │ │ ├── OSMMaxWeightParserTest.java │ │ │ │ ├── OSMRoadAccessParserTest.java │ │ │ │ ├── OSMRoadClassParserTest.java │ │ │ │ ├── OSMSmoothnessParserTest.java │ │ │ │ ├── OSMSurfaceParserTest.java │ │ │ │ ├── OSMTollParserTest.java │ │ │ │ ├── OSMTrackTypeParserTest.java │ │ │ │ ├── OSMTurnRelationParserTest.java │ │ │ │ └── OSMValueExtractorTest.java │ │ │ ├── spatialrules │ │ │ │ └── AreaIndexTest.java │ │ │ └── tour │ │ │ │ └── SinglePointTourTest.java │ │ └── weighting │ │ │ ├── AbstractWeightingTest.java │ │ │ ├── BlockAreaWeightingTest.java │ │ │ ├── FastestWeightingTest.java │ │ │ ├── ShortFastestWeightingTest.java │ │ │ └── custom │ │ │ ├── CustomModelParserTest.java │ │ │ ├── CustomWeightingTest.java │ │ │ └── ExpressionVisitorTest.java │ │ ├── search │ │ └── StringIndexTest.java │ │ ├── storage │ │ ├── AbstractDirectoryTester.java │ │ ├── AbstractGraphStorageTester.java │ │ ├── AbstractLockFactoryTester.java │ │ ├── CHStorageTest.java │ │ ├── DataAccessTest.java │ │ ├── EdgeTest.java │ │ ├── GraphEdgeIdFinderTest.java │ │ ├── GraphHopperStorageCHTest.java │ │ ├── GraphHopperStorageLMTest.java │ │ ├── GraphHopperStorageTest.java │ │ ├── GraphHopperStorageWithTurnCostsTest.java │ │ ├── GraphStorageViaMMapTest.java │ │ ├── MMapDataAccessTest.java │ │ ├── MMapDirectoryTest.java │ │ ├── NativeFSLockFactoryTest.java │ │ ├── RAMDataAccessTest.java │ │ ├── RAMDirectoryTest.java │ │ ├── RAMIntDataAccessTest.java │ │ ├── ShortcutUnpackerTest.java │ │ ├── SimpleFSLockFactoryTest.java │ │ ├── StorablePropertiesTest.java │ │ ├── TurnCostStorageTest.java │ │ ├── VLongStorageTest.java │ │ └── index │ │ │ ├── LocationIndexTreeTest.java │ │ │ └── PixelGridTraversalTest.java │ │ └── util │ │ ├── AbstractBitUtilTester.java │ │ ├── AngleCalcTest.java │ │ ├── ArrayUtilTest.java │ │ ├── BitUtilBigTest.java │ │ ├── BitUtilLittleTest.java │ │ ├── BreadthFirstSearchTest.java │ │ ├── DepthFirstSearchTest.java │ │ ├── DistanceCalcEarthTest.java │ │ ├── DistanceCalcEuclideanTest.java │ │ ├── DouglasPeuckerTest.java │ │ ├── GHUtilityTest.java │ │ ├── InstructionListTest.java │ │ ├── PathSimplificationTest.java │ │ ├── PointListTest.java │ │ ├── SimpleIntDequeTest.java │ │ ├── TranslationMapTest.java │ │ ├── UnzipperTest.java │ │ └── shapes │ │ ├── BBoxTest.java │ │ ├── CircleTest.java │ │ └── PolygonTest.java │ └── resources │ ├── com │ └── graphhopper │ │ ├── reader │ │ └── osm │ │ │ ├── test-avoid-loops.xml │ │ │ ├── test-avoid-loops2.xml │ │ │ ├── test-avoid-loops3.xml │ │ │ ├── test-avoid-loops4.xml │ │ │ ├── test-barriers.xml │ │ │ ├── test-conditional-turn-restrictions.xml │ │ │ ├── test-multi-profile-turn-restrictions.xml │ │ │ ├── test-multiple-conditional-turn-restrictions.xml │ │ │ ├── test-osm-negative-ids.xml │ │ │ ├── test-osm-waterway.xml │ │ │ ├── test-osm.xml │ │ │ ├── test-osm10.xml │ │ │ ├── test-osm11.xml │ │ │ ├── test-osm2.xml │ │ │ ├── test-osm3.xml │ │ │ ├── test-osm4.xml │ │ │ ├── test-osm5.xml │ │ │ ├── test-osm6.pbf │ │ │ ├── test-osm6.xml │ │ │ ├── test-osm7.xml │ │ │ ├── test-osm8.xml │ │ │ ├── test-osm9.xml │ │ │ ├── test-restrictions.xml │ │ │ └── test-road-attributes.xml │ │ ├── routing │ │ ├── calc-fastest-graph.svg │ │ ├── prepare-routing.svg │ │ ├── test-graph.svg │ │ └── wikipedia-graph.svg │ │ ├── storage │ │ ├── change │ │ │ ├── overlaydata1.json │ │ │ ├── overlaydata2.json │ │ │ └── overlaydata3.json │ │ └── index │ │ │ └── testgraph2.jpg │ │ └── util │ │ └── test.zip │ └── log4j.xml ├── docs ├── core │ ├── ch.md │ ├── create-new-flagencoder.md │ ├── custom-areas-and-country-rules.md │ ├── custom-models.md │ ├── deploy.md │ ├── eclipse-setup.md │ ├── edge-based-ch.md │ ├── elevation.md │ ├── images │ │ ├── 1.jpg │ │ ├── 10.jpg │ │ ├── 11.jpg │ │ ├── 12.jpg │ │ ├── 13.jpg │ │ ├── 15.jpg │ │ ├── 16.jpg │ │ ├── 17.jpg │ │ ├── 18.jpg │ │ ├── 2.jpg │ │ ├── 3.jpg │ │ ├── 4.jpg │ │ ├── 5.jpg │ │ ├── 6.jpg │ │ ├── 7.jpg │ │ ├── 8.jpg │ │ ├── 9.jpg │ │ ├── clone1.png │ │ ├── clone2.png │ │ ├── clone3.png │ │ ├── clone4.png │ │ ├── clone5.png │ │ ├── edge-based-ch.png │ │ ├── egit.png │ │ ├── egit2.png │ │ ├── import1.png │ │ ├── import2.png │ │ ├── intellij-run-config.png │ │ ├── maven.png │ │ ├── turn-restrictions-correct.png │ │ ├── turn-restrictions-wrong.png │ │ └── wiki-graph.png │ ├── landmarks.md │ ├── low-level-api.md │ ├── profiles.md │ ├── quickstart-from-source.md │ ├── routing.md │ ├── technical.md │ ├── translations.md │ ├── turn-restrictions.md │ ├── weighting.md │ └── windows-setup.md ├── index.md ├── isochrone │ ├── images │ │ └── isochrone.png │ └── java.md └── web │ ├── api-doc.md │ ├── open-search.md │ └── quickstart.md ├── example ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── graphhopper │ │ │ └── example │ │ │ ├── IsochroneExample.java │ │ │ ├── LocationIndexExample.java │ │ │ ├── LowLevelAPIExample.java │ │ │ ├── RoutingExample.java │ │ │ └── RoutingExampleTC.java │ └── resources │ │ └── log4j.xml │ └── test │ └── java │ └── com │ └── graphhopper │ └── example │ ├── LocationIndexExampleTest.java │ ├── LowLevelAPIExampleTest.java │ └── RoutingExampleTest.java ├── git ├── graphhopper.sh ├── hmm-lib ├── LICENSE ├── NOTICE ├── README.md ├── pom.xml └── src │ ├── main │ └── java │ │ └── com │ │ └── bmw │ │ └── hmm │ │ ├── SequenceState.java │ │ ├── Transition.java │ │ ├── Utils.java │ │ └── ViterbiAlgorithm.java │ └── test │ └── java │ └── com │ └── bmw │ └── hmm │ └── ViterbiAlgorithmTest.java ├── isochrone └── pom.xml ├── map-matching ├── README.md ├── files │ ├── issue-70.osm.gz │ ├── leipzig_germany.osm.pbf │ └── map-issue13.osm.gz ├── pom.xml └── src │ └── main │ └── java │ └── com │ └── graphhopper │ └── matching │ ├── Distributions.java │ ├── EdgeMatch.java │ ├── HmmProbabilities.java │ ├── MapMatching.java │ ├── MatchResult.java │ ├── Observation.java │ ├── ObservationWithCandidateStates.java │ └── State.java ├── navigation ├── README.md ├── pom.xml ├── settings.xml └── src │ ├── main │ └── java │ │ └── com │ │ └── graphhopper │ │ └── navigation │ │ ├── DistanceConfig.java │ │ ├── DistanceUtils.java │ │ ├── NavigateResource.java │ │ ├── NavigateResponseConverter.java │ │ └── VoiceInstructionConfig.java │ └── test │ └── java │ └── com │ └── graphhopper │ └── navigation │ ├── NavigateResourceTest.java │ ├── NavigateResponseConverterTest.java │ ├── NavigateResponseConverterTranslationMapTest.java │ └── VoiceInstructionConfigTest.java ├── pom.xml ├── reader-gtfs ├── README.md ├── config-example-pt.yml ├── files │ ├── another-sample-feed-extended-route-type.zip │ ├── another-sample-feed │ │ ├── agency.txt │ │ ├── calendar.txt │ │ ├── routes.txt │ │ ├── stop_times.txt │ │ ├── stops.txt │ │ ├── transfers.txt │ │ └── trips.txt │ ├── beatty.osm │ ├── config-test.yml │ └── sample-feed │ │ ├── agency.txt │ │ ├── calendar.txt │ │ ├── calendar_dates.txt │ │ ├── fare_attributes.txt │ │ ├── fare_rules.txt │ │ ├── frequencies.txt │ │ ├── routes.txt │ │ ├── shapes.txt │ │ ├── stop_times.txt │ │ ├── stops.txt │ │ ├── transfers.txt │ │ └── trips.txt ├── pom.xml ├── pt-model.graphml ├── pt-model.png └── src │ ├── main │ └── java │ │ └── com │ │ ├── conveyal │ │ └── gtfs │ │ │ ├── GTFSFeed.java │ │ │ ├── error │ │ │ ├── DateParseError.java │ │ │ ├── DuplicateKeyError.java │ │ │ ├── EmptyFieldError.java │ │ │ ├── GTFSError.java │ │ │ ├── GeneralError.java │ │ │ ├── MissingColumnError.java │ │ │ ├── MissingTableError.java │ │ │ ├── NumberParseError.java │ │ │ ├── Priority.java │ │ │ ├── RangeError.java │ │ │ ├── ReferentialIntegrityError.java │ │ │ ├── TableInSubdirectoryError.java │ │ │ ├── TimeParseError.java │ │ │ └── URLParseError.java │ │ │ └── model │ │ │ ├── Agency.java │ │ │ ├── Calendar.java │ │ │ ├── CalendarDate.java │ │ │ ├── Entity.java │ │ │ ├── Fare.java │ │ │ ├── FareAttribute.java │ │ │ ├── FareRule.java │ │ │ ├── FeedInfo.java │ │ │ ├── Frequency.java │ │ │ ├── Route.java │ │ │ ├── Service.java │ │ │ ├── Shape.java │ │ │ ├── ShapePoint.java │ │ │ ├── Stop.java │ │ │ ├── StopTime.java │ │ │ ├── Transfer.java │ │ │ └── Trip.java │ │ └── graphhopper │ │ └── gtfs │ │ ├── GHLocation.java │ │ ├── GHPointLocation.java │ │ ├── GHStationLocation.java │ │ ├── GraphExplorer.java │ │ ├── GraphHopperGtfs.java │ │ ├── GtfsHelper.java │ │ ├── GtfsReader.java │ │ ├── GtfsStorage.java │ │ ├── GtfsStorageI.java │ │ ├── Label.java │ │ ├── MultiCriteriaLabelSetting.java │ │ ├── PtEdgeAttributes.java │ │ ├── PtEncodedValues.java │ │ ├── PtGraph.java │ │ ├── PtLocationSnapper.java │ │ ├── PtRouter.java │ │ ├── PtRouterFreeWalkImpl.java │ │ ├── PtRouterImpl.java │ │ ├── RealtimeFeed.java │ │ ├── Request.java │ │ ├── Transfers.java │ │ ├── TripFromLabel.java │ │ ├── WrapperGraph.java │ │ └── fare │ │ ├── Amount.java │ │ ├── FareAssignment.java │ │ ├── Fares.java │ │ ├── OriginDestinationRule.java │ │ ├── RouteRule.java │ │ ├── SanitizedFareRule.java │ │ ├── Ticket.java │ │ ├── TicketPurchase.java │ │ ├── TicketPurchaseScoreCalculator.java │ │ ├── Trip.java │ │ └── ZoneRule.java │ └── test │ └── java │ └── com │ └── graphhopper │ ├── AnotherAgencyIT.java │ ├── ExtendedRouteTypeIT.java │ ├── FreeWalkIT.java │ ├── GraphHopperGtfsIT.java │ ├── GraphHopperMultimodalIT.java │ ├── RealtimeIT.java │ └── gtfs │ ├── TransfersTest.java │ └── fare │ ├── FareTest.java │ └── MoreFareTests.java ├── reader-osm └── src │ └── test │ └── java │ └── com │ └── graphhopper │ └── reader │ └── osm │ └── GraphHopperOSMTest.java ├── tools ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── graphhopper │ │ ├── tools │ │ ├── Bzip2.java │ │ ├── CHMeasurement.java │ │ ├── Measurement.java │ │ └── TagInfoUtil.java │ │ └── ui │ │ ├── DebugAStar.java │ │ ├── DebugAStarBi.java │ │ ├── DebugAlgo.java │ │ ├── DebugDijkstraBidirection.java │ │ ├── DebugDijkstraSimple.java │ │ ├── DefaultMapLayer.java │ │ ├── GraphicsWrapper.java │ │ ├── LayeredPanel.java │ │ ├── MapLayer.java │ │ └── MiniGraphUI.java │ └── resources │ └── log4j.xml ├── web-api ├── pom.xml └── src │ ├── main │ └── java │ │ └── com │ │ └── graphhopper │ │ ├── GHRequest.java │ │ ├── GHResponse.java │ │ ├── ResponsePath.java │ │ ├── Trip.java │ │ ├── jackson │ │ ├── GHPointDeserializer.java │ │ ├── GHPointSerializer.java │ │ ├── GHResponseDeserializer.java │ │ ├── Gpx.java │ │ ├── GraphHopperModule.java │ │ ├── InstructionListSerializer.java │ │ ├── Jackson.java │ │ ├── JtsEnvelopeDeserializer.java │ │ ├── JtsEnvelopeSerializer.java │ │ ├── MultiException.java │ │ ├── MultiExceptionSerializer.java │ │ ├── PathDetailDeserializer.java │ │ ├── PathDetailSerializer.java │ │ ├── ResponsePathDeserializer.java │ │ ├── ResponsePathSerializer.java │ │ ├── StatementDeserializer.java │ │ └── StatementSerializer.java │ │ ├── json │ │ └── Statement.java │ │ └── util │ │ ├── CustomModel.java │ │ ├── FinishInstruction.java │ │ ├── Helper.java │ │ ├── Instruction.java │ │ ├── InstructionList.java │ │ ├── JsonFeature.java │ │ ├── JsonFeatureCollection.java │ │ ├── NumHelper.java │ │ ├── PMap.java │ │ ├── Parameters.java │ │ ├── PointAccess.java │ │ ├── PointList.java │ │ ├── RoundaboutInstruction.java │ │ ├── ShallowImmutablePointList.java │ │ ├── Translation.java │ │ ├── ViaInstruction.java │ │ ├── details │ │ └── PathDetail.java │ │ ├── exceptions │ │ ├── ConnectionNotFoundException.java │ │ ├── DetailedIllegalArgumentException.java │ │ ├── DetailedRuntimeException.java │ │ ├── GHException.java │ │ ├── MaximumNodesExceededException.java │ │ ├── PointDistanceExceededException.java │ │ ├── PointNotFoundException.java │ │ └── PointOutOfBoundsException.java │ │ └── shapes │ │ ├── GHPoint.java │ │ └── GHPoint3D.java │ └── test │ ├── java │ └── com │ │ └── graphhopper │ │ ├── jackson │ │ ├── InstructionListRepresentationTest.java │ │ ├── JsonFeatureCollectionTest.java │ │ ├── ResponsePathRepresentationTest.java │ │ └── RouteResourceRepresentationTest.java │ │ └── util │ │ ├── CustomModelTest.java │ │ ├── FinishInstructionTest.java │ │ ├── GHRequestTest.java │ │ ├── GHResponseTest.java │ │ ├── HelperTest.java │ │ ├── PMapTest.java │ │ └── shapes │ │ ├── GHPoint3DTest.java │ │ └── GHPointTest.java │ └── resources │ └── fixtures │ ├── geojson1.json │ ├── roundabout1.json │ └── roundabout2.json ├── web-bundle ├── .jshintignore ├── package.json ├── pom.xml └── src │ ├── main │ ├── java │ │ └── com │ │ │ └── graphhopper │ │ │ ├── gpx │ │ │ └── GpxConversions.java │ │ │ ├── http │ │ │ ├── DurationParam.java │ │ │ ├── FeedConfiguration.java │ │ │ ├── GHJerseyViolationExceptionMapper.java │ │ │ ├── GHLocationParam.java │ │ │ ├── GHPointParam.java │ │ │ ├── GraphHopperBundle.java │ │ │ ├── GraphHopperBundleConfiguration.java │ │ │ ├── GraphHopperManaged.java │ │ │ ├── IllegalArgumentExceptionMapper.java │ │ │ ├── JsonErrorEntity.java │ │ │ ├── MultiExceptionGPXMessageBodyWriter.java │ │ │ ├── MultiExceptionMapper.java │ │ │ ├── PtRedirectFilter.java │ │ │ ├── RealtimeBundle.java │ │ │ ├── RealtimeBundleConfiguration.java │ │ │ ├── RealtimeConfiguration.java │ │ │ ├── RealtimeFeedLoadingCache.java │ │ │ ├── TypeGPXFilter.java │ │ │ └── health │ │ │ │ └── GraphHopperHealthCheck.java │ │ │ └── resources │ │ │ ├── HealthcheckResource.java │ │ │ ├── I18NResource.java │ │ │ ├── InfoResource.java │ │ │ ├── IsochroneResource.java │ │ │ ├── MVTResource.java │ │ │ ├── MapMatchingResource.java │ │ │ ├── NearestResource.java │ │ │ ├── PtIsochroneResource.java │ │ │ ├── PtMVTResource.java │ │ │ ├── PtRouteResource.java │ │ │ ├── RouteResource.java │ │ │ └── SPTResource.java │ └── resources │ │ └── com │ │ └── graphhopper │ │ └── maps │ │ ├── css │ │ ├── L.Control.Heightgraph.css │ │ ├── codemirror │ │ │ ├── addon │ │ │ │ ├── hint │ │ │ │ │ └── show-hint.css │ │ │ │ └── lint │ │ │ │ │ └── lint.css │ │ │ └── lib │ │ │ │ └── codemirror.css │ │ ├── flatpickr.min.css │ │ ├── images │ │ │ ├── area-chart.svg │ │ │ ├── elevation.png │ │ │ ├── layers-2x.png │ │ │ ├── layers.png │ │ │ ├── marker-icon-2x.png │ │ │ ├── marker-icon.png │ │ │ ├── marker-shadow.png │ │ │ └── remove.svg │ │ ├── leaflet.contextmenu.css │ │ ├── leaflet.css │ │ ├── leaflet.loading.css │ │ ├── leaflet_numbered_markers.css │ │ ├── style.css │ │ └── ui-lightness │ │ │ ├── LICENSE.txt │ │ │ ├── images │ │ │ ├── ui-bg_diagonals-thick_18_b81900_40x40.png │ │ │ ├── ui-bg_diagonals-thick_20_666666_40x40.png │ │ │ ├── ui-bg_glass_100_f6f6f6_1x400.png │ │ │ ├── ui-bg_glass_100_fdf5ce_1x400.png │ │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ │ ├── ui-bg_gloss-wave_35_f6a828_500x100.png │ │ │ ├── ui-bg_highlight-soft_100_eeeeee_1x100.png │ │ │ ├── ui-bg_highlight-soft_75_ffe45c_1x100.png │ │ │ ├── ui-icons_222222_256x240.png │ │ │ ├── ui-icons_228ef1_256x240.png │ │ │ ├── ui-icons_ef8c08_256x240.png │ │ │ ├── ui-icons_ffd27a_256x240.png │ │ │ └── ui-icons_ffffff_256x240.png │ │ │ ├── jquery-ui.min.css │ │ │ └── jquery-ui.theme.min.css │ │ ├── favicon.ico │ │ ├── img │ │ ├── alt_route.png │ │ ├── bike.png │ │ ├── bike2.png │ │ ├── bus.png │ │ ├── bus.svg │ │ ├── car.png │ │ ├── car4wd.png │ │ ├── car4wd.svg │ │ ├── continue.png │ │ ├── delete.png │ │ ├── direction-icons.svg │ │ ├── foot.png │ │ ├── foot.svg │ │ ├── full-reverse.png │ │ ├── full-reverse.svg │ │ ├── full.png │ │ ├── full.svg │ │ ├── gpx.png │ │ ├── header.png │ │ ├── hike.png │ │ ├── hike.svg │ │ ├── icon.png │ │ ├── indicator-bar.gif │ │ ├── indicator.gif │ │ ├── keep_left.png │ │ ├── keep_right.png │ │ ├── left.png │ │ ├── link.png │ │ ├── loading.gif │ │ ├── marker-from.png │ │ ├── marker-icon-blue.png │ │ ├── marker-icon-green.png │ │ ├── marker-icon-red.png │ │ ├── marker-small-blue.png │ │ ├── marker-small-green.png │ │ ├── marker-small-red.png │ │ ├── marker-to.png │ │ ├── marker_hole.png │ │ ├── motorcycle.png │ │ ├── motorcycle.svg │ │ ├── mtb-bicycle.svg │ │ ├── mtb.png │ │ ├── point_add.png │ │ ├── point_delete.png │ │ ├── pt.png │ │ ├── pt.svg │ │ ├── pt_end_trip.png │ │ ├── pt_start_trip.png │ │ ├── pt_transfer_to.png │ │ ├── racingbike.png │ │ ├── racingbike.svg │ │ ├── right.png │ │ ├── roundabout.png │ │ ├── scooter.png │ │ ├── scooter.svg │ │ ├── sharp_left.png │ │ ├── sharp_right.png │ │ ├── slight_left.png │ │ ├── slight_right.png │ │ ├── small_truck.png │ │ ├── small_truck.svg │ │ ├── truck.png │ │ ├── truck.svg │ │ ├── u_turn.png │ │ ├── u_turn_left.png │ │ ├── u_turn_right.png │ │ ├── unknown.png │ │ ├── wheelchair.png │ │ └── wheelchair.svg │ │ ├── index.html │ │ ├── isochrone │ │ ├── index.css │ │ ├── index.html │ │ └── index.js │ │ ├── js │ │ ├── autocomplete.js │ │ ├── config │ │ │ ├── options.js │ │ │ └── tileLayers.js │ │ ├── gpxexport.js │ │ ├── graphhopper │ │ │ ├── GHInput.js │ │ │ ├── GHRequest.js │ │ │ ├── GHRoute.js │ │ │ └── tools.js │ │ ├── instructions.js │ │ ├── lib │ │ │ ├── jquery-ui-custom-1.12.0.min.js │ │ │ ├── jquery.autocomplete.js │ │ │ ├── jquery.history.js │ │ │ └── leaflet_numbered_markers.js │ │ ├── main-template.js │ │ ├── map.js │ │ ├── messages.js │ │ ├── nominatim.js │ │ ├── routeManipulation.js │ │ ├── tools │ │ │ ├── format.js │ │ │ ├── math.js │ │ │ └── url.js │ │ └── translate.js │ │ ├── map-matching │ │ ├── css │ │ │ ├── images │ │ │ │ ├── layers-2x.png │ │ │ │ ├── layers.png │ │ │ │ ├── loading.gif │ │ │ │ ├── marker-icon-2x.png │ │ │ │ ├── marker-icon.png │ │ │ │ └── marker-shadow.png │ │ │ └── style.css │ │ ├── img │ │ │ └── header.png │ │ ├── index.html │ │ └── js │ │ │ ├── GHUtil.js │ │ │ ├── demo.js │ │ │ └── togeojson.js │ │ ├── opensearch.xml │ │ └── pt │ │ ├── data │ │ ├── Leg.js │ │ ├── Path.js │ │ ├── PtLeg.js │ │ ├── Query.js │ │ ├── WalkLeg.js │ │ └── Waypoint.js │ │ ├── favicon.png │ │ ├── index.html │ │ └── view │ │ ├── App.css │ │ ├── App.js │ │ ├── components │ │ ├── Inputs.css │ │ ├── Inputs.js │ │ ├── SecondaryText.css │ │ └── SecondaryText.js │ │ ├── img │ │ ├── arrow.svg │ │ ├── bus.png │ │ ├── foot.png │ │ └── logo.png │ │ ├── map │ │ ├── Map.css │ │ ├── Map.js │ │ └── circle.png │ │ └── sidebar │ │ ├── Leg.css │ │ ├── Leg.js │ │ ├── SearchInput.css │ │ ├── SearchInput.js │ │ ├── Sidebar.css │ │ ├── Sidebar.js │ │ ├── TripDisplay.css │ │ ├── TripDisplay.js │ │ ├── TripElement.css │ │ └── TripElement.js │ └── test │ ├── java │ └── com │ │ └── graphhopper │ │ ├── gpx │ │ └── GpxConversionsTest.java │ │ ├── jackson │ │ └── GraphHopperConfigModuleTest.java │ │ └── resources │ │ └── IsochroneResourceUtilTest.java │ └── resources │ └── com │ └── graphhopper │ ├── gpx │ └── gpx-schema.xsd │ ├── jackson │ └── config.yml │ └── maps │ └── spec │ ├── config │ └── TileLayersSpec.js │ ├── graphhopper │ ├── GHInputSpec.js │ ├── GHRequestSpec.js │ └── ToolsSpec.js │ ├── helpers │ └── requireFile.js │ ├── jasmine.json │ ├── routeManipulationSpec.js │ ├── tools │ ├── formatSpec.js │ └── urlSpec.js │ └── translateSpec.js └── web ├── nb-configuration.xml ├── pom.xml └── src ├── main ├── java │ └── com │ │ └── graphhopper │ │ └── http │ │ ├── CORSFilter.java │ │ ├── GraphHopperApplication.java │ │ ├── GraphHopperServerConfiguration.java │ │ ├── cli │ │ ├── ImportCommand.java │ │ └── MatchCommand.java │ │ └── resources │ │ └── RootResource.java └── resources │ └── banner.txt └── test ├── java └── com │ └── graphhopper │ └── http │ ├── GraphHopperLandmarksTest.java │ ├── MapMatching2Test.java │ ├── MapMatchingTest.java │ ├── RoutingAdditivityTest.java │ ├── TrkTest.java │ ├── resources │ ├── ExtendedJsonResponseTest.java │ ├── GpxTravelTimeConsistencyTest.java │ ├── I18nResourceTest.java │ ├── IsochroneResourceTest.java │ ├── MapMatchingResourceTest.java │ ├── MapMatchingResourceTurnCostsTest.java │ ├── MvtResourceTest.java │ ├── NearestResourceTest.java │ ├── NearestResourceWithEleTest.java │ ├── PtIsochroneTest.java │ ├── PtRouteResourceTest.java │ ├── RouteResourceClientHCTest.java │ ├── RouteResourceCustomModelLMTest.java │ ├── RouteResourceCustomModelTest.java │ ├── RouteResourceIssue1574Test.java │ ├── RouteResourceIssue2020Test.java │ ├── RouteResourceProfileSelectionTest.java │ ├── RouteResourceTest.java │ ├── RouteResourceTurnCostsLegacyTest.java │ ├── RouteResourceTurnCostsTest.java │ ├── RouteResourceWithEleTest.java │ └── SPTResourceTest.java │ └── util │ ├── GraphHopperServerTestConfiguration.java │ └── TestUtils.java └── resources ├── com └── graphhopper │ └── http │ ├── resources │ ├── cargo_bike.yml │ ├── gpxv1_0.gpx │ ├── json_bike.json │ ├── test-only-wpt.gpx │ ├── tour2-with-loop.gpx │ └── truck.yml │ └── test_encoded.json ├── issue-127.gpx ├── issue-13.gpx ├── issue-70.gpx ├── no_trk.gpx ├── no_trkpt.gpx ├── no_trkseg.gpx ├── test1.gpx ├── test2.gpx ├── test2_no_millis.gpx ├── tour-with-loop.gpx ├── tour2-with-loop.gpx ├── tour3-with-long-edge.gpx └── tour4-with-uturn.gpx /.gitattributes: -------------------------------------------------------------------------------- 1 | # Set default behaviour, in case users don't have core.autocrlf set. 2 | * text=lf 3 | 4 | # Explicitly declare text files we want to always be normalized and converted 5 | # to native line endings on checkout. 6 | *.sh text -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: GraphHopper Forum 4 | url: https://discuss.graphhopper.com/c/graphhopper 5 | about: Please ask and answer questions here. 6 | - name: GraphHopper Security Bug Reporting 7 | url: https://www.graphhopper.com/contact-form/ 8 | about: Please report security vulnerabilities here. -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/issue_template.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | --- 5 | 6 | **Describe the bug** 7 | A clear and concise description of what the bug is. For questions or usage problems please create a new topic in [our forum](https://discuss.graphhopper.com/c/graphhopper) instead. 8 | 9 | **To Reproduce** 10 | 11 | Steps to reproduce the behavior. For examples: 12 | 13 | 1. checkout recent and stable version of GraphHopper 14 | 2. link to your OSM pbf 15 | 3. include the config.yml you are using 16 | 4. run `java -Ddw.graphhopper.datareader.file=your.osm.pbf -jar *.jar server config-example.yml` 17 | 18 | Instead of a manual reproduction it would be even better to have a unit or integration test reproducing the issue. 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **System Information** 24 | 25 | Provide version of Operating system, JVM and GraphHopper 26 | 27 | **Screenshots & Logs** 28 | 29 | If applicable, add screenshots and log output. 30 | 31 | In case of a routing problem include a link to [GraphHopper Maps](https://graphhopper.com/maps/). Also tell us your expected routing result via additional markers and screenshots. 32 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please read [our contributing guide](https://github.com/graphhopper/graphhopper/blob/master/CONTRIBUTING.md) and note that also your contribution falls under the Apache License 2.0 as outlined there. 2 | 3 | Your first contribution should include a change where you add yourself to the CONTRIBUTORS.md file. 4 | -------------------------------------------------------------------------------- /.github/workflows/remove-old-artifacts.yml: -------------------------------------------------------------------------------- 1 | name: Remove old artifacts 2 | on: 3 | schedule: 4 | - cron: '0 3 1 * *' # Every 1st of the month at 3am 5 | workflow_dispatch: 6 | jobs: 7 | remove-old-artifacts: 8 | name: Remove old artifacts 9 | runs-on: ubuntu-latest 10 | timeout-minutes: 10 # stop the task if it takes longer 11 | 12 | steps: 13 | - name: Remove old artifacts 14 | uses: c-hive/gha-remove-artifacts@v1 15 | with: 16 | age: '11 months' 17 | skip-tags: true 18 | skip-recent: 10 19 | -------------------------------------------------------------------------------- /.github/workflows/run_maven_tests.yml: -------------------------------------------------------------------------------- 1 | # This workflow will build a Java project with Maven 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven 3 | 4 | name: Java CI with Maven 5 | 6 | on: 7 | push: 8 | branches: 9 | - 'ors_4.0' 10 | - 'releases/v4.*' 11 | pull_request: 12 | branches: 13 | - 'ors_4.0' 14 | - 'releases/v4.*' 15 | 16 | jobs: 17 | run_tests: 18 | name: Run unit and integration tests 19 | runs-on: ubuntu-latest 20 | steps: 21 | - uses: actions/checkout@v4 22 | with: 23 | fetch-depth: 0 24 | - name: Set up JDK 17 25 | uses: actions/setup-java@v4 26 | with: 27 | distribution: 'temurin' 28 | java-version: '17' 29 | - name: Cache Maven packages 30 | uses: actions/cache@v4 31 | with: 32 | path: ~/.m2 33 | key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} 34 | restore-keys: ${{ runner.os }}-m2 35 | - name: Test, build, run API tests 36 | run: mvn -B -f pom.xml verify 37 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | *~ 3 | *-gh/ 4 | *.osm 5 | nbactions*.xml 6 | /config.yml 7 | build.xml 8 | maven/ 9 | measurement*.properties 10 | gen/ 11 | bin/ 12 | *.map 13 | android/libs/graphhopper-*-android.jar 14 | */nbactions.xml 15 | .idea 16 | .idea/ 17 | *iml 18 | # keep these web/ paths for now. they are outdated but probably useful for a while in case we switch between branches 19 | /web/node 20 | /web/src/main/resources/assets/js/config/options_prod.js 21 | /web/src/main/resources/assets/js/main.js 22 | /web-bundle/node 23 | /web-bundle/src/main/resources/com/graphhopper/maps/js/config/options_prod.js 24 | /web-bundle/src/main/resources/com/graphhopper/maps/js/main.js 25 | /web/dependency-reduced-pom.xml 26 | *.pbf 27 | !/core/src/test/resources/com/graphhopper/reader/osm/*.pbf 28 | *.dem 29 | *.log 30 | core/TODO*.txt 31 | core/files/dem* 32 | /logs 33 | srtmprovider/ 34 | cgiarprovider/ 35 | .*# 36 | android/build/ 37 | android/app/build/ 38 | android/.gradle 39 | .settings/ 40 | .classpath 41 | .project 42 | local/ 43 | local.properties 44 | **/node_modules 45 | *.zip 46 | .DS_Store 47 | /graph-cache 48 | package-lock.json -------------------------------------------------------------------------------- /PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | - [ ] I have clearly marked my changes with comments '// ORS-GH MOD START' and '// ORS-GH MOD END' 2 | - [ ] I have written a short in-line comment for code changes explaining why the change is required 3 | - [ ] I have tested the latest version of **openrouteservice** `development` branch against the .jar build of this PR 4 | - [ ] I have adjusted failing tests in **openrouteservice** API tests 5 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | version: '{build}' 2 | skip_tags: true 3 | clone_depth: 10 4 | image: Visual Studio 2019 5 | environment: 6 | MAVEN_OPTS: -Xmx1g 7 | JAVA_OPTS: -Xmx1g 8 | JAVA_HOME: C:\Program Files\Java\jdk1.8.0 9 | install: 10 | - java -version 11 | - mvn --version 12 | branches: 13 | only: 14 | - master 15 | build_script: 16 | - mvn clean install -DskipTests=true -B 17 | test_script: 18 | - mvn test verify -B && mvn checkstyle:check forbiddenapis:check -B 19 | cache: 20 | - C:\maven\ 21 | - C:\Users\appveyor\.m2 22 | artifacts: 23 | - path: web/target/*.jar -------------------------------------------------------------------------------- /benchmark/download_map.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # usage: 3 | # benchmark/download_map.sh 4 | # 5 | # where: 6 | # = remote url the map is downloaded from 7 | # = local path the map is downloaded to 8 | 9 | # make this script exit if a command fails, a variable is missing etc. 10 | set -euo pipefail 11 | 12 | # download OSM map if it does not exist already 13 | if [ ! -f $2 ]; 14 | then 15 | wget -S -nv -O $2 $1 16 | fi 17 | -------------------------------------------------------------------------------- /benchmark/little_custom.yml: -------------------------------------------------------------------------------- 1 | # this is a little customized model used to benchmark routing with a customized weighting that is similar to the 2 | # standard car profile 3 | priority: 4 | - if: road_access == PRIVATE 5 | multiply_by: 0.1 6 | - else_if: road_access == DESTINATION 7 | multiply_by: 0.1 8 | 9 | distance_influence: 0 10 | -------------------------------------------------------------------------------- /benchmark/post_benchmark.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # usage: 3 | # benchmark/post_benchmark.sh 4 | # 5 | # where: 6 | # = path to a folder with measurement results to be posted 7 | # : = credentials for basic auth 8 | # = url the results are posted to 9 | 10 | # make this script exit if a command faiils, a variable is missing etc. 11 | set -euo pipefail 12 | 13 | # use curl to post results (requires external variables to be set) 14 | for f in $1*.json 15 | # we need to make sure that the error response is printed *and* the build fails if there is an error status code 16 | do output="$(curl -i -s --show-error -XPOST -u $2:$3 -H "Content-Type: application/json" -w '\nhttp_status=%{http_code}' -d @$f $4)" 17 | echo $output 18 | http_status="$(echo $output | sed -n 's/.*http_status=//p')" 19 | if [ $http_status -gt 300 ]; then 20 | exit 1 21 | fi 22 | done 23 | 24 | -------------------------------------------------------------------------------- /benchmark/very_custom.yml: -------------------------------------------------------------------------------- 1 | # this is a heavily customized model used to benchmark routing with a custom weighting 2 | speed: 3 | - if: road_class == MOTORWAY 4 | multiply_by: 0.85 5 | - else_if: road_class == PRIMARY 6 | multiply_by: 0.9 7 | - if: true 8 | limit_to: 110 9 | 10 | priority: 11 | - if: max_height < 3.8 12 | multiply_by: 0 13 | - if: max_width < 2.5 14 | multiply_by: 0 15 | 16 | - if: road_class == PRIMARY 17 | multiply_by: 0.5 18 | - else_if: road_class != MOTORWAY 19 | multiply_by: 0.9 20 | 21 | - if: toll != NO 22 | multiply_by: 0.5 23 | - if: hazmat == NO 24 | multiply_by: 0 25 | -------------------------------------------------------------------------------- /client-hc/src/test/java/com/graphhopper/api/GHMatrixBatchTest.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.api; 2 | 3 | import com.fasterxml.jackson.databind.JsonNode; 4 | 5 | import java.io.IOException; 6 | 7 | /** 8 | * @author Peter Karich 9 | */ 10 | public class GHMatrixBatchTest extends AbstractGHMatrixWebTester { 11 | 12 | @Override 13 | GraphHopperMatrixWeb createMatrixClient(final String jsonTmp) { 14 | return new GraphHopperMatrixWeb(new GHMatrixBatchRequester("") { 15 | 16 | private final String json = jsonTmp; 17 | 18 | @Override 19 | protected String postJson(String url, JsonNode data) throws IOException { 20 | return "{\"job_id\": \"1\"}"; 21 | } 22 | 23 | @Override 24 | protected String getJson(String url) throws IOException { 25 | return json; 26 | } 27 | }.setSleepAfterGET(0)); 28 | } 29 | 30 | @Override 31 | GHMatrixAbstractRequester createRequester(String url) { 32 | return new GHMatrixBatchRequester(url); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /client-hc/src/test/java/com/graphhopper/api/GHMatrixSyncTest.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.api; 2 | 3 | import com.fasterxml.jackson.databind.JsonNode; 4 | 5 | import java.io.IOException; 6 | 7 | /** 8 | * @author Peter Karich 9 | */ 10 | public class GHMatrixSyncTest extends AbstractGHMatrixWebTester { 11 | 12 | @Override 13 | GraphHopperMatrixWeb createMatrixClient(String jsonStr) throws IOException { 14 | JsonNode json = objectMapper.readTree(jsonStr); 15 | 16 | // for test we grab the solution from the "batch json" 17 | if (json.has("solution")) { 18 | json = json.get("solution"); 19 | } 20 | 21 | final String finalJsonStr = json.toString(); 22 | return new GraphHopperMatrixWeb(new GHMatrixSyncRequester("") { 23 | 24 | @Override 25 | protected String postJson(String url, JsonNode data) throws IOException { 26 | return finalJsonStr; 27 | } 28 | }); 29 | } 30 | 31 | @Override 32 | GHMatrixAbstractRequester createRequester(String url) { 33 | return new GHMatrixSyncRequester(url); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /client-hc/src/test/resources/com/graphhopper/api/matrix-connection-not-found-fail-fast.json: -------------------------------------------------------------------------------- 1 | { 2 | "status": "finished", 3 | "solution": { 4 | "info": { 5 | "took": 0.049935993, 6 | "copyrights": [ 7 | "GraphHopper", 8 | "OpenStreetMap contributors" 9 | ] 10 | }, 11 | "weights": [ 12 | [0, null], 13 | [null, 0] 14 | ], 15 | "distances": [ 16 | [1, null], 17 | [null, 1] 18 | ], 19 | "times": [ 20 | [2, null], 21 | [null, 2] 22 | ], 23 | "hints": [ 24 | { 25 | "message": "There were 2 connections that could not be found, see point_pairs for details", 26 | "details": "com.graphhopper.util.exceptions.ConnectionNotFoundException", 27 | "point_pairs": [ 28 | [0, 1], 29 | [1, 0] 30 | ] 31 | } 32 | ] 33 | } 34 | } -------------------------------------------------------------------------------- /client-hc/src/test/resources/com/graphhopper/api/matrix-point-not-found-fail-fast.json: -------------------------------------------------------------------------------- 1 | { 2 | "status": "finished", 3 | "solution": { 4 | "info": { 5 | "took": 0.049935993, 6 | "copyrights": [ 7 | "GraphHopper", 8 | "OpenStreetMap contributors" 9 | ] 10 | }, 11 | "weights": [ 12 | [0, null, 1], 13 | [null, null, null], 14 | [2, null, 3] 15 | ], 16 | "distances": [ 17 | [4, null, 5], 18 | [null, null, null], 19 | [6, null, 7] 20 | ], 21 | "times": [ 22 | [8, null, 9], 23 | [null, null, null], 24 | [10, null, 11] 25 | ], 26 | "hints": [ 27 | { 28 | "message": "There were 5 connections that could not be found, see point_pairs for details", 29 | "details": "com.graphhopper.util.exceptions.ConnectionNotFoundException", 30 | "point_pairs": [ 31 | [0, 1],[1, 0], [1, 1], [1, 2], [2, 1] 32 | ] 33 | }, 34 | { 35 | "message": "There were 1 from_points and 1 to_points that could not be found, see invalid_from/to_points for details", 36 | "details": "com.graphhopper.util.exceptions.PointsNotFoundException", 37 | "invalid_from_points": [1], 38 | "invalid_to_points": [1] 39 | } 40 | ] 41 | } 42 | } -------------------------------------------------------------------------------- /client-hc/src/test/resources/com/graphhopper/api/matrix-weights-only.json: -------------------------------------------------------------------------------- 1 | { 2 | "status": "finished", 3 | "solution": { 4 | "info": { 5 | "took": 0.049935993, 6 | "copyrights": ["GraphHopper", "OpenStreetMap contributors"] 7 | }, 8 | "weights": [[0.0, 885.867, 605.35, 1130.857], [847.623, 0.0, 807.167, 927.171], [561.04, 777.33, 0.0, 660.491], [1102.729, 905.987, 662.747, 0.0]] 9 | } 10 | } -------------------------------------------------------------------------------- /client-hc/src/test/resources/com/graphhopper/api/matrix.json: -------------------------------------------------------------------------------- 1 | { 2 | "status": "finished", 3 | "solution": { 4 | "info": { 5 | "took": 0.049935993, 6 | "copyrights": ["GraphHopper", "OpenStreetMap contributors"] 7 | }, 8 | "distances": [[0, 9475, 7199, 12869], [8939, 0, 9734, 10996], [7014, 9116, 0, 8616], [12459, 10720, 8450, 0]], 9 | "times": [[0, 886, 605, 1131], [848, 0, 807, 927], [561, 777, 0, 660], [1103, 906, 663, 0]], 10 | "weights": [[0.0, 885.867, 605.35, 1130.857], [847.623, 0.0, 807.167, 927.171], [561.04, 777.33, 0.0, 660.491], [1102.729, 905.987, 662.747, 0.0]] 11 | } 12 | } -------------------------------------------------------------------------------- /client-hc/src/test/resources/com/graphhopper/api/matrix_error.json: -------------------------------------------------------------------------------- 1 | { 2 | "message": "Cannot find from_points: 7, 8", 3 | "hints": [{ 4 | "message": "Cannot find from_points: 7, 8" 5 | }, { 6 | "message": "Cannot find to_points: 7, 8" 7 | }] 8 | } -------------------------------------------------------------------------------- /client-hc/src/test/resources/fixtures/geocoding-response.json: -------------------------------------------------------------------------------- 1 | { 2 | "copyrights": [ 3 | "OpenCageData", 4 | "OpenStreetMap", 5 | "GraphHopper" 6 | ], 7 | "hits": [ 8 | { 9 | "point": { 10 | "lat": 53.7445489, 11 | "lng": 10.0612079 12 | }, 13 | "extent": [ 14 | 10.0598605, 15 | 53.7445489, 16 | 10.0612079, 17 | 53.7456315 18 | ], 19 | "name": "Am Heidberg, 22889 Tangstedt, Germany", 20 | "country": "Germany", 21 | "city": "Tangstedt", 22 | "state": "Schleswig-Holstein", 23 | "county": "Stormarn", 24 | "street": "Am Heidberg", 25 | "postcode": "22889", 26 | "osm_id": 25014113, 27 | "osm_type": "W", 28 | "osm_value": "road" 29 | } 30 | ], 31 | "locale": "en" 32 | } -------------------------------------------------------------------------------- /core/files/N43E007.hgt.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/core/files/N43E007.hgt.zip -------------------------------------------------------------------------------- /core/files/N48W125.hgt.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/core/files/N48W125.hgt.zip -------------------------------------------------------------------------------- /core/files/N49E011.hgt.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/core/files/N49E011.hgt.zip -------------------------------------------------------------------------------- /core/files/N50E011.hgt.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/core/files/N50E011.hgt.zip -------------------------------------------------------------------------------- /core/files/N52E008.hgt.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/core/files/N52E008.hgt.zip -------------------------------------------------------------------------------- /core/files/N55W003.hgt.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/core/files/N55W003.hgt.zip -------------------------------------------------------------------------------- /core/files/S29W072.hgt.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/core/files/S29W072.hgt.zip -------------------------------------------------------------------------------- /core/files/andorra.osm.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/core/files/andorra.osm.gz -------------------------------------------------------------------------------- /core/files/andorra.osm.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/core/files/andorra.osm.pbf -------------------------------------------------------------------------------- /core/files/belarus-east.osm.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/core/files/belarus-east.osm.gz -------------------------------------------------------------------------------- /core/files/berlin-siegessaeule.osm.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/core/files/berlin-siegessaeule.osm.gz -------------------------------------------------------------------------------- /core/files/campo-grande.osm.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/core/files/campo-grande.osm.gz -------------------------------------------------------------------------------- /core/files/check-swap-usage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Get current swap usage for all running processes 3 | # Erik Ljungstrom 27/05/2011 4 | SUM=0 5 | OVERALL=0 6 | for DIR in `find /proc/ -maxdepth 1 -type d | egrep "^/proc/[0-9]"` ; do 7 | PID=`echo $DIR | cut -d / -f 3` 8 | #PROGNAME=`ps -p $PID -F --no-headers` 9 | PROGNAME=`ps -p $PID -o comm --no-headers` 10 | for SWAP in `grep Swap $DIR/smaps 2>/dev/null| awk '{ print $2 }'` 11 | do 12 | let SUM=$SUM+$SWAP 13 | done 14 | echo "PID=$PID - Swap used: $SUM from: $PROGNAME" 15 | let OVERALL=$OVERALL+$SUM 16 | SUM=0 17 | 18 | done 19 | echo "Overall swap used: $OVERALL" -------------------------------------------------------------------------------- /core/files/checkstyle.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /core/files/circle-bug.osm.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/core/files/circle-bug.osm.gz -------------------------------------------------------------------------------- /core/files/edge_based_subnetwork.osm.xml.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/core/files/edge_based_subnetwork.osm.xml.gz -------------------------------------------------------------------------------- /core/files/krautsand.osm.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/core/files/krautsand.osm.gz -------------------------------------------------------------------------------- /core/files/krems.osm.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/core/files/krems.osm.gz -------------------------------------------------------------------------------- /core/files/licenses/autocomplete-license.txt: -------------------------------------------------------------------------------- 1 | Copyright 2012 DevBridge and other contributors 2 | http://www.devbridge.com/projects/autocomplete/jquery/ 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining 5 | a copy of this software and associated documentation files (the 6 | "Software"), to deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, merge, publish, 8 | distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so, subject to 10 | the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be 13 | included in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 19 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 20 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /core/files/licenses/copying-osmosis.txt: -------------------------------------------------------------------------------- 1 | Osmosis consists of all files in this archive with the exception of the 2 | third party libraries in the lib sub-directory, and the osmosis-osm-binary 3 | library which is a re-packaged version of a third-party library. 4 | 5 | Osmosis is placed into the public domain and where this is not legally 6 | possible everybody is granted a perpetual, irrevocable license to use 7 | this work for any purpose whatsoever. 8 | 9 | DISCLAIMERS 10 | By making Osmosis publicly available, it is hoped that users will find the 11 | software useful. However: 12 | * Osmosis comes without any warranty, to the extent permitted by applicable 13 | law. 14 | * Unless required by applicable law, no liability will be accepted by 15 | the authors and distributors of this software for any damages caused 16 | as a result of its use. 17 | -------------------------------------------------------------------------------- /core/files/map-bug432.osm.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/core/files/map-bug432.osm.gz -------------------------------------------------------------------------------- /core/files/map-sidewalk-no.osm.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/core/files/map-sidewalk-no.osm.gz -------------------------------------------------------------------------------- /core/files/monaco.osm.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/core/files/monaco.osm.gz -------------------------------------------------------------------------------- /core/files/moscow.osm.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/core/files/moscow.osm.gz -------------------------------------------------------------------------------- /core/files/north-bayreuth.osm.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/core/files/north-bayreuth.osm.gz -------------------------------------------------------------------------------- /core/files/settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ossrh 6 | ${env.CI_DEPLOY_USERNAME} 7 | ${env.CI_DEPLOY_PASSWORD} 8 | 9 | 10 | 11 | 12 | ossrh 13 | 14 | true 15 | 16 | 17 | ${env.GPG_EXECUTABLE} 18 | ${env.GPG_PASSPHRASE} 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /core/files/split.geo.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "features": [ 4 | { 5 | "type": "Feature", 6 | "properties":{"area":"split1"}, 7 | "geometry": { 8 | "type": "Polygon", 9 | "coordinates": [ 10 | [ 11 | [ 12 | 11.500582695007324, 13 | 50.01722594591283 14 | ], 15 | [ 16 | 11.49667739868164, 17 | 50.015957453113025 18 | ], 19 | [ 20 | 11.5006685256958, 21 | 50.01262060562858 22 | ], 23 | [ 24 | 11.509079933166504, 25 | 50.01344794478999 26 | ], 27 | [ 28 | 11.508607864379883, 29 | 50.01747412536968 30 | ], 31 | [ 32 | 11.502084732055664, 33 | 50.018880451411206 34 | ], 35 | [ 36 | 11.500582695007324, 37 | 50.01722594591283 38 | ] 39 | ] 40 | ] 41 | } 42 | } 43 | ] 44 | } -------------------------------------------------------------------------------- /core/files/update-translations.sh: -------------------------------------------------------------------------------- 1 | HOME=$(dirname $0) 2 | cd $HOME/.. 3 | 4 | destination=src/main/resources/com/graphhopper/util/ 5 | 6 | translations="en_US SKIP SKIP ar ast bg bn_BN ca cs_CZ da_DK de_DE el eo es fa fil fi fr_FR fr_CH gl he hr_HR hsb hu_HU in_ID it ja ko lt_LT ne nl pl_PL pt_BR pt_PT ro ru sk sl_SI sr_RS sv_SE tr uk vi_VN zh_CN zh_HK zh_TW" 7 | file=$1 8 | 9 | # You can execute the following 10 | # curl 'https://docs.google.com/spreadsheets/d/10HKSFmxGVEIO92loVQetVmjXT0qpf3EA2jxuQSSYTdU/export?format=tsv&id=10HKSFmxGVEIO92loVQetVmjXT0qpf3EA2jxuQSSYTdU&gid=0' > tmp.tsv 11 | # ./files/update-translations.sh tmp.tsv && rm tmp.tsv 12 | 13 | INDEX=1 14 | for tr in $translations; do 15 | INDEX=$(($INDEX + 1)) 16 | if [[ "x$tr" = "xSKIP" ]]; then 17 | continue 18 | fi 19 | echo -e '# do not edit manually, instead use spreadsheet https://t.co/f086oJXAEI and script ./core/files/update-translations.sh\n' > $destination/$tr.txt 20 | tail -n+5 "$file" | cut -s -f1,$INDEX --output-delimiter='=' >> $destination/$tr.txt 21 | done 22 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/coll/LongIntMap.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.graphhopper.coll; 19 | 20 | /** 21 | * @author Peter Karich 22 | */ 23 | public interface LongIntMap { 24 | int put(long key, int value); 25 | 26 | int get(long key); 27 | 28 | long getSize(); 29 | 30 | void optimize(); 31 | 32 | int getMemoryUsage(); 33 | } 34 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/reader/ConditionalInspector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.graphhopper.reader; 19 | 20 | /** 21 | * @author Andrzej Oles 22 | */ 23 | public interface ConditionalInspector { 24 | boolean hasLazyEvaluatedConditions(); 25 | 26 | String getTagValue(); 27 | } 28 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/reader/ConditionalSpeedInspector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.graphhopper.reader; 19 | 20 | /** 21 | * @author Andrzej Oles 22 | */ 23 | public interface ConditionalSpeedInspector extends ConditionalInspector{ 24 | boolean hasConditionalSpeed(ReaderWay way); 25 | } 26 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/reader/ConditionalTagInspector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.graphhopper.reader; 19 | 20 | /** 21 | * @author Peter Karich 22 | */ 23 | public interface ConditionalTagInspector extends ConditionalInspector { 24 | boolean isRestrictedWayConditionallyPermitted(ReaderWay way); 25 | 26 | boolean isPermittedWayConditionallyRestricted(ReaderWay way); 27 | } 28 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/reader/osm/GraphHopperOSM.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.graphhopper.reader.osm; 19 | 20 | import com.graphhopper.GraphHopper; 21 | import com.graphhopper.util.JsonFeatureCollection; 22 | 23 | /** 24 | * This class only exists for backward compatibility. 25 | * @deprecated Use {@link GraphHopper} instead. 26 | */ 27 | @Deprecated 28 | public class GraphHopperOSM extends GraphHopper { 29 | } 30 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/reader/osm/OSMInput.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.graphhopper.reader.osm; 19 | 20 | import com.graphhopper.reader.ReaderElement; 21 | 22 | import javax.xml.stream.XMLStreamException; 23 | 24 | public interface OSMInput extends AutoCloseable { 25 | ReaderElement getNext() throws XMLStreamException; 26 | 27 | int getUnprocessedElements(); 28 | } 29 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/reader/osm/pbf/PbfBlobDecoderListener.java: -------------------------------------------------------------------------------- 1 | // This software is released into the Public Domain. See copying.txt for details. 2 | package com.graphhopper.reader.osm.pbf; 3 | 4 | import com.graphhopper.reader.ReaderElement; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * Instances of this interface are used to receive results from PBFBlobDecoder. 10 | *

11 | * 12 | * @author Brett Henderson 13 | */ 14 | public interface PbfBlobDecoderListener { 15 | /** 16 | * Provides the listener with the list of decoded entities. 17 | *

18 | * 19 | * @param decodedEntities The decoded entities. 20 | */ 21 | void complete(List decodedEntities); 22 | 23 | /** 24 | * Notifies the listener that an error occurred during processing. 25 | */ 26 | void error(Exception ex); 27 | } 28 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/reader/osm/pbf/Sink.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.graphhopper.reader.osm.pbf; 19 | 20 | import com.graphhopper.reader.ReaderElement; 21 | 22 | /** 23 | * @author Nop 24 | */ 25 | public interface Sink { 26 | void process(ReaderElement item); 27 | 28 | void complete(); 29 | } 30 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/BidirPathExtractor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.graphhopper.routing; 20 | 21 | public interface BidirPathExtractor { 22 | Path extract(SPTEntry fwdEntry, SPTEntry bwdEntry, double bestWeight); 23 | } 24 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/ch/NodeOrderingProvider.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.routing.ch; 2 | 3 | public interface NodeOrderingProvider { 4 | 5 | static NodeOrderingProvider identity(int nodes) { 6 | return new NodeOrderingProvider() { 7 | @Override 8 | public int getNodeIdForLevel(int level) { 9 | return level; 10 | } 11 | 12 | @Override 13 | public int getNumNodes() { 14 | return nodes; 15 | } 16 | }; 17 | } 18 | 19 | static NodeOrderingProvider fromArray(int... nodes) { 20 | return new NodeOrderingProvider() { 21 | @Override 22 | public int getNodeIdForLevel(int level) { 23 | return nodes[level]; 24 | } 25 | 26 | @Override 27 | public int getNumNodes() { 28 | return nodes.length; 29 | } 30 | }; 31 | } 32 | 33 | int getNodeIdForLevel(int level); 34 | 35 | int getNumNodes(); 36 | } 37 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/ch/PrepareGraphEdgeExplorer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.graphhopper.routing.ch; 20 | 21 | public interface PrepareGraphEdgeExplorer { 22 | PrepareGraphEdgeIterator setBaseNode(int node); 23 | } 24 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/ch/PrepareGraphOrigEdgeExplorer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.graphhopper.routing.ch; 20 | 21 | public interface PrepareGraphOrigEdgeExplorer { 22 | PrepareGraphOrigEdgeIterator setBaseNode(int node); 23 | } 24 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/ch/PrepareGraphOrigEdgeIterator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.graphhopper.routing.ch; 20 | 21 | public interface PrepareGraphOrigEdgeIterator { 22 | boolean next(); 23 | 24 | int getBaseNode(); 25 | 26 | int getAdjNode(); 27 | 28 | int getOrigEdgeKeyFirst(); 29 | 30 | int getOrigEdgeKeyLast(); 31 | } 32 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/ev/BikeNetwork.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.routing.ev; 2 | 3 | public class BikeNetwork { 4 | public static final String KEY = RouteNetwork.key("bike"); 5 | } 6 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/ev/BooleanEncodedValue.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.routing.ev; 2 | 3 | import com.graphhopper.storage.IntsRef; 4 | 5 | /** 6 | * This interface defines access to an edge property of type boolean. The default value is false. 7 | */ 8 | public interface BooleanEncodedValue extends EncodedValue { 9 | void setBool(boolean reverse, IntsRef ref, boolean value); 10 | 11 | boolean getBool(boolean reverse, IntsRef ref); 12 | } 13 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/ev/DecimalEncodedValue.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.routing.ev; 2 | 3 | import com.graphhopper.storage.IntsRef; 4 | 5 | /** 6 | * This class defines how and where to store an unsigned decimal value. It is important to note that: 7 | * 1. the range of the number is highly limited (unlike the Java 32bit float or 64bit double values) 8 | * so that the storable part of it fits into the specified number of bits (maximum 32 at the moment 9 | * for all implementations) and 2. the default value is always 0. 10 | * 11 | * @see UnsignedDecimalEncodedValue 12 | */ 13 | public interface DecimalEncodedValue extends EncodedValue { 14 | 15 | /** 16 | * This method stores the specified double value (rounding with a previously defined factor) into the IntsRef. 17 | * 18 | * @see #getMaxDecimal() 19 | */ 20 | void setDecimal(boolean reverse, IntsRef ref, double value); 21 | 22 | double getDecimal(boolean reverse, IntsRef ref); 23 | 24 | /** 25 | * The double value this EncodedValue accepts for setDecimal without throwing an exception. 26 | */ 27 | double getMaxDecimal(); 28 | } 29 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/ev/EncodedValueFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.graphhopper.routing.ev; 19 | 20 | public interface EncodedValueFactory { 21 | /** 22 | * This method assumes a string value with the key of an EncodedValue like "road_class" and returns an instance 23 | * of it. 24 | */ 25 | EncodedValue create(String encodedValueString); 26 | } 27 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/ev/FootNetwork.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.routing.ev; 2 | 3 | public class FootNetwork { 4 | public static final String KEY = RouteNetwork.key("foot"); 5 | } 6 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/ev/GetOffBike.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.routing.ev; 2 | 3 | public class GetOffBike { 4 | public static final String KEY = "get_off_bike"; 5 | 6 | public static BooleanEncodedValue create() { 7 | return new SimpleBooleanEncodedValue(KEY, false); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/ev/Hazmat.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.routing.ev; 2 | 3 | /** 4 | * Defines general restrictions for the transport of hazardous materials.
5 | * If not tagged it will be {@link #YES} 6 | */ 7 | public enum Hazmat { 8 | YES("yes"), NO("no"); 9 | 10 | public static final String KEY = "hazmat"; 11 | 12 | private final String name; 13 | 14 | Hazmat(String name) { 15 | this.name = name; 16 | } 17 | 18 | @Override 19 | public String toString() { 20 | return name; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/ev/HazmatTunnel.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.routing.ev; 2 | 3 | /** 4 | * Defines the degree of restriction for the transport of hazardous goods through tunnels.
5 | * If not tagged it will be {@link #A} 6 | * 7 | * @see Hazmat Tunnel restrictions 8 | */ 9 | public enum HazmatTunnel { 10 | /** driving with any dangerous goods allowed */ 11 | A("A"), 12 | /** no goods with very large explosion range */ 13 | B("B"), 14 | /** no goods with large explosion or poisoning range */ 15 | C("C"), 16 | /** no goods which threaten a large explosion, poisoning or fire */ 17 | D("D"), 18 | /** forbids all dangerous goods except: UN 2919,3291, 3331, 3359, 3373 */ 19 | E("E"); 20 | 21 | public static final String KEY = "hazmat_tunnel"; 22 | 23 | private final String name; 24 | 25 | HazmatTunnel(String name) { 26 | this.name = name; 27 | } 28 | 29 | @Override 30 | public String toString() { 31 | return name; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/ev/HazmatWater.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.routing.ev; 2 | 3 | /** 4 | * Defines general restrictions for the transport of goods through water protection areas.
5 | * If not tagged it will be {@link #YES} 6 | */ 7 | public enum HazmatWater { 8 | YES("yes"), PERMISSIVE("permissive"), NO("no"); 9 | 10 | public static final String KEY = "hazmat_water"; 11 | 12 | private final String name; 13 | 14 | HazmatWater(String name) { 15 | this.name = name; 16 | } 17 | 18 | @Override 19 | public String toString() { 20 | return name; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/ev/HikeRating.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.routing.ev; 2 | 3 | public class HikeRating { 4 | public static final String KEY = "hike_rating"; 5 | 6 | public static IntEncodedValue create() { 7 | return new UnsignedIntEncodedValue(KEY, 3, false); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/ev/HorseRating.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.routing.ev; 2 | 3 | public class HorseRating { 4 | public static final String KEY = "horse_rating"; 5 | 6 | public static IntEncodedValue create() { 7 | return new UnsignedIntEncodedValue(KEY, 3, false); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/ev/IntEncodedValue.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.routing.ev; 2 | 3 | import com.graphhopper.storage.IntsRef; 4 | 5 | /** 6 | * This class defines how and where to store an unsigned integer. It is important to note that: 1. the range of the 7 | * integer is highly limited (unlike the Java 32bit integer values) so that the storable part of it fits into the 8 | * specified number of bits (maximum 32) and 2. the default value is always 0. 9 | * 10 | * @see UnsignedIntEncodedValue 11 | */ 12 | public interface IntEncodedValue extends EncodedValue { 13 | 14 | /** 15 | * This method restores the integer value from the specified 'flags' taken from the storage. 16 | */ 17 | int getInt(boolean reverse, IntsRef ref); 18 | 19 | /** 20 | * This method stores the specified integer value in the specified IntsRef. 21 | */ 22 | void setInt(boolean reverse, IntsRef ref, int value); 23 | 24 | /** 25 | * The int value this EncodedValue accepts for setInt without throwing an exception. 26 | */ 27 | int getMaxInt(); 28 | 29 | /** 30 | * @return true if this EncodedValue can store a different value for its reverse direction 31 | */ 32 | boolean isStoreTwoDirections(); 33 | } -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/ev/Lanes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.graphhopper.routing.ev; 20 | 21 | public class Lanes { 22 | public static final String KEY = "lanes"; 23 | 24 | public static IntEncodedValue create() { 25 | return new UnsignedIntEncodedValue(KEY, 3, false); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/ev/MtbRating.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.routing.ev; 2 | 3 | public class MtbRating { 4 | public static final String KEY = "mtb_rating"; 5 | 6 | public static IntEncodedValue create() { 7 | return new UnsignedIntEncodedValue(KEY, 3, false); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/ev/RoadClassLink.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.graphhopper.routing.ev; 19 | 20 | public class RoadClassLink { 21 | public static final String KEY = "road_class_link"; 22 | } 23 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/ev/Roundabout.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.graphhopper.routing.ev; 19 | 20 | public class Roundabout { 21 | public static final String KEY = "roundabout"; 22 | 23 | public static BooleanEncodedValue create() { 24 | return new SimpleBooleanEncodedValue(KEY, false); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/ev/TurnCost.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.routing.ev; 2 | 3 | import com.graphhopper.storage.IntsRef; 4 | import com.graphhopper.util.Helper; 5 | 6 | import static com.graphhopper.routing.util.EncodingManager.getKey; 7 | 8 | public class TurnCost { 9 | 10 | public static String key(String prefix) { 11 | return getKey(prefix, "turn_cost"); 12 | } 13 | 14 | /** 15 | * This creates an EncodedValue specifically for the turn costs 16 | */ 17 | public static DecimalEncodedValue create(String name, int maxTurnCosts) { 18 | int turnBits = Helper.countBitValue(maxTurnCosts); 19 | return new UnsignedDecimalEncodedValue(key(name), turnBits, 1, 0, false, true); 20 | } 21 | 22 | public static IntsRef createFlags() { 23 | return new IntsRef(1); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/querygraph/EdgeIteratorStateHelper.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.routing.querygraph; 2 | 3 | import com.graphhopper.routing.querygraph.VirtualEdgeIterator; 4 | import com.graphhopper.routing.querygraph.VirtualEdgeIteratorState; 5 | import com.graphhopper.util.EdgeIteratorState; 6 | 7 | // ORS-GH MOD START - NEW CLASS 8 | // TODO ORS (minor): provide a reason for this change 9 | // TODO ORS (minor): this is the same thing as EdgeKeys 10 | // TODO ORS (minor): if the modifications around originalEdge are needed, 11 | // move this method into EdgeIteratorState or a parent 12 | // class and use polymorphism. 13 | public class EdgeIteratorStateHelper { 14 | 15 | public static int getOriginalEdge(EdgeIteratorState inst) { 16 | if (inst instanceof VirtualEdgeIteratorState) { 17 | return ((VirtualEdgeIteratorState) inst).getOriginalEdge(); 18 | } else if (inst instanceof VirtualEdgeIterator) { 19 | // MARQ24 the 'detach' impl in the VirtualEdgeIterator will simply 20 | // return the EdgeState of the current active edge... 21 | // -> return edges.get(current) 22 | return getOriginalEdge(((VirtualEdgeIterator) inst).detach(false)); 23 | } else { 24 | return inst.getEdge(); 25 | } 26 | } 27 | } 28 | // ORS-GH MOD END 29 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/util/AbstractAdjustedSpeedCalculator.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.routing.util; 2 | 3 | /** 4 | * Retrieve default speed 5 | * 6 | * @author Andrzej Oles 7 | */ 8 | // ORS-GH MOD START - additional class 9 | public abstract class AbstractAdjustedSpeedCalculator implements SpeedCalculator{ 10 | protected final SpeedCalculator superSpeedCalculator; 11 | 12 | public AbstractAdjustedSpeedCalculator(SpeedCalculator superSpeedCalculator) { 13 | if (superSpeedCalculator == null) 14 | throw new IllegalArgumentException("No super calculator set"); 15 | this.superSpeedCalculator = superSpeedCalculator; 16 | } 17 | 18 | @Override 19 | public boolean isTimeDependent() { 20 | return superSpeedCalculator.isTimeDependent(); 21 | } 22 | } 23 | // ORS-GH MOD END 24 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/util/AllEdgesIterator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.graphhopper.routing.util; 19 | 20 | import com.graphhopper.util.EdgeIterator; 21 | 22 | /** 23 | * @author Peter Karich 24 | */ 25 | public interface AllEdgesIterator extends EdgeIterator { 26 | /** 27 | * @return the maximum edgeId in the graph plus 1 28 | */ 29 | int length(); 30 | } 31 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/util/DefaultPathProcessor.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.routing.util; 2 | 3 | import com.graphhopper.util.EdgeIteratorState; 4 | import com.graphhopper.util.PointList; 5 | 6 | // ORS-GH MOD 7 | public class DefaultPathProcessor implements PathProcessor { 8 | public DefaultPathProcessor() { 9 | } 10 | 11 | public void processPathEdge(EdgeIteratorState edge, PointList geom) { 12 | } 13 | 14 | public PointList processPoints(PointList points) { 15 | return points; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/util/DefaultPathProcessorFactory.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.routing.util; 2 | 3 | import com.graphhopper.storage.GraphHopperStorage; 4 | import com.graphhopper.util.PMap; 5 | 6 | // ORS-GH MOD 7 | public class DefaultPathProcessorFactory implements PathProcessorFactory { 8 | 9 | @Override 10 | public PathProcessor createPathProcessor(PMap opts, FlagEncoder enc, GraphHopperStorage ghStorage) { 11 | return new DefaultPathProcessor(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/util/DefaultSpeedCalculator.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.routing.util; 2 | 3 | import com.graphhopper.routing.ev.DecimalEncodedValue; 4 | import com.graphhopper.util.EdgeIteratorState; 5 | 6 | /** 7 | * Retrieve default speed 8 | * 9 | * @author Andrzej Oles 10 | */ 11 | public class DefaultSpeedCalculator implements SpeedCalculator{ 12 | protected final DecimalEncodedValue avSpeedEnc; 13 | 14 | public DefaultSpeedCalculator(FlagEncoder encoder) { 15 | avSpeedEnc = encoder.getAverageSpeedEnc(); 16 | } 17 | 18 | @Override 19 | public double getSpeed(EdgeIteratorState edge, boolean reverse, long time) { 20 | return reverse ? edge.getReverse(avSpeedEnc) : edge.get(avSpeedEnc); 21 | } 22 | 23 | @Override 24 | public boolean isTimeDependent() { 25 | return false; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/util/EdgeFilter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.graphhopper.routing.util; 19 | 20 | import com.graphhopper.util.EdgeIteratorState; 21 | 22 | /** 23 | * Class used to traverse a graph. 24 | * 25 | * @author Peter Karich 26 | */ 27 | public interface EdgeFilter { 28 | EdgeFilter ALL_EDGES = edgeState -> true; 29 | 30 | /** 31 | * @return true if the current edge should be processed and false otherwise. 32 | */ 33 | boolean accept(EdgeIteratorState edgeState); 34 | } 35 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/util/PathProcessor.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.routing.util; 2 | 3 | import com.graphhopper.util.EdgeIteratorState; 4 | import com.graphhopper.util.PointList; 5 | 6 | // ORS-GH MOD - new class 7 | // TODO ORS: why is this class needed? How does GH deal with this? See Path.forEveryEdge 8 | public interface PathProcessor { 9 | PathProcessor DEFAULT = new DefaultPathProcessor(); 10 | 11 | void processPathEdge(EdgeIteratorState edge, PointList geom); 12 | 13 | PointList processPoints(PointList points); 14 | } 15 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/util/PathProcessorFactory.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.routing.util; 2 | 3 | import com.graphhopper.storage.GraphHopperStorage; 4 | import com.graphhopper.util.PMap; 5 | 6 | // ORS-GH MOD - new class 7 | public interface PathProcessorFactory { 8 | PathProcessorFactory DEFAULT = new DefaultPathProcessorFactory(); 9 | 10 | PathProcessor createPathProcessor(PMap opts, FlagEncoder enc, GraphHopperStorage ghStorage); 11 | } 12 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/util/SpeedCalculator.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.routing.util; 2 | 3 | import com.graphhopper.util.EdgeIteratorState; 4 | 5 | /** 6 | * Common interface for time-dependent speed calculation 7 | * 8 | * @author Hendrik Leuschner 9 | * @author Andrzej Oles 10 | */ 11 | public interface SpeedCalculator { 12 | double getSpeed(EdgeIteratorState edge, boolean reverse, long time); 13 | 14 | boolean isTimeDependent(); 15 | } 16 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/util/TimeDependentEdgeFilter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.graphhopper.routing.util; 19 | 20 | import com.graphhopper.util.EdgeIteratorState; 21 | 22 | /** 23 | * Class used to traverse a graph. 24 | * 25 | * @author Andrzej Oles 26 | */ 27 | public interface TimeDependentEdgeFilter { 28 | /** 29 | * @return true if the current edge should be processed and false otherwise. 30 | */ 31 | boolean accept(EdgeIteratorState edgeState, long time); 32 | } 33 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/util/parsers/OSMHazmatParser.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.routing.util.parsers; 2 | 3 | import com.graphhopper.reader.ReaderWay; 4 | import com.graphhopper.routing.ev.EncodedValue; 5 | import com.graphhopper.routing.ev.EncodedValueLookup; 6 | import com.graphhopper.routing.ev.EnumEncodedValue; 7 | import com.graphhopper.routing.ev.Hazmat; 8 | import com.graphhopper.storage.IntsRef; 9 | 10 | import java.util.List; 11 | 12 | public class OSMHazmatParser implements TagParser { 13 | 14 | private final EnumEncodedValue hazEnc; 15 | 16 | public OSMHazmatParser() { 17 | this.hazEnc = new EnumEncodedValue<>(Hazmat.KEY, Hazmat.class); 18 | } 19 | 20 | @Override 21 | public void createEncodedValues(EncodedValueLookup lookup, List registerNewEncodedValue) { 22 | registerNewEncodedValue.add(hazEnc); 23 | } 24 | 25 | @Override 26 | public IntsRef handleWayTags(IntsRef edgeFlags, ReaderWay readerWay, boolean ferry, IntsRef relationFlags) { 27 | if (readerWay.hasTag("hazmat", "no")) { 28 | hazEnc.setEnum(false, edgeFlags, Hazmat.NO); 29 | } 30 | return edgeFlags; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/util/parsers/TagParserFactory.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.routing.util.parsers; 2 | 3 | import com.graphhopper.util.PMap; 4 | 5 | public interface TagParserFactory { 6 | TagParser create(String name, PMap configuration); 7 | } 8 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/routing/weighting/WeightingFactory.java: -------------------------------------------------------------------------------- 1 | // ORS-GH MOD START - new class 2 | // TODO ORS: Why do we need this? How does GH deal with it? 3 | package com.graphhopper.routing.weighting; 4 | 5 | import com.graphhopper.routing.util.FlagEncoder; 6 | import com.graphhopper.storage.GraphHopperStorage; 7 | import com.graphhopper.util.PMap; 8 | 9 | public interface WeightingFactory { 10 | 11 | public Weighting createWeighting(PMap hintsMap, FlagEncoder encoder, GraphHopperStorage graphStorage); 12 | } 13 | // ORS_GH MOD END -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/search/ConditionalIndex.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.search; 2 | 3 | import com.graphhopper.storage.Directory; 4 | 5 | import java.util.HashMap; 6 | import java.util.Map; 7 | 8 | /** 9 | * @author Andrzej Oles 10 | */ 11 | public class ConditionalIndex extends NameIndex { 12 | Map values = new HashMap<>(); 13 | 14 | @Override 15 | public long put(String name) { 16 | Long index = values.get(name); 17 | 18 | if (index == null) { 19 | index = super.put(name); 20 | values.put(name, index); 21 | } 22 | 23 | return index; 24 | } 25 | 26 | public ConditionalIndex(Directory dir, String filename) { 27 | super(dir, filename); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/storage/CHEdgeFilter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.graphhopper.storage; 20 | 21 | public interface CHEdgeFilter { 22 | 23 | CHEdgeFilter ALL_EDGES = edgeState -> true; 24 | 25 | boolean accept(RoutingCHEdgeIteratorState edgeState); 26 | } 27 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/storage/GHLock.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.graphhopper.storage; 19 | 20 | /** 21 | * A write lock interface. Influenced by Lucene code 22 | *

23 | * 24 | * @author Peter Karich 25 | */ 26 | public interface GHLock { 27 | String getName(); 28 | 29 | boolean tryLock(); 30 | 31 | boolean isLocked(); 32 | 33 | void release(); 34 | 35 | Exception getObtainFailedReason(); 36 | } 37 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/storage/GraphExtension.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.storage; 2 | 3 | // TODO ORS: this is a transitional class which should be eliminated in the long run 4 | // ORS-GH MOD - additional class 5 | public interface GraphExtension extends Storable { 6 | GraphExtension create(long initSize); 7 | 8 | void init(Graph graph, Directory dir); 9 | 10 | boolean loadExisting(); 11 | 12 | void flush(); 13 | 14 | long getCapacity(); 15 | } 16 | // ORS-GH MOD -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/storage/GraphStorageFactory.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.storage; 2 | 3 | import com.graphhopper.GraphHopper; 4 | 5 | // ORS-GH MOD - Modification by Maxim Rylov: Added a new class. 6 | public interface GraphStorageFactory { 7 | 8 | public GraphHopperStorage createStorage(GHDirectory dir, GraphHopper gh); 9 | } 10 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/storage/RoutingCHEdgeExplorer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.graphhopper.storage; 20 | 21 | public interface RoutingCHEdgeExplorer { 22 | RoutingCHEdgeIterator setBaseNode(int baseNode); 23 | } 24 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/storage/RoutingCHEdgeIterator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.graphhopper.storage; 20 | 21 | public interface RoutingCHEdgeIterator extends RoutingCHEdgeIteratorState { 22 | boolean next(); 23 | } 24 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/util/FetchMode.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.util; 2 | 3 | /** 4 | * This enum is used to specify which nodes should be included in the PointList when calling 5 | * {@link EdgeIteratorState#fetchWayGeometry(FetchMode)}. See also docs/core/low-level-api.md 6 | */ 7 | public enum FetchMode { 8 | TOWER_ONLY, PILLAR_ONLY, BASE_AND_PILLAR, PILLAR_AND_ADJ, ALL 9 | } 10 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/util/NotThreadSafe.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.graphhopper.util; 19 | 20 | /** 21 | * Marks classes or methods as none thread-safe 22 | *

23 | * 24 | * @author Peter Karich 25 | */ 26 | public @interface NotThreadSafe { 27 | } 28 | -------------------------------------------------------------------------------- /core/src/main/java/com/graphhopper/util/ProgressListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.graphhopper.util; 19 | 20 | /** 21 | * @author Peter Karich 22 | */ 23 | public interface ProgressListener { 24 | void update(long val); 25 | } 26 | -------------------------------------------------------------------------------- /core/src/main/resources/com/graphhopper/builddate: -------------------------------------------------------------------------------- 1 | ${builddate} -------------------------------------------------------------------------------- /core/src/main/resources/com/graphhopper/gitinfo: -------------------------------------------------------------------------------- 1 | # properties will be filled by git-commit-id-plugin during maven build 2 | ${git.commit.id} 3 | ${git.commit.time} 4 | ${git.commit.message.short} 5 | ${git.branch} 6 | ${git.dirty} -------------------------------------------------------------------------------- /core/src/main/resources/com/graphhopper/version: -------------------------------------------------------------------------------- 1 | ${project.version} -------------------------------------------------------------------------------- /core/src/test/java/com/graphhopper/coll/BitSetImplTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.graphhopper.coll; 19 | 20 | /** 21 | * @author Peter Karich 22 | */ 23 | public class BitSetImplTest extends AbstractMyBitSetTest { 24 | @Override 25 | public GHBitSet createBitSet(int no) { 26 | return new GHBitSetImpl(no); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /core/src/test/java/com/graphhopper/routing/ev/DefaultEncodedValueFactoryTest.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.routing.ev; 2 | 3 | import org.junit.jupiter.api.Test; 4 | 5 | import static org.junit.jupiter.api.Assertions.assertEquals; 6 | 7 | public class DefaultEncodedValueFactoryTest { 8 | 9 | private final DefaultEncodedValueFactory factory = new DefaultEncodedValueFactory(); 10 | 11 | @Test 12 | public void loadRoadClass() { 13 | EncodedValue rcEnc = new EnumEncodedValue<>(RoadClass.KEY, RoadClass.class); 14 | EncodedValue loadedRCEnc = factory.create(rcEnc.toString()); 15 | assertEquals(loadedRCEnc, rcEnc); 16 | } 17 | 18 | @Test 19 | public void loadCarMaxSpeed() { 20 | EncodedValue enc = MaxSpeed.create(); 21 | UnsignedDecimalEncodedValue loadedEnc = (UnsignedDecimalEncodedValue) factory.create(enc.toString()); 22 | assertEquals(loadedEnc, enc); 23 | } 24 | 25 | @Test 26 | public void loadBoolean() { 27 | EncodedValue enc = Roundabout.create(); 28 | BooleanEncodedValue loadedEnc = (BooleanEncodedValue) factory.create(enc.toString()); 29 | assertEquals(loadedEnc, enc); 30 | } 31 | } -------------------------------------------------------------------------------- /core/src/test/java/com/graphhopper/routing/ev/MaxWeightTest.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.routing.ev; 2 | 3 | import com.graphhopper.storage.IntsRef; 4 | import org.junit.jupiter.api.Test; 5 | 6 | import static org.junit.jupiter.api.Assertions.assertEquals; 7 | 8 | public class MaxWeightTest { 9 | 10 | @Test 11 | public void testSetAndGet() { 12 | DecimalEncodedValue mappedDecimalEnc = MaxWeight.create(); 13 | mappedDecimalEnc.init(new EncodedValue.InitializerConfig()); 14 | IntsRef intsRef = new IntsRef(1); 15 | mappedDecimalEnc.setDecimal(false, intsRef, 20); 16 | assertEquals(20, mappedDecimalEnc.getDecimal(false, intsRef), .1); 17 | 18 | intsRef = new IntsRef(1); 19 | mappedDecimalEnc.setDecimal(false, intsRef, 0); 20 | assertEquals(Double.POSITIVE_INFINITY, mappedDecimalEnc.getDecimal(false, intsRef), .1); 21 | 22 | mappedDecimalEnc.setDecimal(false, intsRef, Double.POSITIVE_INFINITY); 23 | assertEquals(Double.POSITIVE_INFINITY, mappedDecimalEnc.getDecimal(false, intsRef), .1); 24 | } 25 | } -------------------------------------------------------------------------------- /core/src/test/java/com/graphhopper/routing/ev/RoadAccessTest.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.routing.ev; 2 | 3 | import org.junit.jupiter.api.Test; 4 | 5 | import static com.graphhopper.routing.ev.RoadAccess.NO; 6 | import static com.graphhopper.routing.ev.RoadAccess.YES; 7 | import static org.junit.jupiter.api.Assertions.assertEquals; 8 | 9 | public class RoadAccessTest { 10 | @Test 11 | public void testBasics() { 12 | assertEquals(YES, RoadAccess.find("unknown")); 13 | assertEquals(NO, RoadAccess.find("no")); 14 | } 15 | 16 | } -------------------------------------------------------------------------------- /core/src/test/java/com/graphhopper/routing/subnetwork/SubnetworkStorageTest.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.routing.subnetwork; 2 | 3 | import com.graphhopper.storage.RAMDirectory; 4 | import org.junit.jupiter.api.Test; 5 | 6 | import static org.junit.jupiter.api.Assertions.assertEquals; 7 | 8 | public class SubnetworkStorageTest { 9 | 10 | @Test 11 | public void testSimple() { 12 | SubnetworkStorage storage = new SubnetworkStorage(new RAMDirectory(), "fastest"); 13 | storage.create(2000); 14 | storage.setSubnetwork(1, 88); 15 | assertEquals(88, storage.getSubnetwork(1)); 16 | assertEquals(0, storage.getSubnetwork(0)); 17 | 18 | storage.close(); 19 | } 20 | } -------------------------------------------------------------------------------- /core/src/test/java/com/graphhopper/storage/MMapDirectoryTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.graphhopper.storage; 19 | 20 | /** 21 | * @author Peter Karich 22 | */ 23 | public class MMapDirectoryTest extends AbstractDirectoryTester { 24 | @Override 25 | Directory createDir() { 26 | return new MMapDirectory(location).create(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /core/src/test/java/com/graphhopper/storage/RAMDataAccessTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.graphhopper.storage; 19 | 20 | /** 21 | * @author Peter Karich 22 | */ 23 | public class RAMDataAccessTest extends DataAccessTest { 24 | @Override 25 | public DataAccess createDataAccess(String name, int segmentSize) { 26 | return new RAMDataAccess(name, directory, true, segmentSize); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /core/src/test/java/com/graphhopper/storage/RAMDirectoryTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.graphhopper.storage; 19 | 20 | /** 21 | * @author Peter Karich 22 | */ 23 | public class RAMDirectoryTest extends AbstractDirectoryTester { 24 | @Override 25 | Directory createDir() { 26 | return new RAMDirectory(location, true).create(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /core/src/test/java/com/graphhopper/storage/SimpleFSLockFactoryTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.graphhopper.storage; 19 | 20 | /** 21 | * @author Peter Karich 22 | */ 23 | public class SimpleFSLockFactoryTest extends AbstractLockFactoryTester { 24 | @Override 25 | protected LockFactory createLockFactory() { 26 | return new SimpleFSLockFactory(lockDir); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /core/src/test/java/com/graphhopper/util/UnzipperTest.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.util; 2 | 3 | import org.junit.jupiter.api.Test; 4 | 5 | import java.io.File; 6 | 7 | import static org.junit.jupiter.api.Assertions.assertTrue; 8 | 9 | public class UnzipperTest { 10 | 11 | @Test 12 | public void testUnzip() throws Exception { 13 | String to = "./target/tmp/test"; 14 | Helper.removeDir(new File(to)); 15 | new Unzipper().unzip("./src/test/resources/com/graphhopper/util/test.zip", to, false); 16 | assertTrue(new File("./target/tmp/test/file2 bäh").exists()); 17 | assertTrue(new File("./target/tmp/test/folder1").isDirectory()); 18 | assertTrue(new File("./target/tmp/test/folder1/folder 3").isDirectory()); 19 | Helper.removeDir(new File(to)); 20 | } 21 | 22 | 23 | } 24 | -------------------------------------------------------------------------------- /core/src/test/resources/com/graphhopper/reader/osm/test-avoid-loops.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /core/src/test/resources/com/graphhopper/reader/osm/test-avoid-loops2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /core/src/test/resources/com/graphhopper/reader/osm/test-avoid-loops3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /core/src/test/resources/com/graphhopper/reader/osm/test-avoid-loops4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /core/src/test/resources/com/graphhopper/reader/osm/test-osm-waterway.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /core/src/test/resources/com/graphhopper/reader/osm/test-osm10.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /core/src/test/resources/com/graphhopper/reader/osm/test-osm11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /core/src/test/resources/com/graphhopper/reader/osm/test-osm4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /core/src/test/resources/com/graphhopper/reader/osm/test-osm6.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/core/src/test/resources/com/graphhopper/reader/osm/test-osm6.pbf -------------------------------------------------------------------------------- /core/src/test/resources/com/graphhopper/reader/osm/test-osm9.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /core/src/test/resources/com/graphhopper/storage/change/overlaydata1.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "features": [ 4 | { 5 | "id": "1", 6 | "type": "Feature", 7 | "geometry": { 8 | "type": "Point", 9 | "coordinates": [0.005, 0.01] 10 | }, 11 | "properties": { 12 | "vehicles": ["car"], 13 | "speed": 10, 14 | "assert_nodes": [0, 1] 15 | } 16 | }, 17 | { 18 | "id": "2", 19 | "type": "Feature", 20 | "bbox": [-0.01, -0.01, 0.005, 0.005], 21 | "properties": { 22 | "access": false, 23 | "assert_nodes": [3, 4] 24 | } 25 | } 26 | ] 27 | } -------------------------------------------------------------------------------- /core/src/test/resources/com/graphhopper/storage/change/overlaydata2.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "features": [{ 4 | "type": "Feature", 5 | "geometry": { 6 | "type": "Point", 7 | "coordinates": [0.005, 0.01] 8 | }, 9 | "properties": { 10 | "vehicles": ["car"], 11 | "access": false 12 | } 13 | }] 14 | } -------------------------------------------------------------------------------- /core/src/test/resources/com/graphhopper/storage/change/overlaydata3.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "features": [{ 4 | "type": "Feature", 5 | "geometry": { 6 | "type": "Point", 7 | "coordinates": [0.005, 0.01] 8 | }, 9 | "properties": { 10 | "vehicles": ["car"], 11 | "access": true 12 | } 13 | }] 14 | } -------------------------------------------------------------------------------- /core/src/test/resources/com/graphhopper/storage/index/testgraph2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/core/src/test/resources/com/graphhopper/storage/index/testgraph2.jpg -------------------------------------------------------------------------------- /core/src/test/resources/com/graphhopper/util/test.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/core/src/test/resources/com/graphhopper/util/test.zip -------------------------------------------------------------------------------- /core/src/test/resources/log4j.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /docs/core/ch.md: -------------------------------------------------------------------------------- 1 | # Contraction Hierarchies 2 | 3 | CH is a post-import process which makes routing faster. 4 | In GraphHopper CH is enabled by default but can be easily disabled. 5 | 6 | To make CH work in GraphHopper an additional logic is added to GraphHoppperStorage (CHGraphImpl) 7 | which allows to store shortcuts too. 8 | 9 | A prepared graph can also be used for normal graph traversal IF you use chGraph.getBaseGraph(). 10 | 11 | If CH is enabled multiple vehicles will work. 12 | 13 | Details about the edge-based version of CH, that also allows taking into account turn costs and restrictions can be found [here](./edge-based-ch.md). 14 | -------------------------------------------------------------------------------- /docs/core/images/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/docs/core/images/1.jpg -------------------------------------------------------------------------------- /docs/core/images/10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/docs/core/images/10.jpg -------------------------------------------------------------------------------- /docs/core/images/11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/docs/core/images/11.jpg -------------------------------------------------------------------------------- /docs/core/images/12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/docs/core/images/12.jpg -------------------------------------------------------------------------------- /docs/core/images/13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/docs/core/images/13.jpg -------------------------------------------------------------------------------- /docs/core/images/15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/docs/core/images/15.jpg -------------------------------------------------------------------------------- /docs/core/images/16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/docs/core/images/16.jpg -------------------------------------------------------------------------------- /docs/core/images/17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/docs/core/images/17.jpg -------------------------------------------------------------------------------- /docs/core/images/18.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/docs/core/images/18.jpg -------------------------------------------------------------------------------- /docs/core/images/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/docs/core/images/2.jpg -------------------------------------------------------------------------------- /docs/core/images/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/docs/core/images/3.jpg -------------------------------------------------------------------------------- /docs/core/images/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/docs/core/images/4.jpg -------------------------------------------------------------------------------- /docs/core/images/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/docs/core/images/5.jpg -------------------------------------------------------------------------------- /docs/core/images/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/docs/core/images/6.jpg -------------------------------------------------------------------------------- /docs/core/images/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/docs/core/images/7.jpg -------------------------------------------------------------------------------- /docs/core/images/8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/docs/core/images/8.jpg -------------------------------------------------------------------------------- /docs/core/images/9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/docs/core/images/9.jpg -------------------------------------------------------------------------------- /docs/core/images/clone1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/docs/core/images/clone1.png -------------------------------------------------------------------------------- /docs/core/images/clone2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/docs/core/images/clone2.png -------------------------------------------------------------------------------- /docs/core/images/clone3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/docs/core/images/clone3.png -------------------------------------------------------------------------------- /docs/core/images/clone4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/docs/core/images/clone4.png -------------------------------------------------------------------------------- /docs/core/images/clone5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/docs/core/images/clone5.png -------------------------------------------------------------------------------- /docs/core/images/edge-based-ch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/docs/core/images/edge-based-ch.png -------------------------------------------------------------------------------- /docs/core/images/egit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/docs/core/images/egit.png -------------------------------------------------------------------------------- /docs/core/images/egit2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/docs/core/images/egit2.png -------------------------------------------------------------------------------- /docs/core/images/import1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/docs/core/images/import1.png -------------------------------------------------------------------------------- /docs/core/images/import2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/docs/core/images/import2.png -------------------------------------------------------------------------------- /docs/core/images/intellij-run-config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/docs/core/images/intellij-run-config.png -------------------------------------------------------------------------------- /docs/core/images/maven.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/docs/core/images/maven.png -------------------------------------------------------------------------------- /docs/core/images/turn-restrictions-correct.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/docs/core/images/turn-restrictions-correct.png -------------------------------------------------------------------------------- /docs/core/images/turn-restrictions-wrong.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/docs/core/images/turn-restrictions-wrong.png -------------------------------------------------------------------------------- /docs/core/images/wiki-graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/docs/core/images/wiki-graph.png -------------------------------------------------------------------------------- /docs/core/windows-setup.md: -------------------------------------------------------------------------------- 1 | # Windows Setup from Source 2 | 3 | Download [cygwin](http://www.cygwin.com/) and click on the setup where you need to select wget, git and unzip. 4 | 5 | Now you can choose to either [install GraphHopper](../web/quickstart.md) or if you plan to customize the source code [install it from source](./quickstart-from-source.md). 6 | 7 | After that graphhopper web should start. After this open [http://localhost:8989/](http://localhost:8989/) in your browser. 8 | 9 | ### Troubleshooting 10 | * Make sure you have the latest JDK installed and not only the JRE 11 | * For me JAVA_HOME was not correct so I had to overwrite it before calling 12 | the `graphhopper.sh` script: 13 | ```bash 14 | export JAVA_HOME=/cygdrive/c/Programme/Java/jdk1.8.0_77 15 | ``` 16 | -------------------------------------------------------------------------------- /docs/isochrone/images/isochrone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/docs/isochrone/images/isochrone.png -------------------------------------------------------------------------------- /docs/isochrone/java.md: -------------------------------------------------------------------------------- 1 | # Isochrone via Java API 2 | 3 | To use the following examples you need to specify the dependency in 4 | your [Maven config](/README.md#maven) correctly. 5 | 6 | You'll first need to build off an existing Graphhopper instance for [routing](../core/routing.md). 7 | 8 | See this [example code](../../example/src/main/java/com/graphhopper/example/IsochroneExample.java) 9 | how to build and traverse a shortest path tree, which means enumerating, in order, all nodes that 10 | can be reached within a given time limit. 11 | 12 | See [IsochroneResource.java](../../web-bundle/src/main/java/com/graphhopper/resources/IsochroneResource.java) 13 | to see how we use the shortest path tree to construct an isochrone (or other isoline, depending on the weighting). -------------------------------------------------------------------------------- /docs/web/open-search.md: -------------------------------------------------------------------------------- 1 | Add GraphHopper Maps to your Browser 2 | ---- 3 | 4 | ## Firefox 5 | 6 | 1. go to http://graphhopper.com/maps 7 | 2. Then right click into the search bar and select 'add GraphHopper Maps' (here 'GraphHopper Maps' hinzufügen) 8 | 3. Finally select 'GraphHopper Maps' and type your locations. Put 'p:' before your every location. 9 | 10 | ![firefox](http://karussell.files.wordpress.com/2013/08/firefox.png) 11 | 12 | ## Chrome 13 | 14 | 1. Open your settings in chrome and go to 'search' to add a new search engine. Use the URL `http://graphhopper.com/maps/?q=%s` 15 | 2. Finally search via GraphHopper Maps: type 'gh ' and then put 'p:' before your locations. 16 | ![chrome](http://karussell.files.wordpress.com/2013/08/chrome.png) -------------------------------------------------------------------------------- /docs/web/quickstart.md: -------------------------------------------------------------------------------- 1 | ## Quickstart 2 | 3 | If you want to build GraphHopper from source look at the [Developers page](../core/quickstart-from-source.md). 4 | 5 | To download GraphHopper follow [the installation instructions](https://github.com/graphhopper/graphhopper#installation) 6 | where you need a recent JRE. 7 | 8 | See [here](./../core/elevation.md) how to enable elevation data. To see how GraphHopper is configured for production usage, see the [deployment guide](./../core/deploy.md). 9 | 10 | ## Troubleshooting 11 | 12 | * Make sure JRE8 is installed. If not get Java [here](http://java.com). 13 | * Regarding step 2: 14 | * The folder where you execute the java command should contain the following files: berlin-latest.osm.pbf, config-example.yml and `graphhopper-web-[version].jar` 15 | * The first time you execute this it'll take ~30 seconds (for Berlin), further starts will only load the graph and should be nearly instantaneous. You should see log statements but no exceptions and the last entry should be something like: Started server at HTTP 8989 16 | * Regarding step 3: 17 | * Depending on the size of the map you might run into `java.lang.OutOfMemoryError`. In this case you need to increase the memory settings of the JVM by starting the above command with `java -Xmx2g -Xms2g ...` (example for 2GB memory) 18 | * Or [contact us](../index.md#contact) 19 | -------------------------------------------------------------------------------- /example/src/main/resources/log4j.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /example/src/test/java/com/graphhopper/example/LocationIndexExampleTest.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.example; 2 | 3 | import org.junit.jupiter.api.Test; 4 | 5 | class LocationIndexExampleTest { 6 | 7 | @Test 8 | public void main() { 9 | LocationIndexExample.main(new String[]{"../"}); 10 | } 11 | } -------------------------------------------------------------------------------- /example/src/test/java/com/graphhopper/example/LowLevelAPIExampleTest.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.example; 2 | 3 | import org.junit.jupiter.api.Test; 4 | 5 | public class LowLevelAPIExampleTest { 6 | 7 | @Test 8 | public void main() { 9 | LowLevelAPIExample.main(null); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /example/src/test/java/com/graphhopper/example/RoutingExampleTest.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.example; 2 | 3 | import com.graphhopper.util.Helper; 4 | import org.junit.jupiter.api.Test; 5 | 6 | import java.io.File; 7 | 8 | public class RoutingExampleTest { 9 | 10 | @Test 11 | public void main() { 12 | Helper.removeDir(new File("target/routing-graph-cache")); 13 | RoutingExample.main(new String[]{"../"}); 14 | 15 | Helper.removeDir(new File("target/routing-tc-graph-cache")); 16 | RoutingExampleTC.main(new String[]{"../"}); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /git: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/git -------------------------------------------------------------------------------- /hmm-lib/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2015-2016, BMW Car IT GmbH and BMW AG 2 | Author: Stefan Holder (stefan.holder@bmw.de) 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | 16 | This project has dependencies to: 17 | Apache Maven, under The Apache Software License, Version 2.0 18 | JUnit under Eclipse Public License - v 1.0 -------------------------------------------------------------------------------- /hmm-lib/src/main/java/com/bmw/hmm/Utils.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2015, BMW Car IT GmbH 3 | * Author: Stefan Holder (stefan.holder@bmw.de) 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package com.bmw.hmm; 19 | 20 | /** 21 | * Implementation utilities. 22 | */ 23 | class Utils { 24 | 25 | public static int initialHashMapCapacity(int maxElements) { 26 | // Default load factor of HashMaps is 0.75 27 | return (int)(maxElements / 0.75) + 1; 28 | } 29 | 30 | 31 | } 32 | -------------------------------------------------------------------------------- /isochrone/pom.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/isochrone/pom.xml -------------------------------------------------------------------------------- /map-matching/files/issue-70.osm.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/map-matching/files/issue-70.osm.gz -------------------------------------------------------------------------------- /map-matching/files/leipzig_germany.osm.pbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/map-matching/files/leipzig_germany.osm.pbf -------------------------------------------------------------------------------- /map-matching/files/map-issue13.osm.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/map-matching/files/map-issue13.osm.gz -------------------------------------------------------------------------------- /navigation/README.md: -------------------------------------------------------------------------------- 1 | # GraphHopper Navigation Module 2 | 3 | This web service returns JSON that is consumable with the [Android Navigation SDK](https://github.com/graphhopper/graphhopper-navigation-android). 4 | I.e. it provides the server side part of a mobile navigation application. 5 | 6 | An example for an Android app that uses the Navigation SDK is provided in [this repository](https://github.com/graphhopper/graphhopper-navigation-example). 7 | 8 | # Community-Driven Alternatives 9 | 10 | maphopper a node.js proxy: https://github.com/droidsolutions/maphopper 11 | -------------------------------------------------------------------------------- /navigation/settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | ossrh 7 | ${env.CI_DEPLOY_USERNAME} 8 | ${env.CI_DEPLOY_PASSWORD} 9 | 10 | 11 | github 12 | ${env.GITHUB_USERNAME} 13 | ${env.GITHUB_PASSWORD} 14 | 15 | 16 | 17 | 18 | ossrh 19 | 20 | true 21 | 22 | 23 | ${env.GPG_EXECUTABLE} 24 | ${env.GPG_PASSPHRASE} 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /navigation/src/test/java/com/graphhopper/navigation/NavigateResourceTest.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.navigation; 2 | 3 | import org.junit.jupiter.api.Test; 4 | 5 | import java.util.Collections; 6 | import java.util.List; 7 | 8 | import static org.junit.jupiter.api.Assertions.assertEquals; 9 | 10 | public class NavigateResourceTest { 11 | 12 | 13 | @Test 14 | public void voiceInstructionsTest() { 15 | 16 | List bearings = NavigateResource.getBearing(""); 17 | assertEquals(0, bearings.size()); 18 | assertEquals(Collections.EMPTY_LIST, bearings); 19 | 20 | bearings = NavigateResource.getBearing("100,1"); 21 | assertEquals(1, bearings.size()); 22 | assertEquals(100, bearings.get(0), .1); 23 | 24 | bearings = NavigateResource.getBearing(";100,1;;"); 25 | assertEquals(4, bearings.size()); 26 | assertEquals(100, bearings.get(1), .1); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /navigation/src/test/java/com/graphhopper/navigation/NavigateResponseConverterTranslationMapTest.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.navigation; 2 | 3 | import com.graphhopper.util.TranslationMap; 4 | import org.junit.jupiter.api.Test; 5 | 6 | import java.util.Locale; 7 | 8 | import static org.junit.jupiter.api.Assertions.assertEquals; 9 | 10 | public class NavigateResponseConverterTranslationMapTest { 11 | 12 | @Test 13 | public void basicTest() { 14 | TranslationMap translationMap = new TranslationMap().doImport(); 15 | assertEquals(translationMap.getWithFallBack(Locale.US).tr("navigate.in_km", 12), "In 12 kilometers"); 16 | assertEquals(translationMap.getWithFallBack(Locale.GERMAN).tr("navigate.in_km", 12), "In 12 Kilometern"); 17 | assertEquals(translationMap.getWithFallBack(new Locale("de", "DE")).tr("navigate.in_km", 12), "In 12 Kilometern"); 18 | assertEquals(translationMap.getWithFallBack(new Locale("de", "CH")).tr("navigate.in_km_singular"), "In 1 Kilometer"); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /reader-gtfs/config-example-pt.yml: -------------------------------------------------------------------------------- 1 | graphhopper: 2 | datareader.file: ../openrouteservice/openrouteservice-api-tests/data/heidelberg.osm.gz 3 | gtfs.file: ../openrouteservice/openrouteservice-api-tests/data/vrn_gtfs.zip 4 | graph.location: graphs/hdvrn 5 | 6 | profiles: 7 | - name: foot 8 | vehicle: foot 9 | weighting: fastest 10 | 11 | server: 12 | application_connectors: 13 | - type: http 14 | port: 8989 15 | bind_host: localhost 16 | admin_connectors: 17 | - type: http 18 | port: 8990 19 | bind_host: localhost 20 | -------------------------------------------------------------------------------- /reader-gtfs/files/another-sample-feed-extended-route-type.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/reader-gtfs/files/another-sample-feed-extended-route-type.zip -------------------------------------------------------------------------------- /reader-gtfs/files/another-sample-feed/agency.txt: -------------------------------------------------------------------------------- 1 | agency_id,agency_name,agency_url,agency_timezone 2 | PTA,Plemo Transit Authority,https://www.graphhopper.com,America/Los_Angeles -------------------------------------------------------------------------------- /reader-gtfs/files/another-sample-feed/calendar.txt: -------------------------------------------------------------------------------- 1 | service_id,monday,tuesday,wednesday,thursday,friday,saturday,sunday,start_date,end_date 2 | FULLW,1,1,1,1,1,1,1,20070101,20101231 3 | -------------------------------------------------------------------------------- /reader-gtfs/files/another-sample-feed/routes.txt: -------------------------------------------------------------------------------- 1 | route_id,agency_id,route_short_name,route_long_name,route_desc,route_type,route_url,route_color,route_text_color 2 | COURT2MUSEUM,PTA,C2M,Beatty Justice Court - Beatty Museum,,3,,, 3 | MUSEUM2AIRPORT,PTA,M2A,Next to Musem - Airport,,3,,, 4 | 5 | -------------------------------------------------------------------------------- /reader-gtfs/files/another-sample-feed/stop_times.txt: -------------------------------------------------------------------------------- 1 | trip_id,arrival_time,departure_time,stop_id,stop_sequence,stop_headsign,pickup_type,drop_off_time,shape_dist_traveled 2 | MUSEUM1,09:00:00,09:00:00,JUSTICE_COURT,1 3 | MUSEUM1,10:00:00,10:00:00,MUSEUM,2 4 | MUSEUM2,06:00:00,06:00:00,JUSTICE_COURT,1 5 | MUSEUM2,07:00:00,07:00:00,MUSEUM,2 6 | MUSEUM2,07:30:00,07:30:00,AIRPORT,3 7 | MUSEUMAIRPORT1,10:10:00,10:10:00,NEXT_TO_MUSEUM,1 8 | MUSEUMAIRPORT1,10:40:00,10:40:00,AIRPORT,2 9 | -------------------------------------------------------------------------------- /reader-gtfs/files/another-sample-feed/stops.txt: -------------------------------------------------------------------------------- 1 | stop_id,stop_name,stop_desc,stop_lat,stop_lon,zone_id,location_type,parent_station 2 | JUSTICE_COURT,Beatty Justice Court,,36.9010208,-116.7659466,,0, 3 | PARENT_OF_MUSEUM,Beatty Museum,,36.9059371,-116.7618071,,1, 4 | MUSEUM,Beatty Museum,,36.9059371,-116.7618071,,0,PARENT_OF_MUSEUM 5 | PARENT_OF_NEXT_TO_MUSEUM,Next to Beatty Museum,,36.906095,-116.76207,,1, 6 | NEXT_TO_MUSEUM,Next to Beatty Museum,,36.906095,-116.76207,,0,PARENT_OF_NEXT_TO_MUSEUM 7 | AIRPORT,County Airport,,36.868446,-116.784582,,0, 8 | -------------------------------------------------------------------------------- /reader-gtfs/files/another-sample-feed/transfers.txt: -------------------------------------------------------------------------------- 1 | from_stop_id,to_stop_id,from_route_id,to_route_id,transfer_type,min_transfer_time 2 | PARENT_OF_MUSEUM,PARENT_OF_NEXT_TO_MUSEUM,,,2,600 3 | -------------------------------------------------------------------------------- /reader-gtfs/files/another-sample-feed/trips.txt: -------------------------------------------------------------------------------- 1 | route_id,service_id,trip_id,trip_headsign,direction_id,block_id,shape_id 2 | COURT2MUSEUM,FULLW,MUSEUM1,to Museum,0 3 | COURT2MUSEUM,FULLW,MUSEUM2,to Airport,0 4 | MUSEUM2AIRPORT,FULLW,MUSEUMAIRPORT1,to Airport,0 5 | -------------------------------------------------------------------------------- /reader-gtfs/files/config-test.yml: -------------------------------------------------------------------------------- 1 | graphhopper: 2 | datareader.file: reader-gtfs/files/beatty.osm 3 | gtfs.file: reader-gtfs/files/sample-feed.zip,reader-gtfs/files/another-sample-feed.zip 4 | graph.location: graphs/beatty 5 | 6 | profiles: 7 | - name: foot 8 | vehicle: foot 9 | weighting: fastest 10 | - name: car 11 | vehicle: car 12 | weighting: fastest 13 | 14 | server: 15 | application_connectors: 16 | - type: http 17 | port: 8989 18 | # for security reasons bind to localhost 19 | bind_host: localhost 20 | request_log: 21 | appenders: [] 22 | admin_connectors: 23 | - type: http 24 | port: 8990 25 | bind_host: localhost 26 | 27 | logging: 28 | # level: DEBUG 29 | appenders: 30 | # - type: file 31 | # time_zone: UTC 32 | # current_log_filename: logs/graphhopper.log 33 | # log_format: "%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n" 34 | # archive: true 35 | # archived_log_filename_pattern: ./logs/graphhopper-%d.log.gz 36 | # archived_file_count: 30 37 | # never_block: true 38 | - type: console 39 | time_zone: UTC 40 | log_format: "%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n" 41 | -------------------------------------------------------------------------------- /reader-gtfs/files/sample-feed/agency.txt: -------------------------------------------------------------------------------- 1 | agency_id,agency_name,agency_url,agency_timezone 2 | DTA,Demo Transit Authority,http://google.com,America/Los_Angeles -------------------------------------------------------------------------------- /reader-gtfs/files/sample-feed/calendar.txt: -------------------------------------------------------------------------------- 1 | service_id,monday,tuesday,wednesday,thursday,friday,saturday,sunday,start_date,end_date 2 | FULLW,1,1,1,1,1,1,1,20070101,20101231 3 | WE,0,0,0,0,0,1,1,20070101,20101231 4 | WEEK,1,1,1,1,1,0,0,20070101,20101231 5 | SAT,0,0,0,0,0,1,0,20070101,20101231 6 | SUN,0,0,0,0,0,0,1,20070101,20101231 7 | WEEK_SUN,1,1,1,1,1,0,1,20070101,20101231 -------------------------------------------------------------------------------- /reader-gtfs/files/sample-feed/calendar_dates.txt: -------------------------------------------------------------------------------- 1 | service_id,date,exception_type 2 | FULLW,20070604,2 -------------------------------------------------------------------------------- /reader-gtfs/files/sample-feed/fare_attributes.txt: -------------------------------------------------------------------------------- 1 | fare_id,price,currency_type,payment_method,transfers,transfer_duration 2 | p,1.25,USD,0,0, 3 | a,5.25,USD,0,0, -------------------------------------------------------------------------------- /reader-gtfs/files/sample-feed/fare_rules.txt: -------------------------------------------------------------------------------- 1 | fare_id,route_id,origin_id,destination_id,contains_id 2 | p,AB,,, 3 | p,STBA,,, 4 | p,BFC,,, 5 | a,AAMV,,, -------------------------------------------------------------------------------- /reader-gtfs/files/sample-feed/frequencies.txt: -------------------------------------------------------------------------------- 1 | trip_id,start_time,end_time,headway_secs 2 | STBA,6:00:00,22:00:00,1800 3 | CITY1,6:00:00,7:59:59,1800 4 | CITY2,6:00:00,7:59:59,1800 5 | CITY1,8:00:00,9:59:59,600 6 | CITY2,8:00:00,9:59:59,600 7 | CITY1,10:00:00,15:59:59,1800 8 | CITY2,10:00:00,15:59:59,1800 9 | CITY1,16:00:00,18:59:59,600 10 | CITY2,16:00:00,18:59:59,600 11 | CITY1,19:00:00,22:00:00,1800 12 | CITY2,19:00:00,22:00:00,1800 -------------------------------------------------------------------------------- /reader-gtfs/files/sample-feed/routes.txt: -------------------------------------------------------------------------------- 1 | route_id,agency_id,route_short_name,route_long_name,route_desc,route_type,route_url,route_color,route_text_color 2 | AB,DTA,10,Airport - Bullfrog,,2,,, 3 | BFC,DTA,20,Bullfrog - Furnace Creek Resort,,3,,, 4 | STBA,DTA,30,Stagecoach - Airport Shuttle,,3,,, 5 | CITY,DTA,40,City,,3,,, 6 | AAMV,DTA,50,Airport - Amargosa Valley,,3,,, 7 | ABBFC,DTA,10,Airport - Furnace Creek Resort (without change),,3,,, 8 | FUNNY_BLOCK_AB,DTA,Wurst1,Funny Block Trip to Bullfrog,,3,,, 9 | FUNNY_BLOCK_BFC,DTA,Wurst2,Funny Block Trip to Bullfrog,,3,,, 10 | FUNNY_BLOCK_NADAVAMV,DTA,Wurst3,Funny Block Trip to Bullfrog,,3,,, 11 | FUNNY_BLOCK_FCAMV,DTA,Wurst4,Funny Block Trip to Bullfrog,,3,,, 12 | -------------------------------------------------------------------------------- /reader-gtfs/files/sample-feed/shapes.txt: -------------------------------------------------------------------------------- 1 | shape_id,shape_pt_lat,shape_pt_lon,shape_pt_sequence,shape_dist_traveled -------------------------------------------------------------------------------- /reader-gtfs/files/sample-feed/stops.txt: -------------------------------------------------------------------------------- 1 | stop_id,stop_name,stop_desc,stop_lat,stop_lon,zone_id,stop_url,location_type 2 | FUR_CREEK_RES,Furnace Creek Resort (Demo),,36.425288,-117.133162,,, 3 | BEATTY_AIRPORT,Nye County Airport (Demo),,36.868446,-116.784582,,, 4 | BULLFROG,Bullfrog (Demo),,36.88108,-116.81797,,, 5 | STAGECOACH,Stagecoach Hotel & Casino (Demo),,36.915682,-116.751677,,, 6 | NADAV,North Ave / D Ave N (Demo),,36.914893,-116.76821,,, 7 | NANAA,North Ave / N A Ave (Demo),,36.914944,-116.761472,,, 8 | DADAN,Doing Ave / D Ave N (Demo),,36.909489,-116.768242,,, 9 | EMSI,E Main St / S Irving St (Demo),,36.905697,-116.76218,,, 10 | AMV,Amargosa Valley (Demo),,36.641496,-116.40094,,, 11 | HASNOROUTES,A stop with no routes,,36.7,-116.5,,, 12 | BOARDING_AREA,A boarding area (currently unused GTFS feature),,36.8,-117,,,4 -------------------------------------------------------------------------------- /reader-gtfs/files/sample-feed/transfers.txt: -------------------------------------------------------------------------------- 1 | from_stop_id,to_stop_id,from_route_id,to_route_id,transfer_type,min_transfer_time 2 | BEATTY_AIRPORT,BEATTY_AIRPORT,,,2,660 3 | BEATTY_AIRPORT,BEATTY_AIRPORT,,AB,2,0 4 | BEATTY_AIRPORT,BEATTY_AIRPORT,AB,,2,1200 5 | -------------------------------------------------------------------------------- /reader-gtfs/files/sample-feed/trips.txt: -------------------------------------------------------------------------------- 1 | route_id,service_id,trip_id,trip_headsign,direction_id,block_id,shape_id 2 | AB,FULLW,AB1,to Bullfrog,0,1, 3 | AB,FULLW,AB3_NO_BLOCK,to Bullfrog,0,, 4 | AB,FULLW,AB2,to Airport,1,2, 5 | STBA,FULLW,STBA,Shuttle,,, 6 | CITY,FULLW,CITY1,,0,, 7 | CITY,FULLW,CITY2,,1,, 8 | BFC,FULLW,BFC1,to Furnace Creek Resort,0,1, 9 | BFC,FULLW,BFC3_NO_BLOCK,to Furnace Creek Resort,0,, 10 | BFC,FULLW,BFC2,to Bullfrog,1,2, 11 | AAMV,WE,AAMV1,to Amargosa Valley,0,, 12 | AAMV,WE,AAMV2,to Airport,1,, 13 | AAMV,WE,AAMV3,to Amargosa Valley,0,, 14 | AAMV,WE,AAMV4,to Airport,1,, 15 | ABBFC,FULLW,ABBFC1,to Furnace Creek Resort (without route change),0,, 16 | ABBFC,FULLW,ABBFC3,to Furnace Creek Resort (without route change),0,, 17 | FUNNY_BLOCK_AB,WEEK_SUN,FUNNY_BLOCK_AB1,Funny Block Trip to Bullfrog,0,3, 18 | FUNNY_BLOCK_BFC,WEEK,FUNNY_BLOCK_BFC1,Funny Block Trip to Furnace Creek Resort,0,3, 19 | FUNNY_BLOCK_NADAVAMV,SAT,FUNNY_BLOCK_NADAVAMV1,Funny Block Trip to Amargosa Valley on Saturdays,0,3, 20 | FUNNY_BLOCK_FCAMV,FULLW,FUNNY_BLOCK_FCAMV1,Funny Block Trip to Amargosa Valley,0,3, 21 | -------------------------------------------------------------------------------- /reader-gtfs/pt-model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/reader-gtfs/pt-model.png -------------------------------------------------------------------------------- /reader-gtfs/src/main/java/com/graphhopper/gtfs/GHPointLocation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.graphhopper.gtfs; 20 | 21 | import com.graphhopper.util.shapes.GHPoint; 22 | 23 | public class GHPointLocation extends GHLocation { 24 | public final GHPoint ghPoint; 25 | 26 | public GHPointLocation(GHPoint ghPoint) { 27 | this.ghPoint = ghPoint; 28 | } 29 | 30 | @Override 31 | public String toString() { 32 | return ghPoint.toString(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /reader-gtfs/src/main/java/com/graphhopper/gtfs/GHStationLocation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.graphhopper.gtfs; 20 | 21 | public class GHStationLocation extends GHLocation { 22 | public final String stop_id; 23 | 24 | public GHStationLocation(String ghPoint) { 25 | this.stop_id = ghPoint; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /reader-gtfs/src/main/java/com/graphhopper/gtfs/PtRouter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.graphhopper.gtfs; 20 | 21 | import com.graphhopper.GHResponse; 22 | 23 | public interface PtRouter { 24 | GHResponse route(Request request); 25 | } 26 | -------------------------------------------------------------------------------- /reader-gtfs/src/main/java/com/graphhopper/gtfs/fare/FareAssignment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.graphhopper.gtfs.fare; 20 | 21 | import com.conveyal.gtfs.model.Fare; 22 | 23 | class FareAssignment { 24 | 25 | Trip.Segment segment; 26 | Fare fare; 27 | 28 | FareAssignment(Trip.Segment segment) { 29 | this.segment = segment; 30 | } 31 | 32 | Fare getFare() { 33 | return fare; 34 | } 35 | 36 | void setFare(Fare fare) { 37 | this.fare = fare; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /reader-gtfs/src/main/java/com/graphhopper/gtfs/fare/RouteRule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.graphhopper.gtfs.fare; 20 | 21 | final class RouteRule extends SanitizedFareRule { 22 | private final String route_id; 23 | 24 | RouteRule(String route_id) { 25 | this.route_id = route_id; 26 | } 27 | 28 | @Override 29 | boolean appliesTo(Trip.Segment segment) { 30 | return route_id.equals(segment.getRoute()); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /reader-gtfs/src/main/java/com/graphhopper/gtfs/fare/SanitizedFareRule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.graphhopper.gtfs.fare; 20 | 21 | abstract class SanitizedFareRule { 22 | 23 | abstract boolean appliesTo(Trip.Segment segment); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /reader-gtfs/src/main/java/com/graphhopper/gtfs/fare/Ticket.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.graphhopper.gtfs.fare; 20 | 21 | import com.conveyal.gtfs.model.Fare; 22 | 23 | class Ticket { 24 | 25 | public final String feed_id; 26 | private Fare fare; 27 | 28 | Ticket(String feed_id, Fare fare) { 29 | this.feed_id = feed_id; 30 | this.fare = fare; 31 | } 32 | 33 | public Fare getFare() { 34 | return fare; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /tools/src/main/java/com/graphhopper/ui/DebugAlgo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.graphhopper.ui; 19 | 20 | import java.awt.*; 21 | 22 | /** 23 | * @author Peter Karich 24 | */ 25 | public interface DebugAlgo { 26 | void setGraphics2D(Graphics2D g2); 27 | } 28 | -------------------------------------------------------------------------------- /tools/src/main/java/com/graphhopper/ui/MapLayer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.graphhopper.ui; 19 | 20 | import java.awt.*; 21 | import java.io.Serializable; 22 | 23 | /** 24 | * @author Peter Karich 25 | */ 26 | public interface MapLayer extends Serializable { 27 | Rectangle getBounds(); 28 | 29 | void setBounds(Rectangle r); 30 | 31 | void setBuffering(boolean enable); 32 | 33 | void repaint(); 34 | 35 | void paint(Graphics2D g); 36 | } 37 | -------------------------------------------------------------------------------- /tools/src/main/resources/log4j.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /web-api/src/main/java/com/graphhopper/util/Translation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.graphhopper.util; 19 | 20 | import java.util.Locale; 21 | import java.util.Map; 22 | 23 | /** 24 | * @author Peter Karich 25 | */ 26 | public interface Translation { 27 | 28 | String tr(String key, Object... params); 29 | 30 | Map asMap(); 31 | 32 | Locale getLocale(); 33 | 34 | String getLanguage(); 35 | } 36 | -------------------------------------------------------------------------------- /web-api/src/main/java/com/graphhopper/util/exceptions/GHException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.graphhopper.util.exceptions; 19 | 20 | import java.util.Map; 21 | 22 | /** 23 | * Generic GHException that allows to add details to the exception message 24 | * 25 | * @author Robin Boldt 26 | */ 27 | public interface GHException { 28 | public abstract Map getDetails(); 29 | } 30 | -------------------------------------------------------------------------------- /web-api/src/main/java/com/graphhopper/util/exceptions/PointOutOfBoundsException.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.util.exceptions; 2 | 3 | /** 4 | * Refinement of the CannotFindPointException that indicates that a point is placed out of the graphs bounds 5 | * 6 | * @author Robin Boldt 7 | */ 8 | public class PointOutOfBoundsException extends PointNotFoundException { 9 | 10 | private static final long serialVersionUID = 1L; 11 | 12 | public PointOutOfBoundsException(String var1, int pointIndex) { 13 | super(var1, pointIndex); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /web-api/src/test/resources/fixtures/geojson1.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "features": [ 4 | { 5 | "id": "1", 6 | "type": "Feature", 7 | "geometry": { 8 | "type": "Point", 9 | "coordinates": [102.0, 0.5] 10 | }, 11 | "properties": { 12 | "prop0": "value0" 13 | } 14 | }, 15 | { 16 | "id": 2, 17 | "type": "Feature", 18 | "geometry": { 19 | "type": "LineString", 20 | "coordinates": [[102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]] 21 | }, 22 | "properties": { 23 | "prop0": "value1", 24 | "prop1": 2 25 | } 26 | }, 27 | { 28 | "id": 3, 29 | "type": "Feature", 30 | "bbox": [102.0, 0.0, 103.0, 1], 31 | "properties": { 32 | "prop0": "value0", 33 | "prop1": { 34 | "test": "a" 35 | } 36 | } 37 | } 38 | ] 39 | } -------------------------------------------------------------------------------- /web-api/src/test/resources/fixtures/roundabout1.json: -------------------------------------------------------------------------------- 1 | [ { 2 | "exit_number" : 2, 3 | "distance" : 0.0, 4 | "sign" : 6, 5 | "exited" : true, 6 | "turn_angle" : -1.0, 7 | "interval" : [ 0, 3 ], 8 | "text" : "At roundabout, take exit 2 onto streetname", 9 | "time" : 0, 10 | "street_name" : "streetname" 11 | } ] -------------------------------------------------------------------------------- /web-api/src/test/resources/fixtures/roundabout2.json: -------------------------------------------------------------------------------- 1 | [ { 2 | "exit_number" : 2, 3 | "distance" : 0.0, 4 | "sign" : 6, 5 | "exited" : true, 6 | "interval" : [ 0, 3 ], 7 | "text" : "At roundabout, take exit 2 onto streetname", 8 | "time" : 0, 9 | "street_name" : "streetname" 10 | } ] -------------------------------------------------------------------------------- /web-bundle/.jshintignore: -------------------------------------------------------------------------------- 1 | src/main/resources/com/graphhopper/maps/js/lib/*.js 2 | src/main/resources/com/graphhopper/maps/js/main.js 3 | -------------------------------------------------------------------------------- /web-bundle/src/main/java/com/graphhopper/http/GraphHopperBundleConfiguration.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.graphhopper.http; 20 | 21 | import com.graphhopper.GraphHopperConfig; 22 | 23 | public interface GraphHopperBundleConfiguration { 24 | 25 | GraphHopperConfig getGraphHopperConfiguration(); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /web-bundle/src/main/java/com/graphhopper/http/IllegalArgumentExceptionMapper.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.http; 2 | 3 | import com.graphhopper.jackson.MultiException; 4 | import com.graphhopper.util.Helper; 5 | import org.slf4j.Logger; 6 | import org.slf4j.LoggerFactory; 7 | 8 | import javax.ws.rs.core.Response; 9 | import javax.ws.rs.ext.ExceptionMapper; 10 | import javax.ws.rs.ext.Provider; 11 | 12 | @Provider 13 | public class IllegalArgumentExceptionMapper implements ExceptionMapper { 14 | private static final Logger logger = LoggerFactory.getLogger(IllegalArgumentExceptionMapper.class); 15 | 16 | @Override 17 | public Response toResponse(IllegalArgumentException e) { 18 | logger.info("bad request: " + (Helper.isEmpty(e.getMessage()) ? "unknown reason" : e.getMessage())); 19 | return Response.status(Response.Status.BAD_REQUEST) 20 | .entity(new MultiException(e)) 21 | .build(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /web-bundle/src/main/java/com/graphhopper/http/RealtimeBundleConfiguration.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.graphhopper.http; 20 | 21 | public interface RealtimeBundleConfiguration { 22 | 23 | RealtimeConfiguration gtfsrealtime(); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/css/codemirror/addon/hint/show-hint.css: -------------------------------------------------------------------------------- 1 | /* Copied from code mirror 5.59.2, do not edit this file */ 2 | .CodeMirror-hints { 3 | position: absolute; 4 | z-index: 10; 5 | overflow: hidden; 6 | list-style: none; 7 | 8 | margin: 0; 9 | padding: 2px; 10 | 11 | -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 12 | -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2); 13 | box-shadow: 2px 3px 5px rgba(0,0,0,.2); 14 | border-radius: 3px; 15 | border: 1px solid silver; 16 | 17 | background: white; 18 | font-size: 90%; 19 | font-family: monospace; 20 | 21 | max-height: 20em; 22 | overflow-y: auto; 23 | } 24 | 25 | .CodeMirror-hint { 26 | margin: 0; 27 | padding: 0 4px; 28 | border-radius: 2px; 29 | white-space: pre; 30 | color: black; 31 | cursor: pointer; 32 | } 33 | 34 | li.CodeMirror-hint-active { 35 | background: #08f; 36 | color: white; 37 | } 38 | -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/css/images/area-chart.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/css/images/elevation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/css/images/elevation.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/css/images/layers-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/css/images/layers-2x.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/css/images/layers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/css/images/layers.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/css/images/marker-icon-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/css/images/marker-icon-2x.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/css/images/marker-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/css/images/marker-icon.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/css/images/marker-shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/css/images/marker-shadow.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/css/images/remove.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/css/leaflet_numbered_markers.css: -------------------------------------------------------------------------------- 1 | .leaflet-div-icon { 2 | background: transparent; 3 | border: none; 4 | } 5 | 6 | .leaflet-marker-icon .number{ 7 | position: relative; 8 | top: -41px; 9 | font-size: 12px; 10 | width: 25px; 11 | text-align: center; 12 | } -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/css/ui-lightness/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/css/ui-lightness/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/css/ui-lightness/images/ui-icons_228ef1_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/css/ui-lightness/images/ui-icons_228ef1_256x240.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/css/ui-lightness/images/ui-icons_ef8c08_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/css/ui-lightness/images/ui-icons_ef8c08_256x240.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/css/ui-lightness/images/ui-icons_ffd27a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/css/ui-lightness/images/ui-icons_ffd27a_256x240.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/css/ui-lightness/images/ui-icons_ffffff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/css/ui-lightness/images/ui-icons_ffffff_256x240.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/favicon.ico -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/alt_route.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/alt_route.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/bike.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/bike.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/bike2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/bike2.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/bus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/bus.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/car.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/car.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/car4wd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/car4wd.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/continue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/continue.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/delete.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/foot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/foot.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/full-reverse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/full-reverse.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/full.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/gpx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/gpx.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/header.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/hike.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/hike.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/icon.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/indicator-bar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/indicator-bar.gif -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/indicator.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/indicator.gif -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/keep_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/keep_left.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/keep_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/keep_right.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/left.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/link.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/loading.gif -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/marker-from.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/marker-from.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/marker-icon-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/marker-icon-blue.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/marker-icon-green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/marker-icon-green.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/marker-icon-red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/marker-icon-red.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/marker-small-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/marker-small-blue.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/marker-small-green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/marker-small-green.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/marker-small-red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/marker-small-red.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/marker-to.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/marker-to.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/marker_hole.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/marker_hole.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/motorcycle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/motorcycle.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/mtb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/mtb.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/point_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/point_add.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/point_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/point_delete.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/pt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/pt.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/pt_end_trip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/pt_end_trip.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/pt_start_trip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/pt_start_trip.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/pt_transfer_to.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/pt_transfer_to.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/racingbike.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/racingbike.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/right.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/roundabout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/roundabout.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/scooter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/scooter.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/sharp_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/sharp_left.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/sharp_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/sharp_right.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/slight_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/slight_left.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/slight_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/slight_right.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/small_truck.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/small_truck.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/truck.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/truck.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/u_turn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/u_turn.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/u_turn_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/u_turn_left.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/u_turn_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/u_turn_right.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/unknown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/unknown.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/img/wheelchair.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/img/wheelchair.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/js/lib/leaflet_numbered_markers.js: -------------------------------------------------------------------------------- 1 | L.NumberedDivIcon = L.Icon.extend({ 2 | options: { 3 | iconUrl: './img/marker_hole.png', 4 | number: '', 5 | shadowUrl: null, 6 | iconSize: new L.Point(25, 41), 7 | iconAnchor: new L.Point(12, 40), 8 | popupAnchor: new L.Point(0, -33), 9 | shadowSize: new L.Point(50, -64), 10 | shadowAnchor: new L.Point(4, -62), 11 | className: 'leaflet-div-icon' 12 | }, 13 | 14 | createIcon: function () { 15 | var div = document.createElement('div'); 16 | var img = this._createImg(this.options['iconUrl']); 17 | var numdiv = document.createElement('div'); 18 | numdiv.setAttribute ( "class", "number" ); 19 | numdiv.innerHTML = this.options['number'] || ''; 20 | div.appendChild ( img ); 21 | div.appendChild ( numdiv ); 22 | this._setIconStyles(div, 'icon'); 23 | return div; 24 | }, 25 | 26 | //you could change this to add a shadow like in the normal marker if you really wanted 27 | createShadow: function () { 28 | return null; 29 | } 30 | }); -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/js/tools/math.js: -------------------------------------------------------------------------------- 1 | module.exports.getCenter = function (bounds) { 2 | var center = { 3 | lat: 0, 4 | lng: 0 5 | }; 6 | if (bounds.initialized) { 7 | center.lat = (bounds.minLat + bounds.maxLat) / 2; 8 | center.lng = (bounds.minLon + bounds.maxLon) / 2; 9 | } 10 | return center; 11 | }; 12 | 13 | module.exports.floor = function (val, precision) { 14 | if (!precision) 15 | precision = 1e6; 16 | return Math.floor(val * precision) / precision; 17 | }; 18 | 19 | module.exports.round = function (val, precision) { 20 | if (precision === undefined) 21 | precision = 1e6; 22 | return Math.round(val * precision) / precision; 23 | }; 24 | 25 | 26 | -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/map-matching/css/images/layers-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/map-matching/css/images/layers-2x.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/map-matching/css/images/layers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/map-matching/css/images/layers.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/map-matching/css/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/map-matching/css/images/loading.gif -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/map-matching/css/images/marker-icon-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/map-matching/css/images/marker-icon-2x.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/map-matching/css/images/marker-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/map-matching/css/images/marker-icon.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/map-matching/css/images/marker-shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/map-matching/css/images/marker-shadow.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/map-matching/css/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | } 3 | 4 | #main { 5 | margin: auto; 6 | width: 800px; 7 | } 8 | 9 | #map-matching-error { 10 | color: red; 11 | font-weight: bold; 12 | } 13 | 14 | #map-matching-response { 15 | font-weight: bold; 16 | } -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/map-matching/img/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/map-matching/img/header.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/opensearch.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | GraphHopper Maps 4 | GraphHopper Maps gives you the best route for car, bike or by foot. 5 | route map openstreetmap 6 | info@graphhopper.com 7 | http://graphhopper.com/favicon.ico 8 | http://graphhopper.com/img/icon.png 9 | 10 | UTF-8 11 | UTF-8 12 | 13 | -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/pt/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/pt/favicon.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/pt/view/App.css: -------------------------------------------------------------------------------- 1 | html, 2 | body { 3 | height: 100%; 4 | width: 100%; 5 | margin: 0; 6 | padding: 0; 7 | } 8 | 9 | #root { 10 | height: 100%; 11 | } 12 | 13 | .appWrapper { 14 | display: flex; 15 | flex-direction: row; 16 | align-content: stretch; 17 | height: 100%; 18 | } 19 | 20 | .sidebar { 21 | height: 100%; 22 | flex: 1; 23 | max-width: 30rem; 24 | box-shadow: 0 0 20px rgba(0, 0, 0, 0.3); 25 | z-index: 500; 26 | } 27 | 28 | .map { 29 | height: 100%; 30 | flex: 2; 31 | } 32 | -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/pt/view/components/Inputs.css: -------------------------------------------------------------------------------- 1 | .input { 2 | min-height: 1.5rem; 3 | padding: 0.2rem 0.4rem; 4 | margin-top: 0.16rem; 5 | border: 1px solid black; 6 | border-radius: 2px; 7 | } 8 | 9 | .select { 10 | min-height: 2rem; 11 | padding: 0.2rem 0.4rem; 12 | margin-top: 0.16rem; 13 | border: 1px solid black; 14 | border-radius: 2px; 15 | } 16 | 17 | .inputContainer { 18 | display: flex; 19 | flex-direction: column; 20 | font-size: 0.75rem; 21 | margin-bottom: 0.5rem; 22 | } 23 | -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/pt/view/components/SecondaryText.css: -------------------------------------------------------------------------------- 1 | .secondaryText { 2 | color: rgb(94, 94, 94); 3 | font-size: 0.8rem; 4 | } 5 | -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/pt/view/components/SecondaryText.js: -------------------------------------------------------------------------------- 1 | export default function ({ 2 | children 3 | }) { 4 | return React.createElement("span", { 5 | className: "secondaryText" 6 | }, children); 7 | } -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/pt/view/img/arrow.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | Layer 1 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/pt/view/img/bus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/pt/view/img/bus.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/pt/view/img/foot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/pt/view/img/foot.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/pt/view/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/pt/view/img/logo.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/pt/view/map/Map.css: -------------------------------------------------------------------------------- 1 | .fill { 2 | height: 100%; 3 | width: 100%; 4 | } 5 | -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/pt/view/map/circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/graphhopper/e5b27a03d41d400d19fb45e987275e05715f8ba6/web-bundle/src/main/resources/com/graphhopper/maps/pt/view/map/circle.png -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/pt/view/sidebar/Leg.css: -------------------------------------------------------------------------------- 1 | .legDescriptionDetails { 2 | display: flex; 3 | flex-direction: row; 4 | } 5 | 6 | .carrotContainer { 7 | height: 1rem; 8 | width: 1rem; 9 | margin-left: 0.5rem; 10 | stroke: currentColor; 11 | } 12 | 13 | .carrotContainerFlipped { 14 | height: 1rem; 15 | width: 1rem; 16 | margin-left: 0.5rem; 17 | stroke: currentColor; 18 | } 19 | 20 | .carrotContainer > svg { 21 | transition: 0.3s ease; 22 | } 23 | 24 | .carrotContainerFlipped > svg { 25 | transition: 0.3s ease; 26 | transform: rotateX(180deg); 27 | } 28 | -------------------------------------------------------------------------------- /web-bundle/src/main/resources/com/graphhopper/maps/pt/view/sidebar/SearchInput.css: -------------------------------------------------------------------------------- 1 | .searchInput { 2 | display: flex; 3 | flex-direction: column; 4 | padding: 1rem; 5 | } 6 | 7 | .locationInput { 8 | display: flex; 9 | flex-direction: column; 10 | } 11 | 12 | .timeSelect { 13 | display: flex; 14 | flex-direction: row; 15 | align-items: flex-end; 16 | justify-content: space-between; 17 | } 18 | 19 | .dateTimeContainer { 20 | display: flex; 21 | flex-direction: row; 22 | } 23 | 24 | .dateTimeContainer > * { 25 | margin-left: 0.5rem; 26 | } 27 | 28 | .optionsButton { 29 | border: 1px solid black; 30 | border-radius: 2px; 31 | background-color: transparent; 32 | min-height: 2rem; 33 | margin: 0.9rem 0 0.5rem 0; 34 | transition-duration: 0.2s; 35 | cursor: pointer; 36 | } 37 | 38 | .optionsButton:hover { 39 | background-color: #98cbed; 40 | } 41 | 42 | .optionsButton:active { 43 | background-color: #98cbed; 44 | } 45 | -------------------------------------------------------------------------------- /web-bundle/src/test/resources/com/graphhopper/jackson/config.yml: -------------------------------------------------------------------------------- 1 | datareader.file: map-matching/files/leipzig_germany.osm.pbf 2 | graph.location: graphs/leipzig-regular/graph 3 | graph.flag_encoders: car 4 | profiles: 5 | - name: car 6 | vehicle: car 7 | weighting: fastest 8 | 9 | index.max_region_search: 100 10 | index: 11 | pups: 200 -------------------------------------------------------------------------------- /web-bundle/src/test/resources/com/graphhopper/maps/spec/config/TileLayersSpec.js: -------------------------------------------------------------------------------- 1 | describe('TileLayers', function() { 2 | var oldL; 3 | 4 | beforeEach(function () { 5 | oldL = global.L; 6 | global.L = { 7 | tileLayer: function () { 8 | return 'a tile layer'; 9 | }, 10 | Browser: { 11 | retina: false 12 | } 13 | }; 14 | global.L.tileLayer.wms = function () { 15 | return 'a tile layer'; 16 | }; 17 | }); 18 | 19 | it('gets the correct layer', function () { 20 | var tileLayers = requireFile('./config/tileLayers.js'); 21 | 22 | var layer = tileLayers.selectLayer('bla'); 23 | 24 | expect(layer).toBe('a tile layer'); 25 | }); 26 | 27 | afterEach(function () { 28 | global.L = oldL; 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /web-bundle/src/test/resources/com/graphhopper/maps/spec/graphhopper/ToolsSpec.js: -------------------------------------------------------------------------------- 1 | var graphhopperTools = requireFile('./graphhopper/tools.js'); 2 | 3 | describe('graphhopper tools', function () { 4 | it("should decode the polyline", function () { 5 | var list = graphhopperTools.decodePath("_p~iF~ps|U", false); 6 | expect(list).toEqual([[-120.2, 38.5]]); 7 | 8 | list = graphhopperTools.decodePath("_p~iF~ps|U_ulLnnqC_mqNvxq`@", false); 9 | expect(list).toEqual([[-120.2, 38.5], [-120.95, 40.7], [-126.45300000000002, 43.252]]); 10 | }); 11 | 12 | it("should decode the 3D polyline", function () { 13 | var list = graphhopperTools.decodePath("_p~iF~ps|Uo}@", true); 14 | expect(list).toEqual([[-120.2, 38.5, 10]]); 15 | 16 | list = graphhopperTools.decodePath("_p~iF~ps|Uo}@_ulLnnqC_anF_mqNvxq`@?", true); 17 | expect(list).toEqual([[-120.2, 38.5, 10], [-120.95, 40.7, 1234], [-126.45300000000002, 43.252, 1234]]); 18 | }); 19 | }); 20 | 21 | -------------------------------------------------------------------------------- /web-bundle/src/test/resources/com/graphhopper/maps/spec/helpers/requireFile.js: -------------------------------------------------------------------------------- 1 | global.requireFile = function (name) { 2 | return require('../../../../../../../main/resources/com/graphhopper/maps/js/' + name); 3 | }; 4 | -------------------------------------------------------------------------------- /web-bundle/src/test/resources/com/graphhopper/maps/spec/jasmine.json: -------------------------------------------------------------------------------- 1 | { 2 | "spec_dir": "src/test/resources/com/graphhopper/maps/spec", 3 | "spec_files": [ 4 | "**/*[sS]pec.js" 5 | ], 6 | "helpers": [ 7 | "helpers/**/*.js" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /web-bundle/src/test/resources/com/graphhopper/maps/spec/tools/formatSpec.js: -------------------------------------------------------------------------------- 1 | var formatTools = requireFile('./tools/format.js'); 2 | 3 | describe('formatTools', function () { 4 | it("should format location entry correctly", function () { 5 | var res = formatTools.formatLocationEntry({ 6 | "state": "Berlin", 7 | "country": "Deutschland", 8 | "country_code": "de", 9 | "continent": "Europäischen Union" 10 | }); 11 | expect(res).toEqual({country: "Deutschland", more: "Berlin, Europäischen Union"}); 12 | 13 | res = formatTools.formatLocationEntry({ 14 | "suburb": "Neukölln", 15 | "city_district": "Neukölln", 16 | "hamlet": "Rixdorf", 17 | "state": "Berlin", 18 | "country": "Deutschland", 19 | "country_code": "de", 20 | "continent": "Europäischen Union" 21 | }); 22 | expect(res).toEqual({city: "Rixdorf, Neukölln", country: "Deutschland", more: "Berlin, Europäischen Union"}); 23 | }); 24 | }); 25 | -------------------------------------------------------------------------------- /web/nb-configuration.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 16 | all 17 | 18 | 19 | -------------------------------------------------------------------------------- /web/src/main/java/com/graphhopper/http/resources/RootResource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to GraphHopper GmbH under one or more contributor 3 | * license agreements. See the NOTICE file distributed with this work for 4 | * additional information regarding copyright ownership. 5 | * 6 | * GraphHopper GmbH licenses this file to you under the Apache License, 7 | * Version 2.0 (the "License"); you may not use this file except in 8 | * compliance with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | 19 | package com.graphhopper.http.resources; 20 | 21 | import javax.ws.rs.GET; 22 | import javax.ws.rs.Path; 23 | import javax.ws.rs.core.Response; 24 | import javax.ws.rs.core.UriBuilder; 25 | 26 | @Path("/") 27 | public class RootResource { 28 | 29 | @GET 30 | public Response redirectToWebapp() { 31 | return Response.seeOther(UriBuilder.fromPath("maps/").build()).build(); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /web/src/main/resources/banner.txt: -------------------------------------------------------------------------------- 1 | _ _ 2 | __ _ _ __ __ _ _ __ | |__ | |__ ___ _ __ _ __ ___ _ __ 3 | / _` | '__/ _` | '_ \| '_ \| '_ \ / _ \| '_ \| '_ \ / _ \ '__| 4 | | (_| | | | (_| | |_) | | | | | | | (_) | |_) | |_) | __/ | 5 | \__, |_| \__,_| .__/|_| |_|_| |_|\___/| .__/| .__/ \___|_| 6 | |___/ |_| |_| |_| 7 | -------------------------------------------------------------------------------- /web/src/test/resources/com/graphhopper/http/resources/cargo_bike.yml: -------------------------------------------------------------------------------- 1 | # For a custom request you need to specify a profile (with weighting=custom) but on import we don't need this 2 | # profile: bike 3 | 4 | # let's assume cargo bikes are e-bikes and we should lower speed to prefer shorter and not faster routes automatically 5 | speed: 6 | - if: road_class == PRIMARY 7 | limit_to: 28 8 | - else: 9 | limit_to: 25 10 | 11 | priority: 12 | # exclude steps 13 | - if: road_class == STEPS 14 | multiply_by: 0 15 | - if: surface == SAND 16 | multiply_by: 0.5 17 | # prefer better tracks 18 | - if: track_type != MISSING && track_type != GRADE1 19 | multiply_by: 0.9 20 | # prefer official bike routes 21 | - if: bike_network == OTHER 22 | multiply_by: 0.5 23 | # avoid all situations where we have to get off the bike 24 | - if: get_off_bike 25 | multiply_by: 0.5 26 | - if: max_height < 2.3 27 | multiply_by: 0 28 | # oneliner 29 | - { if: "max_width < 1.2", multiply_by: 0 } 30 | -------------------------------------------------------------------------------- /web/src/test/resources/com/graphhopper/http/resources/json_bike.json: -------------------------------------------------------------------------------- 1 | { 2 | "speed": [ 3 | { "if": "road_class==PRIMARY", "limit_to": 28 } 4 | ], 5 | "priority": [ 6 | { "if": "max_width < 1.2", "multiply_by": 0 } 7 | ] 8 | } -------------------------------------------------------------------------------- /web/src/test/resources/issue-127.gpx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /web/src/test/resources/no_trk.gpx: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /web/src/test/resources/no_trkpt.gpx: -------------------------------------------------------------------------------- 1 | 2 | 3 | GraphHopper 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /web/src/test/resources/no_trkseg.gpx: -------------------------------------------------------------------------------- 1 | 2 | 3 | GraphHopper 4 | 5 | -------------------------------------------------------------------------------- /web/src/test/resources/test2.gpx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | GraphHopper GPX 6 | 7 | 8 | 9 | 10 | 11 | continue onto Fučikstraße 12 | 13 | 101.0 14 | 14545 15 | SE 16 | 126 17 | 18 | 19 | 20 | 21 | GraphHopper 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /web/src/test/resources/test2_no_millis.gpx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | GraphHopper GPX 6 | 7 | 8 | 9 | 10 | 11 | continue onto Fučikstraße 12 | 13 | 101.0 14 | 14545 15 | SE 16 | 126 17 | 18 | 19 | 20 | 21 | GraphHopper 22 | 23 | 24 | 25 | 26 | 27 | 28 | --------------------------------------------------------------------------------