docs: @SuppressWarnings("unchecked")
      public OsmDroidMapShape toShape(Geometry geometry) {
  
          OsmDroidMapShape shape = null;
  
          GeometryType geometryType = geometry.getGeometryType();
          switch (geometryType) {
              case POINT:
                  shape = new OsmDroidMapShape(geometryType,
                      OsmMapShapeType.LAT_LNG, toLatLng((Point) geometry));
                  break;
              case LINESTRING:
                  shape = new OsmDroidMapShape(geometryType,
                      OsmMapShapeType.POLYLINE_OPTIONS,
                      toPolyline((LineString) geometry));
                  break;
              case POLYGON:
                  shape = new OsmDroidMapShape(geometryType,
                      OsmMapShapeType.POLYGON_OPTIONS,
                      toPolygon((Polygon) geometry));
                  break;
              case MULTIPOINT:
                  shape = new OsmDroidMapShape(geometryType,
                      OsmMapShapeType.MULTI_LAT_LNG,
                      toLatLngs((MultiPoint) geometry));
                  break;
              case MULTILINESTRING:
                  shape = new OsmDroidMapShape(geometryType,
                      OsmMapShapeType.MULTI_POLYLINE_OPTIONS,
                      toPolylines((MultiLineString) geometry));
                  break;
              case MULTIPOLYGON:
                  shape = new OsmDroidMapShape(geometryType,
                      OsmMapShapeType.MULTI_POLYGON_OPTIONS,
                      toPolygons((MultiPolygon) geometry));
                  break;
              case CIRCULARSTRING:
                  shape = new OsmDroidMapShape(geometryType,
                      OsmMapShapeType.POLYLINE_OPTIONS,
                      toPolyline((CircularString) geometry));
                  break;
              case COMPOUNDCURVE:
                  shape = new OsmDroidMapShape(geometryType,
                      OsmMapShapeType.MULTI_POLYLINE_OPTIONS,
                      toPolylines((CompoundCurve) geometry));
                  break;
              case CURVEPOLYGON:
                  shape = new OsmDroidMapShape(geometryType,
                      OsmMapShapeType.POLYGON_OPTIONS,
                      toCurvePolygon((CurvePolygon) geometry));
                  break;
              case POLYHEDRALSURFACE:
                  shape = new OsmDroidMapShape(geometryType,
                      OsmMapShapeType.MULTI_POLYGON_OPTIONS,
                      toPolygons((PolyhedralSurface) geometry));
                  break;
              case TIN:
                  shape = new OsmDroidMapShape(geometryType,
                      OsmMapShapeType.MULTI_POLYGON_OPTIONS,
                      toPolygons((TIN) geometry));
                  break;
              case TRIANGLE:
                  shape = new OsmDroidMapShape(geometryType,
                      OsmMapShapeType.POLYGON_OPTIONS,
                      toPolygon((Triangle) geometry));
                  break;
              case GEOMETRYCOLLECTION:
                  shape = new OsmDroidMapShape(geometryType,
                      OsmMapShapeType.COLLECTION,
                      toShapes((GeometryCollection<Geometry>) geometry));
                  break;
              default:
                  throw new GeoPackageException("Unsupported Geometry Type: "
                      + geometryType.getName());
          }
  
          return shape;
      }