Array of linear rings that define the polygon. The first linear ring of the
array defines the outer-boundary or surface of the polygon. Each subsequent
linear ring defines a hole in the surface of the polygon. A linear ring is
an array of vertices' coordinates where the first coordinate and the last are
equivalent. (For internal use, flat coordinates in combination with
layout
and ends
are also accepted.)
Optional
layout: GeometryLayoutLayout.
Optional
ends: number[]Ends (for internal use with flat coordinates).
Protected
disposedThe object has already been disposed.
Protected
flatProtected
layoutProtected
simplifiedProtected
simplifiedAbstract
simplifyGet a transformed and simplified version of the geometry.
Protected
strideAppend the passed linear ring to this polygon.
Linear ring.
Protected
applyProtected
Apply any properties from another object without triggering events.
The source object.
Abstract
applyApply a transform function to the coordinates of the geometry.
The geometry is modified in place.
If you do not want the geometry modified in place, first clone()
it and
then use this function on the clone.
Transform function. Called with a flat array of geometry coordinates.
Abstract
closestProtected
Abstract
computeDispatches an event and calls all listeners listening for events
of this type. The event parameter can either be a string or an
Object with a type
property.
Event object.
false
if anyone called preventDefault on the
event object or if any of the listeners returned false.
Protected
disposeGet the coordinate array for this geometry. This array has the structure of a GeoJSON coordinate array for polygons.
Optional
right: booleanOrient coordinates according to the right-hand
rule (counter-clockwise for exterior and clockwise for interior rings).
If false
, coordinates will be oriented according to the left-hand rule
(clockwise for exterior and counter-clockwise for interior rings).
By default, coordinate orientation will depend on how the geometry was
constructed.
Coordinates.
Return the Nth linear ring of the polygon geometry. Return null
if the
given index is out of range.
The exterior linear ring is available at index 0
and the interior rings
at index 1
and beyond.
Index.
Linear ring.
Return the linear rings of the polygon.
Linear rings.
Create a simplified version of this geometry using the Douglas Peucker algorithm.
Squared tolerance.
Simplified geometry.
Protected
getAbstract
getAbstract
intersectsProtected
onceProtected
onAbstract
rotateAbstract
scaleScale the geometry (with an optional origin). This modifies the geometry coordinates in place.
The scaling factor in the x-direction.
Optional
sy: numberThe scaling factor in the y-direction (defaults to sx).
Optional
anchor: CoordinateThe scale origin (defaults to the center of the geometry extent).
Protected
setSets a collection of key-value pairs. Note that this changes any existing properties and adds new ones (it does not remove any existing properties).
Values.
Optional
silent: booleanUpdate without triggering an event.
Create a simplified version of this geometry. For linestrings, this uses the Douglas Peucker algorithm. For polygons, a quantization-based simplification is used to preserve topology.
The tolerance distance for simplification.
A new, simplified version of the original geometry.
Abstract
simplifyTransform each coordinate of the geometry from one coordinate reference
system to another. The geometry is modified in place.
For example, a line will be transformed to a line and a circle to a circle.
If you do not want the geometry modified in place, first clone()
it and
then use this function on the clone.
The current projection. Can be a string identifier or a module:ol/proj/Projection~Projection object.
The desired projection. Can be a string identifier or a module:ol/proj/Projection~Projection object.
This geometry. Note that original geometry is modified in place.
Abstract
translateProtected
un
Classdesc
Polygon geometry.
Api