Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LineString

The LineString class is a type of GeometryObject representing a line.

example



var lineGeometryObject = { type: 'LineString', coordinates: [[-82.441406,29.2001234], [-82.441406,29.535229]] };
var lineString = new LineString(lineGeometryObject);

Hierarchy

  • LineString

Implements

Index

Constructors

constructor

  • Parameters

    Returns LineString

  • Parameters

    • Optional geoJSON: GeometryObject

      is an optional GeometryObject to use for the coordinates property of this LineString.

    Returns LineString

  • Parameters

    • Optional geoJSON: GeometryObject

      is an optional GeometryObject to use for the coordinates property of this LineString.

    Returns LineString

Properties

Private _coordinates

_coordinates: any = []

bbox

  • get bbox(): number[]
  • Retrieves an array of numbers that represents the bounding box of the LineString.

    Returns number[]

coordinates

  • get coordinates(): Position[]
  • set coordinates(coords: Position[]): void
  • The coordinates property is an array of Position.

    Returns Position[]

  • The coordinates property is an array of Position.

    Parameters

    • coords: Position[]

    Returns void

Private log

log: any = LogManager.CreateLogger("LineString")

Private terraPrimitive

  • Construct a Terraformer Primitive from this LineString.

    Returns Primitive

    the Terraformer.Primitive of this LineString.

Private turfFeature

  • Construct a Turf Feature from this LineString.

    Returns Feature

    the Turf Feature of this LineString.

type

  • get type(): string
  • The type property of a geometry as a string ('LineString').

    Returns string

Methods

buffer

  • buffer(geometryMeasure: GeometryMeasure): GeometryObject
  • buffer(geometryMeasure: GeometryMeasure): GeometryObject
  • buffer(geometryMeasure: GeometryMeasure): GeometryObject
  • Buffers the geometry of the LineString by the GeometryMeasure given as the input parameter.

    Parameters

    Returns GeometryObject

    a new [GeometryObject]]

  • Buffers the geometry of the LineString by the GeometryMeasure given as the input parameter.

    Parameters

    Returns GeometryObject

    a new [GeometryObject]]

  • Buffers the geometry of the LineString by the GeometryMeasure given as the input parameter.

    Parameters

    Returns GeometryObject

    a new [GeometryObject]]

contains

  • contains(geometryObject: GeometryObject): boolean
  • contains(geometryObject: GeometryObject): boolean
  • contains(geometryObject: GeometryObject): boolean
  • See if this LineString contains the GeometryObject given as the input parameter.

    Parameters

    Returns boolean

    a boolean

  • See if this LineString contains the GeometryObject given as the input parameter.

    Parameters

    Returns boolean

    a boolean

  • See if this LineString contains the GeometryObject given as the input parameter.

    Parameters

    Returns boolean

    a boolean

convexHull

  • convexHull(): Polygon
  • convexHull(): Polygon
  • convexHull(): Polygon
  • Convex Hull is the Polygon stretched around this LineString

    Returns Polygon

    a new Polygon

  • Convex Hull is the Polygon stretched around this LineString

    Returns Polygon

    a new Polygon

  • Convex Hull is the Polygon stretched around this LineString

    Returns Polygon

    a new Polygon

disjoint

  • disjoint(geometryObject: GeometryObject): boolean
  • disjoint(geometryObject: GeometryObject): boolean
  • disjoint(geometryObject: GeometryObject): boolean
  • See if this LineString does not intersect the GeometryObject given as an input parameter.

    Parameters

    Returns boolean

    a boolean

  • See if this LineString does not intersect the GeometryObject given as an input parameter.

    Parameters

    Returns boolean

    a boolean

  • See if this LineString does not intersect the GeometryObject given as an input parameter.

    Parameters

    Returns boolean

    a boolean

