public class Polygon extends Geometry implements Cloneable
A Polygon is defined by an outer boundary and 0 or more inner boundaries. The boundaries,
in turn, are defined by LinearRings. When a Polygon is extruded, its boundaries
are connected to the ground to form additional polygons, which gives the appearance
of a building or a box. Extruded Polygons use
Note: In Google Earth, a Polygon with an
The
<Polygon id="ID">
<!-- specific to Polygon -->
<extrude>0</extrude> <!-- boolean -->
<tessellate>0</tessellate> <!-- boolean -->
<altitudeMode>clampToGround</altitudeMode>
<!-- kml:altitudeModeEnum: clampToGround, relativeToGround, or absolute -->
<!-- or, substitute gx:altitudeMode: clampToSeaFloor, relativeToSeaFloor -->
<outerBoundaryIs>
<LinearRing>
<coordinates>...</coordinates> <!-- lon,lat[,alt] -->
</LinearRing>
</outerBoundaryIs>
<innerBoundaryIs>
<LinearRing>
<coordinates>...</coordinates> <!-- lon,lat[,alt] -->
</LinearRing>
</innerBoundaryIs>
</Polygon>
Extends:| Modifier and Type | Field and Description |
|---|---|
protected AltitudeMode |
altitudeMode
AltitudeMode
clampToGround, relativeToGround, absolute
See Also:
See
|
protected Boolean |
extrude
|
protected List<Boundary> |
innerBoundaryIs
|
protected Boundary |
outerBoundaryIs
|
protected List<AbstractObject> |
polygonObjectExtension
|
protected List<Object> |
polygonSimpleExtension |
protected Boolean |
tessellate
|
geometryObjectExtension, geometrySimpleExtensionid, objectSimpleExtension, targetId| Constructor and Description |
|---|
Polygon() |
| Modifier and Type | Method and Description |
|---|---|
Polygon |
addToGeometryObjectExtension(AbstractObject geometryObjectExtension)
add a value to the geometryObjectExtension property collection
|
Polygon |
addToGeometrySimpleExtension(Object geometrySimpleExtension)
add a value to the geometrySimpleExtension property collection
|
Polygon |
addToInnerBoundaryIs(Boundary innerBoundaryIs)
add a value to the innerBoundaryIs property collection
|
Polygon |
addToObjectSimpleExtension(Object objectSimpleExtension)
add a value to the objectSimpleExtension property collection
|
Polygon |
addToPolygonObjectExtension(AbstractObject polygonObjectExtension)
add a value to the polygonObjectExtension property collection
|
Polygon |
addToPolygonSimpleExtension(Object polygonSimpleExtension)
add a value to the polygonSimpleExtension property collection
|
Polygon |
clone() |
Boundary |
createAndAddInnerBoundaryIs()
Creates a new instance of
Boundary and adds it to innerBoundaryIs. |
Boundary |
createAndSetOuterBoundaryIs()
Creates a new instance of
Boundary and set it to outerBoundaryIs. |
boolean |
equals(Object obj) |
AltitudeMode |
getAltitudeMode() |
List<Boundary> |
getInnerBoundaryIs() |
Boundary |
getOuterBoundaryIs() |
List<AbstractObject> |
getPolygonObjectExtension() |
List<Object> |
getPolygonSimpleExtension() |
int |
hashCode() |
Boolean |
isExtrude() |
Boolean |
isTessellate() |
void |
setAltitudeMode(AltitudeMode value) |
void |
setExtrude(Boolean value) |
void |
setGeometryObjectExtension(List<AbstractObject> geometryObjectExtension) |
void |
setGeometrySimpleExtension(List<Object> geometrySimpleExtension) |
void |
setInnerBoundaryIs(List<Boundary> innerBoundaryIs) |
void |
setObjectSimpleExtension(List<Object> objectSimpleExtension) |
void |
setOuterBoundaryIs(Boundary value) |
void |
setPolygonObjectExtension(List<AbstractObject> polygonObjectExtension) |
void |
setPolygonSimpleExtension(List<Object> polygonSimpleExtension) |
void |
setTessellate(Boolean value) |
Polygon |
withAltitudeMode(AltitudeMode altitudeMode)
fluent setter
|
Polygon |
withExtrude(Boolean extrude)
fluent setter
|
Polygon |
withGeometryObjectExtension(List<AbstractObject> geometryObjectExtension)
fluent setter
|
Polygon |
withGeometrySimpleExtension(List<Object> geometrySimpleExtension)
fluent setter
|
Polygon |
withId(String id)
fluent setter
|
Polygon |
withInnerBoundaryIs(List<Boundary> innerBoundaryIs)
fluent setter
|
Polygon |
withObjectSimpleExtension(List<Object> objectSimpleExtension)
fluent setter
|
Polygon |
withOuterBoundaryIs(Boundary outerBoundaryIs)
fluent setter
|
Polygon |
withPolygonObjectExtension(List<AbstractObject> polygonObjectExtension)
fluent setter
|
Polygon |
withPolygonSimpleExtension(List<Object> polygonSimpleExtension)
fluent setter
|
Polygon |
withTargetId(String targetId)
fluent setter
|
Polygon |
withTessellate(Boolean tessellate)
fluent setter
|
getGeometryObjectExtension, getGeometrySimpleExtensiongetId, getObjectSimpleExtension, getTargetId, setId, setTargetIdprotected Boolean extrude
Boolean value. Specifies whether to connect the LineString to the ground. To extrude a LineString, the altitude mode must be either relativeToGround, relativeToSeaFloor, or absolute. The vertices in the LineString are extruded toward the center of the Earth's sphere.
Boolean value. Specifies whether to connect the LinearRing to the ground. To extrude this geometry, the altitude mode must be either relativeToGround, relativeToSeaFloor, or absolute. Only the vertices of the LinearRing are extruded, not the center of the geometry. The vertices are extruded toward the center of the Earth's sphere.
Boolean value. Specifies whether to connect the Polygon to the ground. To extrude a Polygon, the altitude mode must be either relativeToGround, relativeToSeaFloor, or absolute. Only the vertices are extruded, not the geometry itself (for example, a rectangle turns into a box with five faces. The vertices of the Polygon are extruded toward the center of the Earth's sphere.
Boolean value. Specifies whether to connect the point to the ground with a line.
To extrude a Point, the value for
protected Boolean tessellate
Boolean value. Specifies whether to allow the LineString to follow the terrain. To enable tessellation, the altitude mode must be clampToGround or clampToSeaFloor. Very large LineStrings should enable tessellation so that they follow the curvature of the earth (otherwise, they may go underground and be hidden).
Boolean value. Specifies whether to allow the LinearRing to follow the terrain.
To enable tessellation, the value for
Boolean value. Specifies whether to allow the Polygon to follow the terrain. To enable tessellation, the Polygon must have an altitude mode of clampToGround or clampToSeaFloor. Very large Polygons should enable tessellation so that they follow the curvature of the earth (otherwise, they may go underground and be hidden).
protected AltitudeMode altitudeMode
clampToGround, relativeToGround, absolute
See Also: Seeprotected Boundary outerBoundaryIs
Contains a
protected List<Boundary> innerBoundaryIs
Contains a
protected List<AbstractObject> polygonObjectExtension
public void setExtrude(Boolean value)
value - allowed object is
Booleanextrudepublic void setTessellate(Boolean value)
value - allowed object is
Booleantessellatepublic AltitudeMode getAltitudeMode()
<Object
<AltitudeMode
<de.micromata.opengis.kml.v_2_2_0.gx.AltitudeModealtitudeModepublic void setAltitudeMode(AltitudeMode value)
value - allowed object is
<Object
<AltitudeMode
<de.micromata.opengis.kml.v_2_2_0.gx.AltitudeModealtitudeModepublic Boundary getOuterBoundaryIs()
BoundaryouterBoundaryIspublic void setOuterBoundaryIs(Boundary value)
value - allowed object is
BoundaryouterBoundaryIspublic List<Object> getPolygonSimpleExtension()
polygonSimpleExtensionpublic List<AbstractObject> getPolygonObjectExtension()
polygonObjectExtensionpublic Boundary createAndSetOuterBoundaryIs()
Boundary and set it to outerBoundaryIs.
This method is a short version for:
Boundary boundary = new Boundary();
this.setOuterBoundaryIs(boundary); public Boundary createAndAddInnerBoundaryIs()
Boundary and adds it to innerBoundaryIs.
This method is a short version for:
Boundary boundary = new Boundary();
this.getInnerBoundaryIs().add(boundary); public void setInnerBoundaryIs(List<Boundary> innerBoundaryIs)
innerBoundaryIs - innerBoundaryIspublic Polygon addToInnerBoundaryIs(Boundary innerBoundaryIs)
innerBoundaryIs - Objects of the following type are allowed in the list: Boundarypublic void setPolygonSimpleExtension(List<Object> polygonSimpleExtension)
polygonSimpleExtension - polygonSimpleExtensionpublic Polygon addToPolygonSimpleExtension(Object polygonSimpleExtension)
polygonSimpleExtension - Objects of the following type are allowed in the list: Objectpublic void setPolygonObjectExtension(List<AbstractObject> polygonObjectExtension)
polygonObjectExtension - polygonObjectExtensionpublic Polygon addToPolygonObjectExtension(AbstractObject polygonObjectExtension)
polygonObjectExtension - Objects of the following type are allowed in the list: AbstractObjectpublic void setObjectSimpleExtension(List<Object> objectSimpleExtension)
setObjectSimpleExtension in class GeometryobjectSimpleExtensionpublic Polygon addToObjectSimpleExtension(Object objectSimpleExtension)
AbstractObjectaddToObjectSimpleExtension in class GeometryobjectSimpleExtension - Objects of the following type are allowed in the list: Objectpublic void setGeometrySimpleExtension(List<Object> geometrySimpleExtension)
setGeometrySimpleExtension in class GeometrygeometrySimpleExtensionpublic Polygon addToGeometrySimpleExtension(Object geometrySimpleExtension)
GeometryaddToGeometrySimpleExtension in class GeometrygeometrySimpleExtension - Objects of the following type are allowed in the list: <ObjectJAXBElement<BigIntegerJAXBElement<Doublepublic void setGeometryObjectExtension(List<AbstractObject> geometryObjectExtension)
setGeometryObjectExtension in class GeometrygeometryObjectExtensionpublic Polygon addToGeometryObjectExtension(AbstractObject geometryObjectExtension)
GeometryaddToGeometryObjectExtension in class GeometrygeometryObjectExtension - Objects of the following type are allowed in the list: AbstractObjectpublic Polygon withExtrude(Boolean extrude)
extrude - required parametersetExtrude(Boolean)public Polygon withTessellate(Boolean tessellate)
tessellate - required parametersetTessellate(Boolean)public Polygon withAltitudeMode(AltitudeMode altitudeMode)
altitudeMode - required parameter#setAltitudeMode(Object)public Polygon withOuterBoundaryIs(Boundary outerBoundaryIs)
outerBoundaryIs - required parametersetOuterBoundaryIs(Boundary)public Polygon withInnerBoundaryIs(List<Boundary> innerBoundaryIs)
innerBoundaryIs - required parameter#setInnerBoundaryIs(List) public Polygon withPolygonSimpleExtension(List<Object> polygonSimpleExtension)
polygonSimpleExtension - required parameter#setPolygonSimpleExtension(Listpublic Polygon withPolygonObjectExtension(List<AbstractObject> polygonObjectExtension)
polygonObjectExtension - required parameter#setPolygonObjectExtension(List) public Polygon withObjectSimpleExtension(List<Object> objectSimpleExtension)
AbstractObjectwithObjectSimpleExtension in class GeometryobjectSimpleExtension - required parameter#setObjectSimpleExtension(Listpublic Polygon withId(String id)
AbstractObjectwithId in class Geometryid - required parameterAbstractObject.setId(String)public Polygon withTargetId(String targetId)
AbstractObjectwithTargetId in class GeometrytargetId - required parameterAbstractObject.setTargetId(String)public Polygon withGeometrySimpleExtension(List<Object> geometrySimpleExtension)
GeometrywithGeometrySimpleExtension in class GeometrygeometrySimpleExtension - required parameter#setGeometrySimpleExtension(Listpublic Polygon withGeometryObjectExtension(List<AbstractObject> geometryObjectExtension)
GeometrywithGeometryObjectExtension in class GeometrygeometryObjectExtension - required parameter#setGeometryObjectExtension(List) Copyright © 2014 Micromata GmbH. All rights reserved.