GithubHelp home page GithubHelp logo

n76 / lacells-creator Goto Github PK

View Code? Open in Web Editor NEW
44.0 44.0 18.0 66 KB

Script for generating a cell tower database for NetworkLocation from the microG project

License: GNU General Public License v3.0

Shell 100.00%

lacells-creator's People

Contributors

akallabeth avatar dicer avatar izzysoft avatar n76 avatar wvengen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lacells-creator's Issues

Merged towers db (lacells.db) is larger than merge.db

I ran gen_lacells it produced merge.db with a size of 550 MB (I didn't filter out any MCC/MNC)
Then I ran the commented sqlite code in gen_lacells:
.headers on
.mode csv
.output merged.csv
SELECT * FROM cells ORDER BY mcc, mnc, lac, cid;
.quit

then ran: ./merge_duplicate_towers > towers.csv

the resulting towers.csv (415 MB) was smaller than merge.csv (484 MB)

then I ran the rest of commented sqlite commands:
sqlite3 lacells.db <<!
CREATE TABLE cells(mcc INTEGER, mnc INTEGER, lac INTEGER, cid INTEGER, longitude REAL, latitude REAL, altitude REAL, accuracy REAL);
.mode csv
.import towers.csv cells
CREATE INDEX _idx1 ON cells (mcc, mnc, lac, cid);
CREATE INDEX _idx2 ON cells (lac, cid);
VACUUM;
.quit
!

Yet the resulting lacells.db was 691 MB ! Although I notice that this database doesn't have the 'samples' column !

Need to create global database

Hello,

You mentioned in README that the script filters out Cell IDs that are outside the US, so I looked at your script to figure out what to remove, so I found those:

INSERT INTO cells SELECT mcc, mnc, lac, cellid, long, lat, -1, min(max(range, 500),100000), max(1,samples) FROM cells_new;

What does that one do ? What is min(max(range, 500),100000) & max(1,samples) ?

DELETE FROM cells WHERE mcc != 310 AND mcc != 311;

I guess that's the filtering you do, right ?

Generating database fails

Because actually the LocalGsmNlpBackend 0.9.1 (µgUnifiedNlp without GApps) fails to generate the database (for me), I tried using this script to generate one instead.

While generating I'm getting this happens:
./lacells-creator -i -c262,520 -m
Importing mozilla cell data
./towers_mozilla.csv:8319154: INSERT failed: database or disk is full
Importing opencellid cell data
./towers_opencellid.csv:4441184: INSERT failed: database or disk is full
Error: near line 52: database or disk is full
Error: near line 53: database or disk is full
Filtering rows
Merging cell towers
Error: near line 69: database or disk is full

What can I do to solve this problem ?
And is it a known problem that the LocalGsmNlpBackend (0.9.1) is actually unable to create a database file ?

Thanks :-)

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.