Code Monkey home page Code Monkey logo

opencellid's Introduction

Self hosted OpenCellID server

An OpenCellID HTTP server, inspired by the original work from Frédéric Junod. You'll want to use this if you either don't want to rely on OpenCellID to stay online, or when you're a commercial user of OpenCellID.

If you're interested in this project, you are probably also interested in transmeyer's cell-geolocation project. It combines OpenCellID with other data sources.

Install

Download and create an sqlite database from the csv data that you can get from http://opencellid.org/downloads/. The thing is that it now requires a login, so the best way is to download it from browser and store it as cells.txt.gz in this folder. If you want to run this on a server then use Firefox Network panel and 'copy as cURL'. Then run that command on the server and store as cells.txt.gz.

Then run:

cat cells.txt.gz | gunzip - > cells.txt
cat schema.sql | sqlite3 cells.sqlite
cat import.sql | sqlite3 cells.sqlite

Running

Start the server

npm install
node opencellid.js

Use environment variables PORT and IP for different port/host. F.e.:

PORT=1337 node opencellid.js

Query

curl -s 'http://localhost:5265/?mcc=228&mnc=1&lac=505&cellid=10545'

The outout is a JSON object that has lat, lon and range.

License

Released under the WTFPL version 2.

opencellid's People

Contributors

janjongboom avatar fredj avatar

Stargazers

 avatar Virus avatar Dimitri Sokolyuk avatar 0x7s0lt1 avatar CRTH0 avatar Jeff Habibi avatar Andrey Emelyanov avatar Leonardo Rossi avatar  avatar Ithoq Projosasmito avatar  avatar jcrashkit avatar boggyb avatar Cyrille Giquello avatar whsheng avatar  avatar  avatar

Watchers

 avatar James Cloos avatar arneand avatar  avatar

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.