Makes a MeshNode instance.
const point = new Point(36.10377479, 140.087855041);
let node = MeshNode.ofPoint(point, 1);
// Prints MeshNode(latitude=MeshCoord(first=54, second=1, third=2), longitude=MeshCoord(first=40, second=0, third=7))
console.log(node.toString());
let node = MeshNode.ofPoint(point, 5);
// Prints MeshNode(latitude=MeshCoord(first=54, second=1, third=0), longitude=MeshCoord(first=40, second=0, third=5))
console.log(node.toString());
Returns true
if this
is compatible to the meshUnit
.
the mesh unit, 1
or 5
true
if this
is compatible to the meshUnit
Static
fromStatic
fromMakes the nearest north-west MeshNode of point
.
A MeshNode instance.
const point = new Point(36.103774791666666, 140.08785504166664, 10.0);
let node = MeshNode.fromPoint(point, 1);
// Prints MeshNode(latitude=MeshCoord(first=54, second=1, third=2), longitude=MeshCoord(first=40, second=0, thrid=7))
console.log(node.toString());
let node = MeshNode.fromPoint(point, 5);
// Prints MeshNode(latitude=MeshCoord(first=54, second=1, third=0), longitude=MeshCoord(first=40, second=0, thrid=5))
console.log(node.toString());
Represents mesh node, a pair of the MeshCoord instances.
We note that this supports non-negative latitude and longitude only, and
longitude
satisfiesMeshCoord(0, 0, 0) <=
and<= MeshCoord(80, 0, 0)
.Example