Tabnine Logo
GraphHopperOSM.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
com.graphhopper.reader.osm.GraphHopperOSM
constructor

Best Java code snippets using com.graphhopper.reader.osm.GraphHopperOSM.<init> (Showing top 6 results out of 315)

origin: graphhopper/graphhopper

public GraphHopperManaged(CmdArgs configuration, ObjectMapper objectMapper) {
  String splitAreaLocation = configuration.get(Parameters.Landmark.PREPARE + "split_area_location", "");
  JsonFeatureCollection landmarkSplittingFeatureCollection;
  try (Reader reader = splitAreaLocation.isEmpty() ? new InputStreamReader(LandmarkStorage.class.getResource("map.geo.json").openStream(), UTF_CS) : new InputStreamReader(new FileInputStream(splitAreaLocation), UTF_CS)) {
    landmarkSplittingFeatureCollection = objectMapper.readValue(reader, JsonFeatureCollection.class);
  } catch (IOException e1) {
    logger.error("Problem while reading border map GeoJSON. Skipping this.", e1);
    landmarkSplittingFeatureCollection = null;
  }
  graphHopper = new GraphHopperOSM(landmarkSplittingFeatureCollection).forServer();
  String spatialRuleLocation = configuration.get("spatial_rules.location", "");
  if (!spatialRuleLocation.isEmpty()) {
    final BBox maxBounds = BBox.parseBBoxString(configuration.get("spatial_rules.max_bbox", "-180, 180, -90, 90"));
    try (final InputStreamReader reader = new InputStreamReader(new FileInputStream(spatialRuleLocation), UTF_CS)) {
      JsonFeatureCollection jsonFeatureCollection = objectMapper.readValue(reader, JsonFeatureCollection.class);
      SpatialRuleLookupHelper.buildAndInjectSpatialRuleIntoGH(graphHopper, maxBounds, jsonFeatureCollection);
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
  }
  graphHopper.init(configuration);
}
origin: graphhopper/graphhopper

public static void main(String[] strs) throws Exception {
  CmdArgs args = CmdArgs.read(strs);
  GraphHopper hopper = new GraphHopperOSM().init(args).importOrLoad();
  boolean debug = args.getBool("minigraphui.debug", false);
  new MiniGraphUI(hopper, debug).visualize();
}
origin: cpesch/RouteConverter

hopper = new GraphHopperOSM().
    setOSMFile(file.getAbsolutePath()).
    forDesktop().
origin: graphhopper/map-matching

count = args.getInt("count");
GraphHopper graphHopper = new GraphHopperOSM();
graphHopper.init(graphHopperConfiguration).forDesktop();
graphHopper.getCHFactoryDecorator().setEnabled(false);
origin: graphhopper/map-matching

CmdArgs graphHopperConfiguration = new CmdArgs();
graphHopperConfiguration.put("graph.location", "graph-cache");
GraphHopper hopper = new GraphHopperOSM().init(graphHopperConfiguration);
hopper.getCHFactoryDecorator().setEnabled(false);
System.out.println("loading graph from cache");
origin: graphhopper/map-matching

@Override
public void run(Bootstrap<?> bootstrap, Namespace args) {
  CmdArgs graphHopperConfiguration = new CmdArgs();
  graphHopperConfiguration.put("graph.flag_encoders", args.getString("vehicle"));
  graphHopperConfiguration.put("datareader.file", args.getString("datasource"));
  graphHopperConfiguration.put("graph.location", "graph-cache");
  GraphHopper hopper = new GraphHopperOSM().init(graphHopperConfiguration);
  hopper.getCHFactoryDecorator().setEnabled(false);
  hopper.importOrLoad();
}
com.graphhopper.reader.osmGraphHopperOSM<init>

Popular methods of GraphHopperOSM

  • getDataReaderFile
  • init
  • initDataReader
  • forDesktop
  • forServer
  • getLMFactoryDecorator
  • getOSMFile
  • importData
  • loadOrPrepareLM
  • prepareCH
  • setOSMFile
    This file can be an osm xml (.osm), a compressed xml (.osm.zip or .osm.gz) or a protobuf file (.pbf)
  • setOSMFile

Popular in Java

  • Making http requests using okhttp
  • scheduleAtFixedRate (ScheduledExecutorService)
  • setContentView (Activity)
  • setRequestProperty (URLConnection)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • JTable (javax.swing)
  • Table (org.hibernate.mapping)
    A relational table
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now