Replied to https://quickthoughts.jgregorymcverry.com/2019/06/29/johnjohnston-getting-mad-love-in-the-indieweb by Greg McVerryGreg McVerry (Quick Thoughts)
@johnjohnston getting mad love in the #IndieWeb summit for all of his Flickr tools as we think about making trip tracking posts.

Thanks Greg, I presume the walkmaps. I have hope to build different views of these and eventually to bring them into WordPress in someway. What I like about flickr is that its API is easy for amateurs to play with. Amazing resource.

I’ve been using the PeakFinder app for a month or two now. It is a nice app for showing what hills are in view. Basically it give a ‘live’ wireframe of hilsl from your location or anywhere you like. All the features are listed PeakFinder App.

Today I opened the app and it must have been updated, because it gave me a message saying:

Augmented reality
For a long time many of you have asked for an option to combine the image of the camera with the panorama drawing. l’ve finally implemented this feature in this newest version and so PeakFinder now also supports true augmented reality.

This is quite amazing, and in my tests it works a treat.

I think this is the first AR I’ve seen that makes be think this could really be useful and soon. It is not much of a stretch to imagine a botany app that can recognise flowers.

What is cool about peakfinder is that the data is loaded so that you do not need a connection to use the application.

I occasionally make simple mashup of of gpx, google maps and flickr photos of walks. I record gpx on the Trails app on my phone, take photos with the phone too as they are nicely geo tagged and flickr  can use that information and provide in the API 1.

One of the things I noticed was that the GPX files can be pretty big, over a megabyte each. I know there was probably a lot of information in the file that was not needed to display the path on the map but was not sure of how to do so easily. I think I’ve used online services for this before. Finding a site, uploading a file and downloading is a lot of bother for something that I hope will be quick and simple. I also expect that the audience for the pages produced is one.

Having a look inside the gpx files I though that you could probably slim them down considerably, each point is recorded like this:

<trkpt lat="55.996687" lon="-4.389713"><ele>188.609</ele><time>2016-06-05T10:12:58Z</time><extensions><gpxtpx:TrackPointExtension><gpxtpx:speed>1.30</gpxtpx:speed><gpxtpx:course>206.37</gpxtpx:course></gpxtpx:TrackPointExtension><trailsio:TrackPointExtension><trailsio:hacc>5.00</trailsio:hacc><trailsio:vacc>3.00</trailsio:vacc><trailsio:steps>2</trailsio:steps></trailsio:TrackPointExtension></extensions></trkpt> 

I am pretty sure all we need is:
<trkpt lat="55.996687" lon="-4.389713"><ele>188.609</ele></trkpt>

and that a regular expression could do the trick.

I don’t know anything about RegEx other than I’ve found it offered as a solution when googling text replacement problems but this:

replace: <extensions>.*?</extensions> with nothing
followed by replace: <time>.*?</time> with nothing

I am guessing I could combine these, but it didn’t take long to run through a few files using them in this crude form.

did the trick. My 1MB file was now 160KB

This works both in BBEdit and TextMate. TextMate struggled a bit with the size of the files.

This post will be of little interest to anyone but myself and might just fit in the suchlike bit of this blogs sub title.

Featured Image: two screenshots, layered. my own CC-BY.

1.
I’ve blogged about some of the methods I’ve used before.