Class

com.scalakml.kml

Polygon

Related Doc: package kml

Permalink

case class Polygon(extrude: Option[Boolean] = None, tessellate: Option[Boolean] = None, altitudeMode: Option[AltitudeMode] = None, outerBoundaryIs: Option[Boundary] = None, innerBoundaryIs: Seq[Boundary] = Nil, id: Option[String] = None, targetId: Option[String] = None, polygonSimpleExtensionGroup: Seq[Any] = Nil, polygonObjectExtensionGroup: Seq[Any] = Nil, geometrySimpleExtensionGroup: Seq[Any] = Nil, geometryObjectExtensionGroup: Seq[Any] = Nil, objectSimpleExtensionGroup: Seq[Any] = Nil) extends Geometry with Product with Serializable

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 <PolyStyle> for their color, color mode, and fill.

The <coordinates> for polygons must be specified in counterclockwise order. Polygons follow the "right-hand rule," which states that if you place the fingers of your right hand in the direction in which the coordinates are specified, your thumb points in the general direction of the geometric normal for the polygon. (In 3D graphics, the geometric normal is used for lighting and points away from the front face of the polygon.) Since Google Earth fills only the front face of polygons, you will achieve the desired effect only when the coordinates are specified in the proper order. Otherwise, the polygon will be gray.

extrude

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.

tessellate

This field is not used by Polygon. To allow a Polygon to follow the terrain (that is, to enable tessellation) specify an altitude mode of clampToGround or clampToSeaFloor.

altitudeMode

Specifies how altitude components in the <coordinates> element are interpreted. Possible values are clampToGround - (default) Indicates to ignore an altitude specification (for example, in the <coordinates> tag). relativeToGround - Sets the altitude of the element relative to the actual ground elevation of a particular location. For example, if the ground elevation of a location is exactly at sea level and the altitude for a point is set to 9 meters, then the elevation for the icon of a point placemark elevation is 9 meters with this mode. However, if the same coordinate is set over a location where the ground elevation is 10 meters above sea level, then the elevation of the coordinate is 19 meters. A typical use of this mode is for placing telephone poles or a ski lift. absolute - Sets the altitude of the coordinate relative to sea level, regardless of the actual elevation of the terrain beneath the element. For example, if you set the altitude of a coordinate to 10 meters with an absolute altitude mode, the icon of a point placemark will appear to be at ground level if the terrain beneath is also 10 meters above sea level. If the terrain is 3 meters above sea level, the placemark will appear elevated above the terrain by 7 meters. A typical use of this mode is for aircraft placement.

outerBoundaryIs

Contains a <LinearRing> element.

innerBoundaryIs

Contains a <LinearRing> element. A Polygon can contain multiple <innerBoundaryIs> elements, which create multiple cut-outs inside the Polygon.

