GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - samirahmedsc/node-s2: bindings for s2 in node

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

188 Commits
188 Commits

Folders and files

NameName
Last commit message
Last commit date
deps
deps
 
 
geometry
geometry
 
 
src
src
 
 
test
test
 
 
viewfinder
viewfinder
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
API.md
API.md
 
 
CHANGELOG.md
CHANGELOG.md
 
 
README.md
README.md
 
 
binding.gyp
binding.gyp
 
 
index.js
index.js
 
 
package.json
package.json
 
 

Repository files navigation

Custom Build of Original node-s2

Bindings for the S2 Geometry Library into node.js.

S2 is a library that does spherical math over the world, and supports a very fancy Hilbert curve-related indexing scheme. S2 has no documentation besides source comments and this presentation. Notably it's used for MongoDB's 2dsphere index, as well as in viewfinderco's DynamoDB-powered database. s2map.com also demonstrates one of the killer features of the library, 'coverings', which are intelligently computed groups of cells that can be used to index geometries.

Example

var s2 = require('s2');

var ll = new s2.S2LatLng(0, 0);
ll.isValid(); // true
var normalized = ll.normalized(); // true
var pt = ll.toPoint();

Build

npm install
npm build . --build-from-source
npm test

Geojson

node-s2 is a low level s2 wrapper. If you are simply looking to get geojson into s2, you should check out geojson-cover.

Documentation: API.md

Notes

Some of the S2 API is not wrapped because it isn't meant to be exposed in this way, and is blocked from wrapping by DISALLOW_COPY_AND_ASSIGN.

  • S2CellUnion
  • S2Loop
  • S2Polyline
  • S2Polygon
  • S2RegionCoverer
  • S2RegionIntersection

See Also

  • s2-geometry-javascript - an incomplete port of S2 to JavaScript.
  • gos2 - very incomplete port to Go
  • viewfinder built a python wrapper
  • s2-geometry-php - another very incomplete port to PHP
  • interview with david blackman

About

bindings for s2 in node

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.