Constructor
new LineString(…pointopt)
Creates a new LineString instance.
Extends:
- Geometry
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
point |
Point |
<optional> <repeatable> |
A sequence of Point items as arguments. |
Example
new LineString(new Point(10.99, 20.02), new Point(14, 26), new Point(34, 1.2));
Extends
- Geometry
Members
points :Array.<Point>
Returns a frozen Array of points that represent the line.
Type:
- Array.<Point>
Methods
(static) fromBuffer(buffer) → {LineString}
Creates a LineString instance from
a Well-known Text (WKT)
representation of a line.
Parameters:
Name | Type | Description |
---|---|---|
buffer |
Buffer |
Returns:
- Type
- LineString
equals(other) → {Boolean}
Returns true if the values of the linestrings are the same, otherwise it returns false.
Parameters:
Name | Type | Description |
---|---|---|
other |
LineString |
Returns:
- Type
- Boolean
toBuffer() → {Buffer}
Returns a Well-known Binary (WKB)
representation of this instance.
Returns:
- Type
- Buffer
toJSON()
Returns a JSON representation of this geo-spatial type.
toString() → {String}
Returns Well-known text (WKT) representation of the geometry object.
Returns:
- Type
- String