Linear Supertypes
Serializable, Serializable, Product, Equals, Geometry, KmlObject, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Polygon
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Geometry
  7. KmlObject
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Polygon(extrude: Boolean, tessellate: Boolean, altitudeMode: AltitudeMode, outerBoundaryIs: Boundary, innerBoundaryIsSet: Seq[Boundary], id: String)

    Permalink
  2. new Polygon(extrude: Boolean, tessellate: Boolean, altitudeMode: AltitudeMode, outerBoundaryIs: Boundary, innerBoundaryIsSet: Seq[Boundary])

    Permalink
  3. new Polygon(outerBoundaryIs: Boundary, innerBoundaryIsSet: Seq[Boundary])

    Permalink
  4. new Polygon(outerBoundaryIs: Boundary, innerBoundaryIs: Boundary)

    Permalink
  5. new Polygon(outerBoundaryIs: Boundary)

    Permalink
  6. new Polygon(extrude: Option[Boolean] = None, tessellate: Option[Boolean] = None, altitudeMode: Option[AltitudeMode] = None, outerBoundaryIs: Option[Boundary] = None, innerBoundaryIs: Seq[Boundary] = Nil, id: Option[String] = None, targetId: Option[String] = None, polygonSimpleExtensionGroup: Seq[Any] = Nil, polygonObjectExtensionGroup: Seq[Any] = Nil, geometrySimpleExtensionGroup: Seq[Any] = Nil, geometryObjectExtensionGroup: Seq[Any] = Nil, objectSimpleExtensionGroup: Seq[Any] = Nil)

    Permalink

    extrude

    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.

    tessellate

    This field is not used by Polygon. To allow a Polygon to follow the terrain (that is, to enable tessellation) specify an altitude mode of clampToGround or clampToSeaFloor.

    altitudeMode

    Specifies how altitude components in the <coordinates> element are interpreted. Possible values are clampToGround - (default) Indicates to ignore an altitude specification (for example, in the <coordinates> tag). relativeToGround - Sets the altitude of the element relative to the actual ground elevation of a particular location. For example, if the ground elevation of a location is exactly at sea level and the altitude for a point is set to 9 meters, then the elevation for the icon of a point placemark elevation is 9 meters with this mode. However, if the same coordinate is set over a location where the ground elevation is 10 meters above sea level, then the elevation of the coordinate is 19 meters. A typical use of this mode is for placing telephone poles or a ski lift. absolute - Sets the altitude of the coordinate relative to sea level, regardless of the actual elevation of the terrain beneath the element. For example, if you set the altitude of a coordinate to 10 meters with an absolute altitude mode, the icon of a point placemark will appear to be at ground level if the terrain beneath is also 10 meters above sea level. If the terrain is 3 meters above sea level, the placemark will appear elevated above the terrain by 7 meters. A typical use of this mode is for aircraft placement.

    outerBoundaryIs

    Contains a <LinearRing> element.

    innerBoundaryIs

    Contains a <LinearRing> element. A Polygon can contain multiple <innerBoundaryIs> elements, which create multiple cut-outs inside the Polygon.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addToInnerBoundaryIs(value: Boundary): Polygon

    Permalink

    returns a new object with value added to the sequence

    returns a new object with value added to the sequence

    value

    to add

    returns

    a new object with value added to the sequence

  5. val altitudeMode: Option[AltitudeMode]

    Permalink

    Specifies how altitude components in the <coordinates> element are interpreted.

    Specifies how altitude components in the <coordinates> element are interpreted. Possible values are clampToGround - (default) Indicates to ignore an altitude specification (for example, in the <coordinates> tag). relativeToGround - Sets the altitude of the element relative to the actual ground elevation of a particular location. For example, if the ground elevation of a location is exactly at sea level and the altitude for a point is set to 9 meters, then the elevation for the icon of a point placemark elevation is 9 meters with this mode. However, if the same coordinate is set over a location where the ground elevation is 10 meters above sea level, then the elevation of the coordinate is 19 meters. A typical use of this mode is for placing telephone poles or a ski lift. absolute - Sets the altitude of the coordinate relative to sea level, regardless of the actual elevation of the terrain beneath the element. For example, if you set the altitude of a coordinate to 10 meters with an absolute altitude mode, the icon of a point placemark will appear to be at ground level if the terrain beneath is also 10 meters above sea level. If the terrain is 3 meters above sea level, the placemark will appear elevated above the terrain by 7 meters. A typical use of this mode is for aircraft placement.

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. val extrude: Option[Boolean]

    Permalink

    Boolean value.

    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.

  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. val geometryObjectExtensionGroup: Seq[Any]

    Permalink
    Definition Classes
    PolygonGeometry
  12. val geometrySimpleExtensionGroup: Seq[Any]

    Permalink
    Definition Classes
    PolygonGeometry
  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. val id: Option[String]

    Permalink
    Definition Classes
    PolygonGeometryKmlObject
  15. val innerBoundaryIs: Seq[Boundary]

    Permalink

    Contains a <LinearRing> element.

    Contains a <LinearRing> element. A Polygon can contain multiple <innerBoundaryIs> elements, which create multiple cut-outs inside the Polygon.

  16. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. val objectSimpleExtensionGroup: Seq[Any]

    Permalink
    Definition Classes
    PolygonGeometryKmlObject
  21. val outerBoundaryIs: Option[Boundary]

    Permalink

    Contains a <LinearRing> element.

  22. val polygonObjectExtensionGroup: Seq[Any]

    Permalink
  23. val polygonSimpleExtensionGroup: Seq[Any]

    Permalink
  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  25. val targetId: Option[String]

    Permalink
    Definition Classes
    PolygonGeometryKmlObject
  26. val tessellate: Option[Boolean]

    Permalink

    This field is not used by Polygon.

    This field is not used by Polygon. To allow a Polygon to follow the terrain (that is, to enable tessellation) specify an altitude mode of clampToGround or clampToSeaFloor.

  27. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Geometry

Inherited from KmlObject

Inherited from AnyRef

Inherited from Any

Ungrouped