org.h2gis.functions.spatial.edit

## Class ST_CollectionExtract

- java.lang.Object
- - org.h2gis.api.AbstractFunction
  - - org.h2gis.api.DeterministicScalarFunction
    - - org.h2gis.functions.spatial.edit.ST_CollectionExtract

All Implemented Interfaces:
  org.h2gis.api.Function, org.h2gis.api.ScalarFunction

    public class ST_CollectionExtract
    extends org.h2gis.api.DeterministicScalarFunction

Author:
  Erwan Bocher

### Field Summary

### Fields inherited from interface org.h2gis.api.ScalarFunction

`PROP_DETERMINISTIC, PROP_NOBUFFER`

### Fields inherited from interface org.h2gis.api.Function

`PROP_NAME, PROP_REMARKS`

### Constructor Summary

Constructors
Constructor and Description
`ST_CollectionExtract()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static org.locationtech.jts.geom.Geometry` `collectionExtract(org.locationtech.jts.geom.Geometry geometry, int dimension)` Given a (multi)geometry, returns a (multi)geometry consisting only of elements of the specified type.
`String` `getJavaStaticMethod()`

### Methods inherited from class org.h2gis.api.AbstractFunction

`addProperty, getProperty, removeProperty`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.h2gis.api.Function

`getProperty`

### Constructor Detail

#### ST_CollectionExtract

    public ST_CollectionExtract()

### Method Detail

#### getJavaStaticMethod

    public String getJavaStaticMethod()

#### collectionExtract

    public static org.locationtech.jts.geom.Geometry collectionExtract(org.locationtech.jts.geom.Geometry geometry,
                                                                       int dimension)
                                                                throws org.locationtech.jts.io.ParseException

Given a (multi)geometry, returns a (multi)geometry consisting only of elements of the specified type. Sub-geometries that are not the specified type are ignored. If there are no sub-geometries of the right type, an EMPTY geometry will be returned. Only points, lines and polygons are extracted.

Parameters:
  `geometry` -
  `dimension` -
Returns:
Throws:
  `org.locationtech.jts.io.ParseException`