@Override
  public List<OsmRelationInfo> preprocessOsmRelation(OsmElement.Relation relation) {
    // If this is a "route" relation ...
    if (relation.hasTag("type", "route")) {
      // where route=bicycle or route=mtb ...
      if (relation.hasTag("route", "mtb", "bicycle")) {
        // then store a RouteRelationInfo instance with tags we'll need later
        return List.of(new RouteRelationInfo(
          relation.id(),
          relation.getString("name"),
          relation.getString("ref"),
          relation.getString("route"),
          // except map network abbreviation to a human-readable value
          switch (relation.getString("network", "")) {
            case "icn" -> "international";
            case "ncn" -> "national";
            case "rcn" -> "regional";
            case "lcn" -> "local";
            default -> "other";
          }
        ));
      }
    }
    // for any other relation, return null to ignore
    return null;
  }
Builds a map of bike routes from ways contained in OpenStreetMap relations tagged with
<a href="https://wiki.openstreetmap.org/wiki/Tag:route=bicycle">route=bicycle</a>.
<p>
To run this example:
<ol>
<li>Download a .osm.pbf extract (see <a href="https://download.geofabrik.de/">Geofabrik download site</a>)</li>
<li>then build the examples: {@code mvn clean package}</li>
<li>then run this example:
{@code java -cp target/*-with-deps.jar com.onthegomap.planetiler.examples.BikeRouteOverlay osm_path="path/to/data.osm.pbf" mbtiles="data/output.mbtiles"}</li>
<li>then run the demo tileserver: {@code tileserver-gl-light data/bikeroutes.mbtiles}</li>
<li>and view the output at <a href="http://localhost:8080">localhost:8080</a></li>
</ol>
planetiler-examples/src/main/java/com/onthegomap/planetiler/examples/BikeRouteOverlay.java