public static GeometryType fromWKT(String wkt) {
    var matcher = TYPE_PATTERN.matcher(wkt);
    if (matcher.find()) {
      String group = matcher.group(2);
      if (group != null) {
        return switch (group.toLowerCase(Locale.ROOT)) {
          case "point" -> GeometryType.POINT;
          case "line" -> GeometryType.LINE;
          case "polygon" -> GeometryType.POLYGON;
          default -> GeometryType.UNKNOWN;
        };
      }
    }
    return GeometryType.UNKNOWN;
  }
Returns the type of a WKT-encoded geometry without needing to deserialize the whole thing.
planetiler-core/src/main/java/com/onthegomap/planetiler/geo/GeometryType.java