docs: public GraphHopper init(CmdArgs args) {
          args.merge(CmdArgs.readFromSystemProperties());
          if (args.has("osmreader.osm"))
              throw new IllegalArgumentException("Instead osmreader.osm use datareader.file, for other changes see core/files/changelog.txt");
  
          String tmpOsmFile = args.get("datareader.file", "");
          if (!isEmpty(tmpOsmFile))
              dataReaderFile = tmpOsmFile;
  
          String graphHopperFolder = args.get("graph.location", "");
          if (isEmpty(graphHopperFolder) && isEmpty(ghLocation)) {
              if (isEmpty(dataReaderFile))
                  throw new IllegalArgumentException("If no graph.location is provided you need to specify an OSM file.");
  
              graphHopperFolder = pruneFileEnd(dataReaderFile) + "-gh";
          }
  
          // graph
          setGraphHopperLocation(graphHopperFolder);
          defaultSegmentSize = args.getInt("graph.dataaccess.segment_size", defaultSegmentSize);
  
          String graphDATypeStr = args.get("graph.dataaccess", "RAM_STORE");
          dataAccessType = DAType.fromString(graphDATypeStr);
  
          sortGraph = args.getBool("graph.do_sort", sortGraph);
          removeZipped = args.getBool("graph.remove_zipped", removeZipped);
          int bytesForFlags = args.getInt("graph.bytes_for_flags", 4);
          String flagEncodersStr = args.get("graph.flag_encoders", "");
          if (!flagEncodersStr.isEmpty()) {
              EncodingManager.Builder emBuilder = EncodingManager.createBuilder(flagEncoderFactory, flagEncodersStr, bytesForFlags);
              emBuilder.setEnableInstructions(args.getBool("datareader.instructions", true));
              emBuilder.setPreferredLanguage(args.get("datareader.preferred_language", ""));
              setEncodingManager(emBuilder.build());
          }
  
          if (args.get("graph.locktype", "native").equals("simple"))
              lockFactory = new SimpleFSLockFactory();
          else
              lockFactory = new NativeFSLockFactory();
  
          // elevation
          String eleProviderStr = toLowerCase(args.get("graph.elevation.provider", "noop"));
          this.smoothElevation = args.getBool("graph.elevation.smoothing", false);
  
          // keep fallback until 0.8
          boolean eleCalcMean = args.has("graph.elevation.calcmean")
                  ? args.getBool("graph.elevation.calcmean", false)
                  : args.getBool("graph.elevation.calc_mean", false);
  
          String cacheDirStr = args.get("graph.elevation.cache_dir", "");
          if (cacheDirStr.isEmpty())
              cacheDirStr = args.get("graph.elevation.cachedir", "");
  
          String baseURL = args.get("graph.elevation.base_url", "");
          if (baseURL.isEmpty())
              args.get("graph.elevation.baseurl", "");
  
          boolean removeTempElevationFiles = args.getBool("graph.elevation.cgiar.clear", true);
          removeTempElevationFiles = args.getBool("graph.elevation.clear", removeTempElevationFiles);
  
          DAType elevationDAType = DAType.fromString(args.get("graph.elevation.dataaccess", "MMAP"));
          ElevationProvider tmpProvider = ElevationProvider.NOOP;
          if (eleProviderStr.equalsIgnoreCase("srtm")) {
              tmpProvider = new SRTMProvider(cacheDirStr);
          } else if (eleProviderStr.equalsIgnoreCase("cgiar")) {
              tmpProvider = new CGIARProvider(cacheDirStr);
          } else if (eleProviderStr.equalsIgnoreCase("gmted")) {
              tmpProvider = new GMTEDProvider(cacheDirStr);
          } else if (eleProviderStr.equalsIgnoreCase("srtmgl1")) {
              tmpProvider = new SRTMGL1Provider(cacheDirStr);
          } else if (eleProviderStr.equalsIgnoreCase("multi")) {
              tmpProvider = new MultiSourceElevationProvider(cacheDirStr);
          }
  
          tmpProvider.setAutoRemoveTemporaryFiles(removeTempElevationFiles);
          tmpProvider.setCalcMean(eleCalcMean);
          if (!baseURL.isEmpty())
              tmpProvider.setBaseURL(baseURL);
          tmpProvider.setDAType(elevationDAType);
          setElevationProvider(tmpProvider);
  
          // optimizable prepare
          minNetworkSize = args.getInt("prepare.min_network_size", minNetworkSize);
          minOneWayNetworkSize = args.getInt("prepare.min_one_way_network_size", minOneWayNetworkSize);
  
          // prepare CH, LM, ...
          for (RoutingAlgorithmFactoryDecorator decorator : algoDecorators) {
              decorator.init(args);
          }
  
          // osm import
          dataReaderWayPointMaxDistance = args.getDouble(Routing.INIT_WAY_POINT_MAX_DISTANCE, dataReaderWayPointMaxDistance);
  
          dataReaderWorkerThreads = args.getInt("datareader.worker_threads", dataReaderWorkerThreads);
  
          // index
          preciseIndexResolution = args.getInt("index.high_resolution", preciseIndexResolution);
          maxRegionSearch = args.getInt("index.max_region_search", maxRegionSearch);
  
          // routing
          maxVisitedNodes = args.getInt(Routing.INIT_MAX_VISITED_NODES, Integer.MAX_VALUE);
          maxRoundTripRetries = args.getInt(RoundTrip.INIT_MAX_RETRIES, maxRoundTripRetries);
          nonChMaxWaypointDistance = args.getInt(Parameters.NON_CH.MAX_NON_CH_POINT_DISTANCE, Integer.MAX_VALUE);
  
          return this;
      }