Class: LineString

.Geo. LineString


new LineString(positions [, boundaryBox])

A GeoJSON LineString object

Parameters:
Name Type Argument Description
positions Array

An at least 2-dimensional array of 2-dimensional arrays with the first entry being the longitude and the second one being the latitude, i.e. [[51,32],[51.4,21]]

boundaryBox Array <optional>

An array with [min. longitude, min. latitude, max. longitude, max. latitude]

Example
var lineString = new jsonOdm.Geo.LineString([
   [51.5,32],[51.6,21]
]);

Methods


<static> intersects(lineString, geometry)

Checks whether a LineString intersects another geometry

Parameters:
Name Type Description
lineString jsonOdm.Geo.LineString
geometry jsonOdm.Geo.Point | jsonOdm.Geo.BoundaryBox | jsonOdm.Geo.MultiPoint | jsonOdm.Geo.LineString | jsonOdm.Geo.MultiLineString | jsonOdm.Geo.Polygon | jsonOdm.Geo.MultiPolygon | jsonOdm.Geo.GeometryCollection

Any jsonOdm.Geo.<geometry> object

Returns:
Type
boolean

<static> within(lineString, geometry)

Checks whether a LineString is inside of another geometry

Parameters:
Name Type Description
lineString jsonOdm.Geo.LineString
geometry jsonOdm.Geo.Point | jsonOdm.Geo.BoundaryBox | jsonOdm.Geo.MultiPoint | jsonOdm.Geo.LineString | jsonOdm.Geo.MultiLineString | jsonOdm.Geo.Polygon | jsonOdm.Geo.MultiPolygon | jsonOdm.Geo.GeometryCollection

Any jsonOdm.Geo.<geometry> object

Returns:
Type
boolean