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 ; } }
Get the geometry type from a featurecollection .