Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "geometry/utilities"

Index

Variables

Const MINIMUM_POLYGON_OR_LINE_COORDINATE_LENGTH_FOR_TURF_JS

MINIMUM_POLYGON_OR_LINE_COORDINATE_LENGTH_FOR_TURF_JS: 2 = 2

Functions

Const adjustGeoCoordsForAntimeridian

  • If the geo crosses the antimeridian, this will updates its coordinates so that no longitudes are negative. Typically used before displaying a geo on a map. The coordinates are updated in place.

    Parameters

    Returns void

Const bboxToExtent

  • bboxToExtent(bbox: turf.BBox): Extent
  • Converts an arbitrary bbox value from GeoJSON to a 2D extent value

    Parameters

    • bbox: turf.BBox

      2D/3D GeoJSON bbox value

    Returns Extent

    Extent

Const convertCoordsToDisplay

  • convertCoordsToDisplay(coordinates: Position[]): number[][]

Const geoToExtent

Const makeBufferedGeo

  • Creates a buffered GeometryJSON object from a source GeometryJSON object using it's geometry and buffer values

    Parameters

    Returns GeometryJSON

    GeometryJSON with buffer applied

Const makeEmptyGeometry

  • makeEmptyGeometry(id: string, shape: Shape, initialProperties?: object): GeometryJSON
  • Creates an empty GeometryJSON object

    Parameters

    • id: string

      unique id for geometry

    • shape: Shape

      geometry shape

    • Default value initialProperties: object = {}

      hash of properties to pass to new GeometryJSON

    Returns GeometryJSON

    GeometryJSON

Const makeGeometry

  • Creates a full GeometryJSON object from GeoJSON

    Parameters

    • id: string

      unique id for geometry

    • geometryJSON: any

      base GeoJSON object to extend

    • color: string

      CSS color for geometry

    • shape: Shape

      geometry shape

    • Default value buffer: number = 0

      buffer size

    • Default value bufferUnit: LengthUnit = METERS

      buffer size unit of measurement

    Returns GeometryJSON

    GeometryJSON

Generated using TypeDoc