Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AreaShape

The AreaShape represents a shape-point / coordinate of a Area feature. The AreaShape is only existing if the corresponding Area feature is "selected" and user based geometry editing with touch/mouse interaction is activated.

see

Area.select

Hierarchy

Implements

Index

Properties

Optional bbox

bbox: [number, number, number, number]

Bounding box of the feature. The value of the bbox member is an array of length 4, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The "bbox" values define shapes with edges that follow lines of constant longitude and latitude.

Readonly class

class: "AREA_SHAPE"

The feature class of an AreaShape Feature is "AREA_SHAPE".

geometry

geometry: { coordinates: "Point" extends "Point" ? GeoJSONCoordinate : "Point" extends "MultiPoint" ? GeoJSONCoordinate[] : "Point" extends "LineString" ? GeoJSONCoordinate[] : "Point" extends "MultiLineString" ? GeoJSONCoordinate[][] : "Point" extends "Polygon" ? GeoJSONCoordinate[][] : "Point" extends "MultiPolygon" ? GeoJSONCoordinate[][][] : GeoJSONCoordinate | GeoJSONCoordinate[] | GeoJSONCoordinate[][] | GeoJSONCoordinate[][][]; type: "Point" | "MultiPoint" | "LineString" | "MultiLineString" | "Polygon" | "MultiPolygon" | "Point" | string }

A geometry is a object where the type member's value is one of: "Point", "MultiPoint", "LineString", "MultiLineString", "Polygon" or "MultiPolygon". A geometry object must have a member with the name "coordinates". The value of the coordinates member is always an array (referred to as the coordinates array below). The structure for the elements in this array are determined by the type of geometry.

For type "Point", each element in the coordinates array is a number representing the point coordinate in one dimension. There must be at least two elements, and may be more. The order of elements must follow x, y, z order (or longitude, latitude, altitude for coordinates in a geographic coordinate reference system).

For type "MultiPoint", each element in the coordinates array is a coordinates array as described for type "Point".

For type "LineString", each element in the coordinates array is a coordinates array as described for type "Point". The coordinates array for a LineString must have two or more elements. A LinearRing is a special case of type LineString where the first and last elements in the coordinates array are equivalent (they represent equivalent points). Though a LinearRing is not explicitly represented as a geometry type, it is referred to in the Polygon geometry type definition.

For type "MultiLineString", each element in the coordinates array is a coordinates array as described for type "LineString".

For type "Polygon", each element in the coordinates array is a coordinates array as described for type "LineString". Furthermore, each LineString in the coordinates array must be a LinearRing. For Polygons with multiple LinearRings, the first must be the exterior ring and any others must be interior rings or holes.

For type "MultiPolygon", each element in the coordinates array is a coordinates array as described for type "Polygon".

Point:
{
   "type": "Point",
   "coordinates": [100.0, 0.0]
}

Polygon:
{
   "type": "Polygon",
   "coordinates": [
       [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ]
   ]
}

Type declaration

  • coordinates: "Point" extends "Point" ? GeoJSONCoordinate : "Point" extends "MultiPoint" ? GeoJSONCoordinate[] : "Point" extends "LineString" ? GeoJSONCoordinate[] : "Point" extends "MultiLineString" ? GeoJSONCoordinate[][] : "Point" extends "Polygon" ? GeoJSONCoordinate[][] : "Point" extends "MultiPolygon" ? GeoJSONCoordinate[][][] : GeoJSONCoordinate | GeoJSONCoordinate[] | GeoJSONCoordinate[][] | GeoJSONCoordinate[][][]
  • type: "Point" | "MultiPoint" | "LineString" | "MultiLineString" | "Polygon" | "MultiPolygon" | "Point" | string

id

id: string | number

id of the feature.

properties

properties: {} | null

The properties associated with the feature.

type

type: "Feature" | string

The type of the feature is a string with 'Feature' as its value.

Methods

getArea

  • Get the Area feature to which the ShapeShape belongs.

    Returns Area

    the Area feature

getIndex

  • getIndex(): number
  • Get the index of the shape point in the coordinates array of the polygon of respective Area feature.

    Returns number

    The index of the shape point.

getProvider

remove

  • remove(): boolean
  • Removes the shape point from the polygon geometry of the Area feature.

    Returns boolean

toJSON

Generated using TypeDoc