code: public static GEOMTYPE getGeometryType( SimpleFeatureCollection featureCollection ) {
          GeometryDescriptor geometryDescriptor = featureCollection.getSchema().getGeometryDescriptor();
          if (EGeometryType.isPolygon(geometryDescriptor)) {
              return GEOMTYPE.POLYGON;
          } else if (EGeometryType.isLine(geometryDescriptor)) {
              return GEOMTYPE.LINE;
          } else if (EGeometryType.isPoint(geometryDescriptor)) {
              return GEOMTYPE.POINT;
          } else {
              return GEOMTYPE.UNKNOWN;
          }
      }
docs: Get the geometry type from a featurecollection.
  
  @param featureCollection
  the collection.
  @return the {@link GEOMTYPE}.