Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.vividsolutions.jts.geom.util
Class GeometryCombiner

    java.lang.Object
      com.vividsolutions.jts.geom.util.GeometryCombiner

public class GeometryCombiner
extends java.lang.Object

Combines `Geometry`s to produce a `GeometryCollection` of the most appropriate type. Input geometries which are already collections will have their elements extracted first. No validation of the result geometry is performed. (The only case where invalidity is possible is where `Polygonal` geometries are combined and result in a self-intersection)

Author:
  mbdavis
See Also:
  `GeometryFactory.buildGeometry(java.util.Collection)`

Constructor Summary
`GeometryCombiner(java.util.Collection geoms)` Creates a new combiner for a collection of geometries

Method Summary
`Geometry` | `combine()` Computes the combination of the input geometries
`static Geometry` | `combine(java.util.Collection geoms)` Combines a collection of geometries.
`static Geometry` | `combine(Geometry g0, Geometry g1)` Combines two geometries.
`static Geometry` | `combine(Geometry g0, Geometry g1, Geometry g2)` Combines three geometries.
`static GeometryFactory` | `extractFactory(java.util.Collection geoms)` Extracts the GeometryFactory used by the geometries in a collection

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### GeometryCombiner

    public GeometryCombiner(java.util.Collection geoms)

  Creates a new combiner for a collection of geometries

Parameters:
  `geoms` - the geometries to combine

Method Detail

### combine

    public static Geometry combine(java.util.Collection geoms)

  Combines a collection of geometries.

  Parameters:
    `geoms` - the geometries to combine
  Returns:
    the combined geometry

### combine

    public static Geometry combine(Geometry g0,
                                   Geometry g1)

  Combines two geometries.

  Parameters:
    `g0` - a geometry to combine
    `g1` - a geometry to combine
  Returns:
    the combined geometry

### combine

    public static Geometry combine(Geometry g0,
                                   Geometry g1,
                                   Geometry g2)

  Combines three geometries.

  Parameters:
    `g0` - a geometry to combine
    `g1` - a geometry to combine
    `g2` - a geometry to combine
  Returns:
    the combined geometry

### extractFactory

    public static GeometryFactory extractFactory(java.util.Collection geoms)

  Extracts the GeometryFactory used by the geometries in a collection

  Parameters:
    `geoms` -
  Returns:
    a GeometryFactory

### combine

    public Geometry combine()

  Computes the combination of the input geometries

  Returns:
    a Geometry which is the combination

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD