code: public static short computeBitmask(final Geometry geometry, final TileCoordinate tile, final int enlargementInMeter) {
          List<TileCoordinate> subtiles = tile
                  .translateToZoomLevel((byte) (tile.getZoomlevel() + SUBTILE_ZOOMLEVEL_DIFFERENCE));
  
          short bitmask = 0;
          int tileCounter = 0;
          for (TileCoordinate subtile : subtiles) {
              Geometry bbox = tileToJTSGeometry(subtile.getX(), subtile.getY(), subtile.getZoomlevel(),
                      enlargementInMeter);
              if (bbox.intersects(geometry)) {
                  bitmask |= TILE_BITMASK_VALUES[tileCounter];
              }
              tileCounter++;
          }
          return bitmask;
      }
docs: A tile on zoom level <i>z</i> has exactly 16 sub tiles on zoom level <i>z+2</i>. For each of these 16 sub tiles
  it is analyzed if the given way needs to be included. The result is represented as a 16 bit short value. Each bit
  represents one of the 16 sub tiles. A bit is set to 1 if the sub tile needs to include the way. Representation is
  row-wise.
  
  @param geometry           the geometry which is analyzed
  @param tile               the tile which is split into 16 sub tiles
  @param enlargementInMeter amount of pixels that is used to enlarge the bounding box of the way and the tiles in the mapping
  process
  @return a 16 bit short value that represents the information which of the sub tiles needs to include the way