All Projects → DenisCarriere → geojson-rbush

DenisCarriere / geojson-rbush

Licence: MIT license
GeoJSON implementation of RBush — a high-performance JavaScript R-tree-based 2D spatial index for points and rectangles

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to geojson-rbush

Rbush
RBush — a high-performance JavaScript R-tree-based 2D spatial index for points and rectangles
Stars: ✭ 1,881 (+3035%)
Mutual labels:  computational-geometry, r-tree, spatial-index
Turf
A modular geospatial engine written in JavaScript
Stars: ✭ 6,659 (+10998.33%)
Mutual labels:  geojson, computational-geometry
geojsoncontour
Convert matplotlib contour plots to geojson
Stars: ✭ 78 (+30%)
Mutual labels:  geojson
geoJSON-Nepal
GeoJSON for Nepal. 🇳🇵
Stars: ✭ 49 (-18.33%)
Mutual labels:  geojson
krawler
A minimalist (geospatial) ETL
Stars: ✭ 51 (-15%)
Mutual labels:  geojson
kandilli-rasathanesi-api
Kandilli rasathanesinin son dakika depremler ve tarihe göre deprem listesi için ara API (last minute earthquakes in turkey)
Stars: ✭ 90 (+50%)
Mutual labels:  geojson
winnow
Deprecated
Stars: ✭ 89 (+48.33%)
Mutual labels:  geojson
Tinfour
Delaunay and Constrained Delaunay Triangulations in Java, providing high-performance utilities for modeling surfaces with support for Lidar LAS files, Digital Elevation Models (DEM), finite element analysis, path planning, natural neighbor interpolation, and other applications of Triangulated Irregular Networks (TIN)
Stars: ✭ 119 (+98.33%)
Mutual labels:  computational-geometry
de9im
DE-9IM spatial predicate library implemented in Javascript.
Stars: ✭ 22 (-63.33%)
Mutual labels:  geojson
contour-rs
Contour polygon creation in Rust (using marching squares algorithm)
Stars: ✭ 33 (-45%)
Mutual labels:  geojson
togeojson
convert KML, TCX, and GPX to GeoJSON, without the fuss
Stars: ✭ 315 (+425%)
Mutual labels:  geojson
homog2d
C++ 2D geometry library, handles points, lines, polylines, planar transformations (and other primitives), using homogeneous coordinates. Provided with complete manual and samples.
Stars: ✭ 70 (+16.67%)
Mutual labels:  computational-geometry
cogj-spec
Cloud Optimized GeoJSON spec
Stars: ✭ 36 (-40%)
Mutual labels:  geojson
pentaho-gis-plugins
🗺 GIS plugins for Pentaho Data Integration
Stars: ✭ 42 (-30%)
Mutual labels:  geojson
geojson-editor
A modified version of Googles Simple GeoJSON Editor
Stars: ✭ 43 (-28.33%)
Mutual labels:  geojson
osm-static-maps
Openstreetmap static maps is a nodejs lib, CLI and server open source inspired on google static map service
Stars: ✭ 130 (+116.67%)
Mutual labels:  geojson
inpoly
A fast 'point(s)-in-polygon' test for MATLAB.
Stars: ✭ 17 (-71.67%)
Mutual labels:  computational-geometry
SplashGeom
Open-source C++ library for geometry and linear algebra
Stars: ✭ 22 (-63.33%)
Mutual labels:  computational-geometry
rain-geojson-sg
Straight-forward API server to convert rain area radar images (Singapore) to GeoJSON
Stars: ✭ 15 (-75%)
Mutual labels:  geojson
convhull 3d
A header-only C implementation of the Quickhull algorithm for building N-dimensional Convex Hulls and Delaunay meshes
Stars: ✭ 108 (+80%)
Mutual labels:  computational-geometry

GeoJSON RBush

Build Status npm version MIT licensed

GeoJSON implementation of RBush — a high-performance JavaScript R-tree-based 2D spatial index for points and rectangles.

Install

npm

$ npm install --save geojson-rbush

API

Table of Contents

rbush

GeoJSON implementation of RBush spatial index.

Parameters

  • maxEntries number defines the maximum number of entries in a tree node. 9 (used by default) is a reasonable choice for most applications. Higher value means faster insertion and slower search, and vice versa. (optional, default 9)

Examples

var geojsonRbush = require('geojson-rbush').default;
var tree = geojsonRbush();

Returns RBush GeoJSON RBush

insert

insert

Parameters

  • feature Feature insert single GeoJSON Feature

Examples

var poly = turf.polygon([[[-78, 41], [-67, 41], [-67, 48], [-78, 48], [-78, 41]]]);
tree.insert(poly)

Returns RBush GeoJSON RBush

load

load

Parameters

  • features (FeatureCollection | Array<Feature>) load entire GeoJSON FeatureCollection

Examples

var polys = turf.polygons([
    [[[-78, 41], [-67, 41], [-67, 48], [-78, 48], [-78, 41]]],
    [[[-93, 32], [-83, 32], [-83, 39], [-93, 39], [-93, 32]]]
]);
tree.load(polys);

Returns RBush GeoJSON RBush

remove

remove

Parameters

  • feature Feature remove single GeoJSON Feature
  • equals Function Pass a custom equals function to compare by value for removal.

Examples

var poly = turf.polygon([[[-78, 41], [-67, 41], [-67, 48], [-78, 48], [-78, 41]]]);

tree.remove(poly);

Returns RBush GeoJSON RBush

clear

clear

Examples

tree.clear()

Returns RBush GeoJSON Rbush

search

search

Parameters

  • geojson (BBox | FeatureCollection | Feature) search with GeoJSON

Examples

var poly = turf.polygon([[[-78, 41], [-67, 41], [-67, 48], [-78, 48], [-78, 41]]]);

tree.search(poly);

Returns FeatureCollection all features that intersects with the given GeoJSON.

collides

collides

Parameters

  • geojson (BBox | FeatureCollection | Feature) collides with GeoJSON

Examples

var poly = turf.polygon([[[-78, 41], [-67, 41], [-67, 48], [-78, 48], [-78, 41]]]);

tree.collides(poly);

Returns boolean true if there are any items intersecting the given GeoJSON, otherwise false.

all

all

Examples

tree.all()

Returns FeatureCollection all the features in RBush

toJSON

toJSON

Examples

var exported = tree.toJSON()

Returns any export data as JSON object

fromJSON

fromJSON

Parameters

  • json any import previously exported data

Examples

var exported = {
  "children": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [110, 50]
      },
      "properties": {},
      "bbox": [110, 50, 110, 50]
    }
  ],
  "height": 1,
  "leaf": true,
  "minX": 110,
  "minY": 50,
  "maxX": 110,
  "maxY": 50
}
tree.fromJSON(exported)

Returns RBush GeoJSON RBush

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].