Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Location: Import/Export locations not working as expected #2771

Open
dazzzl opened this issue Jan 27, 2025 · 0 comments
Open

Location: Import/Export locations not working as expected #2771

dazzzl opened this issue Jan 27, 2025 · 0 comments
Labels

Comments

@dazzzl
Copy link

dazzzl commented Jan 27, 2025

Describe the bug
I moved form local-NLP-Backend and would like to import my old database. I wrote the following script:

#!/usr/bin/env python3

import csv
import sys


with open(sys.argv[1]) as incsv:
    with open(sys.argv[1].split(".")[0]+"wifi.csv","w") as wificsv:
              with open(sys.argv[1].split(".")[0]+"tower.csv","w") as towercsv:
                        inobj = csv.reader(incsv)
                        wifiobj = csv.writer(wificsv)
                        tobj = csv.writer(towercsv)
                        wifiobj.writerow(["mac","lat","lon","alt"])
                        tobj.writerow(["mcc","mnc","type","lac","cid","psc","lat","lon","alt"])
                        for row in inobj:
                            match row[1]:
                                case 'WLAN2':
                                    wifiobj.writerow([row[0].split("/")[1].replace(':',''),row[2],row[3],''])
                                case 'LTE' :
                                    rfid = row[0].split("/")
                                    tobj.writerow([rfid[1],rfid[2],'3',rfid[5],rfid[3],rfid[4],row[2],row[3],''])
                                case 'GSM':
                                    rfid = row[0].split("/")
                                    tobj.writerow([rfid[1],rfid[2],'1',rfid[4],rfid[3],'',row[2],row[3],''])
                                case 'WCDMA':
                                    rfid = row[0].split("/")
                                    tobj.writerow([rfid[1],rfid[2],'2',rfid[4],rfid[3],'',row[2],row[3],''])

the csv files was accepted and in the location database, the entries are there. However, if I export the cell or wifi locations, only some old locations are present. Also the network localization in areas which are in the local NLP database do not work.

To Reproduce
Steps to reproduce the behavior:

  1. Import locations form the script
  2. Export locations -> no new locations are there

Expected behavior
Imported entries should appear in the export

System
Android Version: 15
Custom ROM: LineageOS 22.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant