Constructor
new Point(x, y)
Creates a new Point instance.
Extends:
- Geometry
Parameters:
Name | Type | Description |
---|---|---|
x |
Number | The X coordinate. |
y |
Number | The Y coordinate. |
Extends
- Geometry
Members
x :Number
Returns the X coordinate of this 2D point.
Type:
- Number
y :Number
Returns the Y coordinate of this 2D point.
Type:
- Number
Methods
(static) fromBuffer(buffer) → {Point}
Creates a LineString instance from
a Well-known Text (WKT)
representation of a 2D point.
Parameters:
Name | Type | Description |
---|---|---|
buffer |
Buffer |
Returns:
- Type
- Point
equals(other) → {Boolean}
Returns true if the values of the point are the same, otherwise it returns false.
Parameters:
Name | Type | Description |
---|---|---|
other |
Point |
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