quadtree

WebJar for quadtree

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

quadtree
Last Version

Last Version

1.1.3
Release Date

Release Date

Type

Type

jar
Description

Description

quadtree
WebJar for quadtree
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/B2MSolutions/node-quadtree

Download quadtree

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/quadtree/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>quadtree</artifactId>
    <version>1.1.3</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/quadtree/
implementation 'org.webjars.npm:quadtree:1.1.3'
// https://jarcasting.com/artifacts/org.webjars.npm/quadtree/
implementation ("org.webjars.npm:quadtree:1.1.3")
'org.webjars.npm:quadtree:jar:1.1.3'
<dependency org="org.webjars.npm" name="quadtree" rev="1.1.3">
  <artifact name="quadtree" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='quadtree', version='1.1.3')
)
libraryDependencies += "org.webjars.npm" % "quadtree" % "1.1.3"
[org.webjars.npm/quadtree "1.1.3"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

node-quadtree

Build Status

Description

Quadtree is a node module that encodes and decodes geospatial quadtrees.

The encoding algorithm orders the tiles using the bing maps ordering shown below:

Quadtree ordering

Installation

$ npm install quadtree

Usage

var quadtree = require('quadtree');

	var coordinate = {
	    lat: -27.093364,
	    lng: -109.367523
	};

	var precision = 8;
	var encoded = quadtree.encode(coordinate, precision); // returns "20310230")

	var decoded = quadtree.decode(encoded); // returns { origin: { lng: -108.984375, lat: -27.0703125 }, error: { lng: 0.703125, lat: 0.3515625 } }

	var neighbour = quadtree.neighbour(encoded, 1, 1); // returns "20310213"

	var boundingBox = quadtree.bbox(encoded); // returns { minlng: -109.6875, minlat: -27.421875, maxlng: -108.28125, maxlat: -26.71875 }

	var enveloped = quadtree.envelop(boundingBox, precision); // returns [ '20310230', '20310231', '20310212', '20310213' ]

quadtree.encode(coordinate, precision)

Encodes a coordinate into a quadtree of the specified precision.

quadtree.decode(quadtree)

Decodes a quadtree into an origin and error.

quadtree.neighbour(encoded, north, east)

Finds the neighbour of the given quadtree, walking a number of tiles in the supplied direction.

quadtree.bbox(encoded)

Returns the bounding box of the tile containing the supplied quadtree.

quadtree.envelop(bbox, precision)

Returns an array of quadtrees that are enveloped by the bbox at the supplied precision.

Contributors

Pair programmed by Roy Lines and James Bloomer.

org.webjars.npm

B2M Solutions

Versions

Version
1.1.3