Package org.h2gis.functions.spatial.split

## Class ST_SubDivide

- java.lang.Object
- - org.h2gis.api.AbstractFunction
  - - org.h2gis.api.DeterministicScalarFunction
    - - org.h2gis.functions.spatial.split.ST_SubDivide

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

    public class ST_SubDivide
    extends org.h2gis.api.DeterministicScalarFunction

### 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
`ST_SubDivide()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static org.locationtech.jts.geom.Geometry` `divide​(org.locationtech.jts.geom.Geometry geom)` Divide the geometry into quadrants
`static org.locationtech.jts.geom.Geometry` `divide​(org.locationtech.jts.geom.Geometry geom, int maxvertices)`
`static void` `filterGeom​(org.locationtech.jts.geom.Geometry geom, int maxvertices, Stack stack, List ret)` Extract unique geometry and check if the geometry must be divided
`String` `getJavaStaticMethod()`
`static List<org.locationtech.jts.geom.Geometry>` `subdivide_recursive​(org.locationtech.jts.geom.Geometry geom, int maxvertices)` Divide a geometry in quadrant recursively

### 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_SubDivide

    public ST_SubDivide()

### Method Detail

#### getJavaStaticMethod

    public String getJavaStaticMethod()

#### divide

    public static org.locationtech.jts.geom.Geometry divide​(org.locationtech.jts.geom.Geometry geom)

Divide the geometry into quadrants

Parameters:
  `geom` - `Geometry`
Returns:
  geometry

#### divide

    public static org.locationtech.jts.geom.Geometry divide​(org.locationtech.jts.geom.Geometry geom,
                                                            int maxvertices)

Parameters:
  `geom` - `Geometry`
  `maxvertices` - max number of vertices
Returns:
  Geometry

#### subdivide_recursive

    public static List<org.locationtech.jts.geom.Geometry> subdivide_recursive​(org.locationtech.jts.geom.Geometry geom,
                                                                               int maxvertices)

Divide a geometry in quadrant recursively

Parameters:
  `geom` - input geometry
  `maxvertices` - number of vertices in the final geometry
Returns:
  geometry

#### filterGeom

    public static void filterGeom​(org.locationtech.jts.geom.Geometry geom,
                                  int maxvertices,
                                  Stack stack,
                                  List ret)

Extract unique geometry and check if the geometry must be divided

Parameters:
  `geom` - `Geometry`
  `maxvertices` - max vertices
  `stack` - queue
  `ret` - list of sub geometries