Reply
Thread Tools
Fionn's Avatar
Posts: 178 | Thanked: 53 times | Joined on Jul 2007 @ Ireland
#1
The title pretty much says it all.

I'm trying to import gpx maps into maemo mapper using a combination of plotting routes on the likes of Gmap Pedometer and Bike Route Toaster and then using GMapToGPX to convert the results into gpx files.

I then edit the resulting gpx file to rename element names to more maemo-mapper friendly element names.
So <rte> becomes <trk> and <rtept> becomes <trkpt> using a simple find and replace in any text editor.

Unwanted <ele>0</ele> nodes are stripped out again using a find and replace.

However I'm left with a load of <name> Turn # </name> nodes where # is a number starting with 1 and goes on sequentially.
If there's a lot of turns it's painful to delete them manually.

Hence my requirement for a text editor that supports wildcard find and replace.
 
nowave7's Avatar
Posts: 245 | Thanked: 62 times | Joined on Jan 2009 @ Bad Homburg, Deutschland
#2
Sed, and awk, and grep come to mind in a bash script... Of course regular expressions are obligatory.
__________________
Save the whales, feed the hungry, free the mallocs!
 
Fionn's Avatar
Posts: 178 | Thanked: 53 times | Joined on Jul 2007 @ Ireland
#3
Learning regular expressions is more effort that I'm prepared to put in for this though. It's a bit like using a sledgehammer to open a peanut from my perspective.
Of course you're right in that it would be an ideal tool for what I'm trying to do but the learning curve seems steep and off-putting at the moment for me.
 
Posts: 271 | Thanked: 220 times | Joined on Sep 2009
#4
running on what OS?
 
Fionn's Avatar
Posts: 178 | Thanked: 53 times | Joined on Jul 2007 @ Ireland
#5
Originally Posted by texaslabrat View Post
running on what OS?
XP, Mac OS X 10.4 (Tiger) or Xubuntu .
 
Posts: 271 | Thanked: 220 times | Joined on Sep 2009
#6
for XP, I'd suggest notepad++.
 

The Following 2 Users Say Thank You to texaslabrat For This Useful Post:
Posts: 271 | Thanked: 220 times | Joined on Sep 2009
#7
Jedit is pretty powerful as well, and is cross-platform. I prefer notepad++ though personally.
 
nowave7's Avatar
Posts: 245 | Thanked: 62 times | Joined on Jan 2009 @ Bad Homburg, Deutschland
#8
Not sure as notepad++ could do this (it could using regex, but no regex allowed ). M$ Word has an option to find wildcards, so if you have that on Win or OS X you could try that if you dont want to learn regex.
__________________
Save the whales, feed the hungry, free the mallocs!
 

The Following User Says Thank You to nowave7 For This Useful Post:
Fionn's Avatar
Posts: 178 | Thanked: 53 times | Joined on Jul 2007 @ Ireland
#9
Originally Posted by nowave7 View Post
Not sure as notepad++ could do this (it could using regex, but no regex allowed ). M$ Word has an option to find wildcards, so if you have that on Win or OS X you could try that if you dont want to learn regex.
I tried the M$ Word route but it only opened the data and not the full gpx file (using Word 2003).

It's looking like I'm gonna have to bite the bullet on the regex if I want to crack this.
Unfortunately regex is looking a bit like Mandarin to me at the moment . Guess I'll just have to persevere. How hard can it be.
 
Fionn's Avatar
Posts: 178 | Thanked: 53 times | Joined on Jul 2007 @ Ireland
#10
Originally Posted by Fionn View Post
How hard can it be.
Seemingly not that hard at all .



Thanks for the help and pointers .
 
Reply


 
Forum Jump


All times are GMT. The time now is 12:56.