code: public static JtsGeomStats getStats(List<Geometry> flatGeomList) {
          final JtsGeomStats stats = new JtsGeomStats();
  
          for(Geometry nextGeom : flatGeomList) {
              final VectorTile.Tile.GeomType geomType = JtsAdapter.toGeomType(nextGeom);
  
              // Count features by type
              Integer value = stats.featureCounts.get(geomType);
              value = value == null ? 1 : value + 1;
              stats.featureCounts.put(geomType, value);
  
              // Get stats per feature
              stats.featureStats.add(getStats(nextGeom, geomType));
          }
  
          return stats;
      }
docs: Get feature counts and feature statistics (points and repeated points).
  
  @param flatGeomList geometry under analysis
  @return the resulting statistics