Package org.h2gis.functions.spatial.properties

# Class ST_GeometryN

java.lang.Object
org.h2gis.api.AbstractFunction
org.h2gis.api.DeterministicScalarFunction
org.h2gis.functions.spatial.properties.ST_GeometryN

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

public class ST_GeometryN extends org.h2gis.api.DeterministicScalarFunction
Return Geometry number n from the given GeometryCollection. Use `ST_NumGeometries` to retrieve the total number of Geometries.

Author:
  Nicolas Fortin, Adam Gouge

## Field Summary

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

`PROP_NAME, PROP_REMARKS`

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

`PROP_DETERMINISTIC`

## Constructor Summary

Constructors
Constructor
Description
`ST_GeometryN()`
Default constructor

## Method Summary

Modifier and Type
Method
Description
`static org.locationtech.jts.geom.Geometry`
`getGeometryN(org.locationtech.jts.geom.Geometry geometry, Integer n)`
Return Geometry number n from the given GeometryCollection.
`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 Details

### ST_GeometryN

public ST_GeometryN()
Default constructor

## Method Details

### getJavaStaticMethod

public String getJavaStaticMethod()

### getGeometryN

public static org.locationtech.jts.geom.Geometry getGeometryN(org.locationtech.jts.geom.Geometry geometry, Integer n) throws SQLException
Return Geometry number n from the given GeometryCollection.

Parameters:
  `geometry` - GeometryCollection
  `n` - Index of Geometry number n in [1-N]
Returns:
  Geometry number n or Null if parameter is null.
Throws:
  `SQLException`