public class

PolygonGeometry

extends Geometry
java.lang.Object
   ↳ com.carto.geometry.Geometry
     ↳ com.carto.geometry.PolygonGeometry

Class Overview

Polygon geometry defined by an outer ring and optional multiple inner rings (holes).

Summary

Public Constructors
PolygonGeometry(MapPosVector poses)
Constructs a PolygonGeometry objects from an outer ring.
PolygonGeometry(MapPosVector poses, MapPosVectorVector holes)
Constructs a PolygonGeometry objects from an outer ring and list of inner rings (holes).
PolygonGeometry(MapPosVectorVector rings)
Constructs a PolygonGeometry objects from a list of rings.
Public Methods
synchronized void delete()
MapPos getCenterPos()
Returns the center point of the geometry.
MapPosVectorVector getHoles()
Returns the list of map position lists defining the inner rings of the polygon (holes).
MapPosVector getPoses()
Returns the list of map positions defining the outer ring of the polygon.
MapPosVectorVector getRings()
Returns the list of map position lists defining the rings of the polygon.
[Expand]
Inherited Methods
From class com.carto.geometry.Geometry
From class java.lang.Object

Public Constructors

public PolygonGeometry (MapPosVector poses)

Constructs a PolygonGeometry objects from an outer ring.

Parameters
poses The list of map positions defining the outer ring.

public PolygonGeometry (MapPosVector poses, MapPosVectorVector holes)

Constructs a PolygonGeometry objects from an outer ring and list of inner rings (holes).

Parameters
poses The list of map positions defining the outer ring.
holes The list of map position lists defining the inner rings.

public PolygonGeometry (MapPosVectorVector rings)

Constructs a PolygonGeometry objects from a list of rings.
It is assumed the the first ring is outer ring and all other rings are inner rings.

Parameters
rings The list of map position lists defining the rings

Public Methods

public synchronized void delete ()

public MapPos getCenterPos ()

Returns the center point of the geometry.

Returns
  • The center point of the geometry.

public MapPosVectorVector getHoles ()

Returns the list of map position lists defining the inner rings of the polygon (holes).

Returns
  • The list of map position lists defining the inner rings of the polygon (holes).

public MapPosVector getPoses ()

Returns the list of map positions defining the outer ring of the polygon.

Returns
  • The list of map positions defining the outer ring of the polygon.

public MapPosVectorVector getRings ()

Returns the list of map position lists defining the rings of the polygon.

Returns
  • The list of map position lists defining the rings of the polygon.