LinearRing

@Serializable
data class LinearRing(val id: String? = null, val altitudeOffset: Double = 0.0, val extrude: Boolean = false, val tessellate: Boolean = false, val altitudeMode: AltitudeMode = AltitudeMode.clampToGround, val coordinates: Coordinates) : Geometry

Defines a closed line string, typically the outer boundary of a Polygon. Optionally, a LinearRing can also be used as the inner boundary of a Polygon to create holes in the Polygon. A Polygon can contain multiple LinearRing elements used as inner boundaries.

Constructors

Link copied to clipboard
constructor(id: String? = null, altitudeOffset: Double = 0.0, extrude: Boolean = false, tessellate: Boolean = false, altitudeMode: AltitudeMode = AltitudeMode.clampToGround, coordinates: Coordinates)

Properties

Link copied to clipboard
@XmlElement
val altitudeMode: AltitudeMode

Specifies how altitude components in the element are interpreted.

Link copied to clipboard
@XmlSerialName(value = "altitudeOffset", namespace = "http://www.google.com/kml/ext/2.2", prefix = "gx")
@XmlElement
val altitudeOffset: Double

A KML extension, in the Google extension namespace, that modifies how the altitude values are rendered. This offset allows you to move an entire LinearRing up or down as a unit without modifying all the individual coordinate values that make up the LinearRing. (Although the LinearRing is displayed using the altitude offset value, the original altitude values are preserved in the KML file.) Units are in meters.

Link copied to clipboard
@XmlElement
val coordinates: Coordinates

Four or more tuples, each consisting of floating point values for longitude, latitude, and altitude. The altitude component is optional. Do not include spaces within a tuple. The last coordinate must be the same as the first coordinate. Coordinates are expressed in decimal degrees only.

Link copied to clipboard
@XmlElement
@Serializable(with = FlexibleBooleanSerializer::class)
val extrude: Boolean

Boolean value. Specifies whether to connect the LinearRing to the ground. To extrude this geometry, the altitude mode must be either AltitudeMode.relativeToGround, AltitudeMode.relativeToSeaFloor, or AltitudeMode.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.

Link copied to clipboard
open override val id: String?
Link copied to clipboard
@XmlElement
@Serializable(with = FlexibleBooleanSerializer::class)
val tessellate: Boolean

Boolean value. Specifies whether to allow the LinearRing to follow the terrain. To enable tessellation, the value for altitudeMode must be AltitudeMode.clampToGround or AltitudeMode.clampToSeaFloor. Very large LinearRings should enable tessellation so that they follow the curvature of the earth (otherwise, they may go underground and be hidden).