maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   POI's for mapper (https://talk.maemo.org/showthread.php?t=4357)

fldude99 2007-01-27 21:02

POI's for mapper
 
Can anyone point me to where I can get POI's to use in the mapper?

brendan 2007-01-27 23:05

Re: POI's for mapper
 
???

for the most part you create your own Points Of Interest.

if your lucky, someone may have a few speed trap or traffic light camera points, but not much else, i dont think

fldude99 2007-01-28 04:41

Re: POI's for mapper
 
I hate to be so ignorant..but what do you mean..or how..do you create your own points of interest?

gnuite 2007-01-28 06:59

Re: POI's for mapper
 
You can add POIs to your POI database by using the "tap-and-hold" (context) menu on a point on the map and selecting "Location -> Add POI".

Tobler 2007-02-01 18:08

Re: POI's for mapper
 
Hello

I have interesting POI's (KML, CSV, GPX or OV2 format) which should be converted to sqlite .db -format. But how it can be done?
I'd prefer to use Linux PC for conversion and then upload db file to N770.

There are FON WiFi hot-spot POI's what I'd like to get into N770, from maps.fon.com


Thanks,
--
Tobler

rcull 2007-02-01 21:30

Re: POI's for mapper
 
Tobler
I have a small shell script /awk prog to do this. I have downloaded sqlite 2.8.17 ( sqlite3 does not read Maemo Mappers poi.db! ) to my Linux box. I copy poi.db( probably unnecessary) and csv file to the sqlite folder and run :-
./csv2sql WiFi.csv | ./sqlite poi.db 13
where 13 is a category either added or allready there within MM.
The script is as follows :-

Code:

cat "$1"| tr -d "\r" | awk -v Categ="$2" '
BEGIN { FS="," }
{
 Inv="\x27"
 Lat=$2
 Lon=$1
 Label=$3
 Desc=$4
 Sql="INSERT INTO poi(lat,lon,label,desc,cat_id) VALUES("
 Close=");"
 Label = Inv Label Inv
 if ( Desc == "" ) {
  Desc = Inv Inv
 } else {
  Desc = Inv Desc Inv
 }
 printf("%s%s,%s,%s,%s,%s%s \n",Sql,Lat,Lon,Label,Desc,Categ,Close)
}'

The
Code:

tr -d "\r"
is there to remove a troublesome ^M from the original file ( Transferring an MS file to Linux ). The script is only expecting 4 columns of which the last may be blank. It does not correctly handle columns like addresses seperated with commas ie "14 St Johns St, Banbury" but as we have the lat long anyway and accurate Google maps I have not bothered to play with it. In fact I usually just remove the forth column and leave a "," .
As usual 'Use at your oun risk'

Edit: The csv files I have are all in the order "Lon,Lat,Label,Desc" hence the swap of $2 $1. If the other way round make it Lat=$1,Lon=$2

rcull 2007-02-02 16:07

Re: POI's for mapper
 
Please ignore my previous post.
There is now a new version wich will handle csv's much cleaner.

Gnuite Thanks for this app its brilliant. Any chance of adding the ability to use named dbs instead of just poi.db. Maybe just the ability to store a number someware and swap out with poi.db when req'd.
Cheers
Code:

##########################################################################
#
#  Poi csv file converter for Maemo Mapper on Nokia 770/800
#  written by Rick Cull 3/2/2007
#  copywright gpl2
#  Take two parameters :-
#                        poi.csv and Category
#
#      The category must allready be in the poi.db before running this script
#      use context menu/Location/Add Poi - Edit Categories to add any new
#      before running.
########################################################################## 
cat $1|tr -d "\r"|awk -v Categ="$2" '
{
NewString=""
NextChr=""
tmpStr=""
Len=length($0)
Count=1
CountStr=1
while ( Count <= Len ) {
  NextChr=substr($0,Count,1)
  if ( NextChr !~ /"/ ){
    NewString=NewString NextChr
  } else {
    Count=Count + 1
    CountStr=Count
    tmpStr=substr($0,CountStr,1)
    while ( tmpStr !~ /"/ ) {
      if ( tmpStr !~ /,/ ) {
          NewString=NewString tmpStr
      } else {
          NewString=NewString " "
      }
      CountStr=CountStr + 1
      Count=Count + 1
      tmpStr=substr($0,CountStr,1)
    }
  }
  Count=Count + 1
}

split(NewString,Col,",")
Inv=sprintf("\"")
Lat=Col[2]
Lon=Col[1]
Label=Col[3]
Desc=Col[4]
Sql="INSERT INTO poi(lat,lon,label,desc,cat_id) VALUES("
Close=");"
Label = Inv Label Inv
if ( Desc == "" ) {
  Desc = Inv Inv
} else {
  Desc = Inv Desc Inv
}
printf("%s%s,%s,%s,%s,%s%s \n",Sql,Lat,Lon,Label,Desc,Categ,Close)
}'


The attached tarfile is UK pois from Garmin

Edit: The attachments didnt seem to stick.

tebra 2007-02-03 20:50

Re: POI's for mapper
 
GPSBabel tool can be usefull to convert POI into different formats
www.gpsbabel.org

gnuite 2007-02-04 19:19

Re: POI's for mapper
 
Quote:

Originally Posted by rcull (Post 33012)
Gnuite Thanks for this app its brilliant. Any chance of adding the ability to use named dbs instead of just poi.db. Maybe just the ability to store a number someware and swap out with poi.db when req'd.

You can specify the filename of the database file in the Settings dialog box. Is that what you mean?

rcull 2007-02-05 19:34

Re: POI's for mapper
 
Gnuite
Sorry I wasn,t very clear I realise the path can be changed, maybe I have a different usage pattern but would normally change poi sets much more often than I'd change maps. I was thinking of something more like the enable (context/edit poi/edit categories ) list but at a similar level to Maps which would maybe work just the same as now or if there is any size overhead to the poi.db then swap in/out different dbs.

I'm not being picky here I think this is the most usefull prog for the tablet :D :D


All times are GMT. The time now is 17:54.

vBulletin® Version 3.8.8