public static void main(String... args) throws Exception {
    Arguments arguments = Arguments.fromEnvOrArgs(args);
    var dataDir = Path.of("data");
    var sourcesDir = dataDir.resolve("sources");

    var schemaFile = arguments.getString(
      "schema",
      "Location of YML-format schema definition file"
    );

    var path = Path.of(schemaFile);
    SchemaConfig schema;
    if (Files.exists(path)) {
      schema = SchemaConfig.load(path);
    } else {
      // if the file doesn't exist, check if it's bundled in the jar
      schemaFile = schemaFile.startsWith("/samples/") ? schemaFile : "/samples/" + schemaFile;
      if (ConfiguredMapMain.class.getResource(schemaFile) != null) {
        schema = YAML.loadResource(schemaFile, SchemaConfig.class);
      } else {
        throw new IllegalArgumentException("Schema file not found: " + schemaFile);
      }
    }

    // use default argument values from config file as fallback if not set from command-line or env vars
    Contexts.Root rootContext = Contexts.buildRootContext(arguments, schema.args());

    var planetiler = Planetiler.create(rootContext.arguments());
    var profile = new ConfiguredProfile(schema, rootContext);
    planetiler.setProfile(profile);

    for (var source : profile.sources()) {
      configureSource(planetiler, sourcesDir, source);
    }

    planetiler.overwriteOutput(Path.of("data", "output.mbtiles")).run();
  }
Main driver to create maps configured by a YAML file.
<p>
Parses the config file into a {@link ConfiguredProfile}, loads sources into {@link Planetiler} runner and kicks off
the map generation process.
planetiler-custommap/src/main/java/com/onthegomap/planetiler/custommap/ConfiguredMapMain.java