public class

MultiGeometry

extends Geometry
java.lang.Object
   ↳ com.carto.geometry.Geometry
     ↳ com.carto.geometry.MultiGeometry
Known Direct Subclasses

Class Overview

A generic multi geometry container.

Summary

Public Constructors
MultiGeometry(GeometryVector geometries)
Constructs a MultiGeometry from a vector of geometry objects.
Public Methods
synchronized void delete()
MapPos getCenterPos()
Returns the center point of the geometry.
Geometry getGeometry(int index)
Returns the geometry at the specified index.
int getGeometryCount()
Returns the number of geometry objects in this multi geometry container.
[Expand]
Inherited Methods
From class com.carto.geometry.Geometry
From class java.lang.Object

Public Constructors

public MultiGeometry (GeometryVector geometries)

Constructs a MultiGeometry from a vector of geometry objects.

Parameters
geometries The geometries for multi geometry.

Public Methods

public synchronized void delete ()

public MapPos getCenterPos ()

Returns the center point of the geometry.

Returns
  • The center point of the geometry.

public Geometry getGeometry (int index)

Returns the geometry at the specified index. Index must be between 0 and getGeometryCount (exclusive)

Parameters
index The index of the geometry.
Returns
  • The geometry at specified index.
Throws
IndexOutOfBoundsException If the index is out of range.

public int getGeometryCount ()

Returns the number of geometry objects in this multi geometry container.

Returns
  • The number of geometry objects.