Notices


Reply
Thread Tools
Posts: 5 | Thanked: 2 times | Joined on Dec 2007
#1
Hello, I'm a newcomer to the N800 and have been having a high time dinking around with Maemo Mapper. The tablet inspired me to join the FON network (community Wi-Fi), which makes lists of it hotspots available in GPX and other formats on its site (fon.com -- I'm using the files for France).

My problem is that Maemo Mapper doesn't import the GPX files properly. It hangs on the import. When you kill it and restart, the POIs seem to be in the database, but if you deselect the category they're in, you can never get them back.

I've tried to convert both KML and GPX versions of the FON POIs to GPX using KMLtoGPX, GPSBabel, and Load_POI. None can complete the conversion. From GPSBabel, I learned that the file contains invalid lat/long points, which I now assuming are what's screwing everything up. I tried removed a few manually, but there are thousands of POIs in the file, and I'm not even sure if this is really the probem.

Does anyone know either:
1. How to make this work
or
2. How to filter out invalid entries in a large GPX file?

Many thanks.
 

The Following User Says Thank You to orangegoat For This Useful Post:
wv9k's Avatar
Posts: 145 | Thanked: 20 times | Joined on Dec 2007 @ Seattle, WA USA
#2
I'm still trying to figure out the same kind of problem.

It seems that there are at least 9,204,507 difference varieties of "correct .gpx" files :-).
__________________
Nokia N800 - 24G (16G internal - 8G external) - KDE-3.5.8 :-)!
(2008-2?): RX-34_2008SE_2.2007.50-2_PR_COMBINED_MR0_ARM
iBlue 737 BT GPS - iGo Stowaway Ultra-Slim BT Keyboard.
Homebrew OTG cable and power injector.
 
Posts: 5 | Thanked: 2 times | Joined on Dec 2007
#3
The more I play with this, the more I think this is actually and issue with Mapper's POI handling. I have the same problem with POIs from other sources, not just FON. Behavior is this:

I import a GPX and create a new category for it.
Sometimes mapper hangs while importing (if file is large) but on restart the import appears to have been successful.
Deselecting the new category makes the POIs disappear, but then you can't reselect it unless you restart Mapper. Then, maybe it works, maybe not.

Is there a bug report place for Mapper? Anyone else seen something like this?
 
Posts: 79 | Thanked: 21 times | Joined on Sep 2007
#4
Ok, I went another route which is to add the FON spots directly to maemo-mapper's POI database.

Unfortunately, this is Linux command line based, so if you don't understand a word of this, let me know, I'll try to help.

I wrote a tiny perl script which takes FON's CSV POI list and converts it into SQL statements suitable to being fed to sqlite3.

Thus, you obviously need perl and the sqlite command line tool.

The script is the following. Let's call it csv2sql:
Code:
#!/usr/bin/perl -w

print "PRAGMA synchronous=off;\n";

print "DELETE FROM poi WHERE cat_id=(SELECT cat_id FROM category WHERE label=\"FON\");\n";

while(<>) {
  my ($lat, $lon, $addr);
  if (!(($lon,$lat,$addr) = /(-?[\d.]+),(-?[\d.]+),"([^"]+)"/)) {
    print STDERR "Could not parse:\n$_";
    next;
  }

  #print "Lon: $lon\nLat: $lat\nAddr: $addr\n\n";
  print "INSERT INTO poi (lat,lon,label,cat_id) VALUES ($lat,$lon,\"$addr\",(SELECT cat_id FROM category WHERE label=\"FON\"));\n";
}
Then, the procedure is:

Danger: This will remove any POIs which are in the "FON" category before the new ones are added.
  1. Create a new category "FON" in maemo-mapper if you haven't done so earlier.
  2. Quit maemo-mapper.
  3. Copy your poi.db file (look into maemo-mapper's settings dialogue if you can't find it) to a Linux PC.
  4. Make a backup copy of your poi.db -- just in case...
  5. Code:
    cat FON*.csv | ./csv2sql | sqlite3 poi.db
  6. Copy poi.db back to your tablet.


I hope it works for you. In case of questions, let me know!

Tilman

Last edited by tvogel; 2008-03-17 at 16:00. Reason: replaced script and instructions by a slightly simpler version
 

The Following 3 Users Say Thank You to tvogel For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 02:53.