@Override
  public void processFeature(SourceFeature sourceFeature, FeatureCollector features) {
    // ignore nodes and ways that should only be treated as polygons
    if (sourceFeature.canBeLine()) {
      // get all the RouteRelationInfo instances we returned from preprocessOsmRelation that
      // this way belongs to
      for (var routeInfo : sourceFeature.relationInfo(RouteRelationInfo.class)) {
        // (routeInfo.role() also has the "role" of this relation member if needed)
        RouteRelationInfo relation = routeInfo.relation();
        // Break the output into layers named: "{bicycle,route}-route-{international,national,regional,local,other}"
        String layerName = relation.route + "-route-" + relation.network;
        features.line(layerName)
          .setAttr("name", relation.name)
          .setAttr("ref", relation.ref)
          .setZoomRange(0, 14)
          // don't filter out short line segments even at low zooms because the next step needs them
          // to merge lines with the same tags where the endpoints are touching
          .setMinPixelSize(0);
      }
    }
  }
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