equals

  • equals(geometryObject: GeometryObject): boolean
  • equals(geometryObject: GeometryObject): boolean
  • equals(geometryObject: GeometryObject): boolean
  • See if a GeometryObject given as the input parameter is equal to this LineString.

    Parameters

    Returns boolean

    a boolean

  • See if a GeometryObject given as the input parameter is equal to this LineString.

    Parameters

    Returns boolean

    a boolean

  • See if a GeometryObject given as the input parameter is equal to this LineString.

    Parameters

    Returns boolean

    a boolean

getLength

  • getLength(units: string): GeometryMeasure
  • getLength(units: string): GeometryMeasure
  • getLength(units: string): GeometryMeasure
  • Get the length of this LineString in specified units.

    Parameters

    • units: string

      as string

    Returns GeometryMeasure

    the GeometryMeasure of the length.

  • Get the length of this LineString in specified units.

    Parameters

    • units: string

      as string

    Returns GeometryMeasure

    the GeometryMeasure of the length.

  • Get the length of this LineString in specified units.

    Parameters

    • units: string

      as string

    Returns GeometryMeasure

    the GeometryMeasure of the length.

intersects

  • intersects(geometryObject: GeometryObject): boolean
  • intersects(geometryObject: GeometryObject): boolean
  • intersects(geometryObject: GeometryObject): boolean
  • See if this LineString intersects the GeometryObject given as an input parameter.

    Parameters

    Returns boolean

    a boolean

  • See if this LineString intersects the GeometryObject given as an input parameter.

    Parameters

    Returns boolean

    a boolean

  • See if this LineString intersects the GeometryObject given as an input parameter.

    Parameters

    Returns boolean

    a boolean

overlaps

  • overlaps(geometryObject: GeometryObject): boolean
  • overlaps(geometryObject: GeometryObject): boolean
  • overlaps(geometryObject: GeometryObject): boolean
  • See if this LineString overlaps the GeometryObject given as an input parameter.

    Parameters

    Returns boolean

    a boolean

  • See if this LineString overlaps the GeometryObject given as an input parameter.

    Parameters

    Returns boolean

    a boolean

  • See if this LineString overlaps the GeometryObject given as an input parameter.

    Parameters

    Returns boolean

    a boolean

pointAlong

  • pointAlong(geometryMeasure: GeometryMeasure): GeometryObject
  • pointAlong(geometryMeasure: GeometryMeasure): GeometryObject
  • pointAlong(geometryMeasure: GeometryMeasure): GeometryObject

toWkt

  • toWkt(): string
  • toWkt(): string
  • toWkt(): string
  • Convert this LineString to well-known text representation.

    Returns string

    the well-known text representation this LineString.

  • Convert this LineString to well-known text representation.

    Returns string

    the well-known text representation this LineString.

  • Convert this LineString to well-known text representation.

    Returns string

    the well-known text representation this LineString.

within

  • within(geometryObject: GeometryObject): boolean
  • within(geometryObject: GeometryObject): boolean
  • within(geometryObject: GeometryObject): boolean
  • See if this LineString is within the GeometryObject given as an input parameter.

    Parameters

    Returns boolean

    a boolean

  • See if this LineString is within the GeometryObject given as an input parameter.

    Parameters

    Returns boolean

    a boolean

  • See if this LineString is within the GeometryObject given as an input parameter.

    Parameters

    Returns boolean

    a boolean

Static createFromWkt

  • createFromWkt(wkt: string): LineString
  • createFromWkt(wkt: string): LineString
  • createFromWkt(wkt: string): LineString
  • Static method for creating a LineString from well-known text.

    Parameters

    • wkt: string

      is a string of well-known text representing a line.

    Returns LineString

    a LineString parsed from the well-known text input parameter.

  • Static method for creating a LineString from well-known text.

    Parameters

    • wkt: string

      is a string of well-known text representing a line.

    Returns LineString

    a LineString parsed from the well-known text input parameter.

  • Static method for creating a LineString from well-known text.

    Parameters

    • wkt: string

      is a string of well-known text representing a line.

    Returns LineString

    a LineString parsed from the well-known text input parameter.