maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   gmaps "my places" -> maemo mapper POI (https://talk.maemo.org/showthread.php?t=11323)

Johnx 2007-11-04 04:25

HOWTO: gmaps "my places" -> maemo mapper POI
 
I have a lot of POIs in google maps and google earth and I thought it would be cool to get those imported into Maemo Mapper in the most automated way possible. It turns out the setup was a little more difficult than I originally thought but I have it mostly sorted out at this point so I figured I'd share it here and see if other people had thoughts on how to refine it. All this is from a Linux perspective but most of it should apply to Mac OS and a lot of it should be applicable to Windows.

0. Requirements:
gpsbabel - http://www.gpsbabel.org/ -or- find it in your Linux distribution's repository
GMapToGPX bookmarklet - http://www.elsewhere.org/journal/gmaptogpx/
1. go to google maps and add a location to your "My Places" tab
2. Click on the GMapToGPX and when it prompts you click the link to download the KML file
3. When you have the KML file on your computer run this command:
Code:

gpsbabel -c utf8 -i kml -f my-places.kml -o gpx -F maemo-mapper-poi.gpx
4. Copy the resulting .gpx file to your tablet
5. Open Maemo Mapper, click on the main menu, POI -> Import...
6. Find the gpx file and away you go!

Notes: Initially Maemo Mapper didn't want to import my .gpx file but it was created from a google maps "My Places" that had pictures, html, custom icons and polylines. I have no idea what part Maemo Mapper didn't like.

EDIT: I refined the script a little so it ... uhm, actually worked (for me at least).
Code:

#!/bin/sh

kml_file="$1"
tmpdir=/tmp
gpsbabel -c utf8 -i kml -f "$kml_file" -o gpx -F $tmpdir/maemo-mapper-poi.gpx
scp $tmpdir/maemo-mapper-poi.gpx user@May:/media/mmc2/Downloads
rm $tmpdir/maemo-mapper-poi.gpx "$kml_file"

read -p "Hit enter to close the terminal." placeholder

NOTE: I have openssh-server running on my tablet (May) and have ssh setup to use passwordless/public key-based authentication so that it won't prompt me for a password.

If anyone has questions or wants me to clear this up, just leave a comment.

-John

qole 2007-12-28 05:04

Re: gmaps "my places" -> maemo mapper POI
 
Just wanted to point out that gpsbabel is available in maemo garage. Theoretically you could do this entire process on the tablet itself. I haven't tried it myself yet; I'm planning to experiment with the reverse -- exporting Maemo Mapper tracks to Google Maps over the next few days. If I get it working, I'll report back.

Edit: I can't seem to import tracks or waypoints into "My Maps," it looks like I would have to convert the track to a "placemark" with a "linestring" consisting of "coordinates" which are just a long list of latitude, longitude, altitude separated with carriage returns.

Sigh. :( :mad:

Edit 2: This may not be my problem at all.

rcull 2007-12-28 13:10

Re: gmaps "my places" -> maemo mapper POI
 
If you need to do this ( and lots more :-) ) see Poi_Loader

http://www.internettablettalk.com/fo...?t=5148&page=5

Johnx 2007-12-28 13:15

Re: gmaps "my places" -> maemo mapper POI
 
POI loader looks really nice if you have a Windows machine to run it on. My main motivation for setting this up was that it would work in a Linux/MacOSX only environment. Looks nice though.

-John

qole 2007-12-29 21:03

Re: gmaps "my places" -> maemo mapper POI
 
OK, I confirm that gpsbabel runs on the N800 under OS2008, so you can do your translating entirely on the tablet.

To finish my MM -> GM post (the reverse of the OP):

Google maps seems to have a low point threshhold, forcing those who wish to upload tracks to GM to simplify the track. I found that 50 points works, but I haven't tried other settings.

I typed the following commands into my N800's terminal. I have gpsbabel installed and I was in the directory with the saved Maemo Mapper GPS track (maemomapper-track.gmx).

Step 1: Simplify the track (keep in GPX format)

gpsbabel -t -i gpx -f maemomapper-track.gmx -x simplify,count=50 -o gpx -F mm-track-50.gpx

Step 2: convert to KML (Google Earth format)

gpsbabel -t -i gpx -f mm-track-50.gpx -o kml -F mm-track-50.kml

Step 3: Upload mm-track-50.kml to Google Maps

EDIT: ALTERNATE METHOD:

Load your MM track directly into Google Earth. Export KML. Import into GM. Here is a link to my successful import.

ajturner 2007-12-29 21:36

Re: gmaps "my places" -> maemo mapper POI
 
Alternatively, bergie and I wrote some python scripts to convert directly from GeoRSS feeds to MaemoMapper POI. It's part of the GeoClue project, so there is preliminary usage of the GeoClue api to get your current location. You can remove this if you want. We have a much more updated one that does automatic feed update whenever you change positions as well.

http://projects.highearthorbit.com/g.../georss2poi.py
http://projects.highearthorbit.com/g.../feedparser.py

Google MyMaps doesn't have GeoRSS output, but you can pass it through Mapufacture, which will convert from KML to GeoRSS, and then just run this script to have it populate your POI database.

Or someone could modify the script to consume KML instead.

IntrepidAnitpodean2 2008-01-02 21:47

Re: gmaps "my places" -> maemo mapper POI
 
Quote:

Originally Posted by qole (Post 117461)
OK, I confirm that gpsbabel runs on the N800 under OS2008, so you can do your translating entirely on the tablet.

How did you get GPSBabel to install on OS2008? I've been to the project page (https://garage.maemo.org/frs/?group_...release_id=952), found the 2206 and 2007 versions so I tried the latter. It downloaded by Application Manager told me it was an incompatible package.

GPSBabel is going to be nearly essential for me in three months time. Having access to that tool as I walk was half the reason for buying a N810.

qole 2008-01-03 17:25

Re: gmaps "my places" -> maemo mapper POI
 
Quote:

Originally Posted by IntrepidAnitpodean2 (Post 119532)
How did you get GPSBabel to install on OS2008? I've been to the project page (https://garage.maemo.org/frs/?group_...release_id=952), found the 2206 and 2007 versions so I tried the latter. It downloaded by Application Manager told me it was an incompatible package.

GPSBabel is going to be nearly essential for me in three months time. Having access to that tool as I walk was half the reason for buying a N810.

Ok, I confess that I didn't install the gpsbabel version in the Garage. I went to the Debian repositories and downloaded the Sid armel package. I then used dpkg-deb to extract everything into a directory on my N800.

dpkg-deb -x gpsbabel_1.3.3-2_armel.deb gpsbabel-install

This creates a directory called "gpsbabel-install" with all of the files.

As root, copy gpsbabel-install/usr/bin/gpsbabel to /usr/bin and you've got GPSBabel running under OS2008.

A bonus of doing it this way is that you now have all of the GPSBabel manual as well. Use the file manager to browse to the gpsbabel-install dir and then double click on any of the html files in

gpsbabel-install/usr/share/doc/gpsbabel/htmldocs-1.3.3/

Hope that helped you! I assume in the guide above that you know how to become root. If you don't you'll have to search the forums for help.

IntrepidAnitpodean2 2008-01-03 19:40

Re: gmaps "my places" -> maemo mapper POI
 
You sir, are a gentleman and a scholar. Much appreciated. I think I will also try this approach with some other apps that I think OS2008 is missing. Cheers dude.

IntrepidAnitpodean2 2008-01-04 04:32

Re: gmaps "my places" -> maemo mapper POI
 
Hmm, I may have spoken too soon. I have it installed but when I run the one action I need the process tuns just about forever and then gets killed, presumably by something within OS2008 that decides the process will never end. This is what I run

gpsbabel -i nmea -f GPSXX005.nmea -o kml -F GEPXX005.kml

(the test file is definitely there and only 94kb)

I was hoping that some others here might have enough experience with gpsbabel to tell me if I am doing something obviously wrong experience with OS2008 to know what it gives up on the process.


All times are GMT. The time now is 00:06.

vBulletin® Version 3.8.8