Giter Site home page Giter Site logo

s2geo-node's Introduction

s2geo-node

One day i need to play with S2 Geometry in Node, i found node-s2, unfortunately that library is outdated only support node v0.10.0 so i am trying to make the addon to be work again.

Bindings for the S2 Geometry Library into node.js.

For usage information, see the examples in the examples/ directory.

Windows User

For Windows User please make sure you have installed :

  • Latest NPM Version , for make sure please run : npm install -g npm@next
  • Visual C++ Build Tools
  • Python 2.7

Todo List

-. Porting More Class -. Convert to Nan v2 -. Make a BAT script for help Windows User checking the requirement.

Currently Ported

  • S2CellId
  • S2LatLng
  • S2Point
  • S2Cell
  • S2Cap
  • S2LatLngRect
  • S1Interval
  • S1Angle

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

Thanks

  • mapbox team
  • cypherix93 - for make this libs can compile in Windows

Contact Me

@vito Feel free to contact me for help or anything else

s2geo-node's People

Stargazers

 avatar

Watchers

 avatar

s2geo-node's Issues

no template named 'Handle' in namespace 'v8'

Trying to install on a mac OS fails :(

╭─craigoconnor@Craigs-MacBook-Pro ~/Desktop/tests/s2 ‹master*› 
╰─$ yarn add s2geo       
yarn add v1.16.0
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning " > @typescript-eslint/[email protected]" has unmet peer dependency "typescript@*".
warning " > @typescript-eslint/[email protected]" has unmet peer dependency "typescript@*".
warning "@typescript-eslint/eslint-plugin > @typescript-eslint/[email protected]" has unmet peer dependency "typescript@*".
warning "@typescript-eslint/eslint-plugin > [email protected]" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev".
[4/4] 🔨  Building fresh packages...
[1/2] ⡀ fsevents
error /Users/craigoconnor/Desktop/WebGL/step2_indexes/node_modules/s2geo: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments: 
Directory: /Users/craigoconnor/Desktop/WebGL/step2_indexes/node_modules/s2geo
Output:
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info find Python using Python version 2.7.10 found at "/usr/bin/python"
gyp info spawn /usr/bin/python
gyp info spawn args [
gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/craigoconnor/Desktop/WebGL/step2_indexes/node_modules/s2geo/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/craigoconnor/Library/Caches/node-gyp/12.7.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/craigoconnor/Library/Caches/node-gyp/12.7.0',
gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/craigoconnor/Library/Caches/node-gyp/12.7.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/craigoconnor/Desktop/WebGL/step2_indexes/node_modules/s2geo',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/_s2geo/src/NativeExtension.o
In file included from ../src/NativeExtension.cc:8:
../src/interval.h:17:26: error: no template named 'Handle' in namespace 'v8'
    static void Init(v8::Handle<v8::Object> target);
                     ~~~~^
1 error generated.
make: *** [Release/obj.target/_s2geo/src/NativeExtension.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:196:23)
gyp ERR! stack     at ChildProcess.emit (events.js:203:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 18.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/craigoconnor/Desktop/WebGL/step2_indexes/node_modules/s2geo
gyp ERR! node -v v12.7.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.