Automated the Map Updates

Automated the Map Updates

As detailed in a previous blog post “Making the map track-only” I cleaned up the KML to reduce the size I have the Google Maps API process.

I automated the processing. The source system updates four times a day in batch on a not exactly regular schedule, so I pull it hourly, compare the data points against the last-processed data points and if I have new ones I process them. It works like a charm.

I want to split out the tracks in a chapter/posts approach, so I thought I’d split out the KML in markers (as it doesn’t change), track, and location (as it won’t be on this track in a next “chapter”). After all, he said, the Google Maps API can take multiple KML files. Hah!

Several hours later I would say the API is finicky in the format and attributes it wants and doesn’t like multiple separate KMLs that much.

So, I tweaked the script that created the location and track files and had it also spit out an integrated one that holds the markers, last position, and the track.

It’s easy to split to a new track once that’s necessary and save off this one but I’ll deal with that when Vingilótë gets to Saint Helena (spoiler alert: looks like Tuesday).

2 comments on “Automated the Map Updates
  1. Do map updates make one vulnerable to pirates?

    • Edwin Voskamp says:

      I’m not too concerned where she is now, but it is a valid concern. There are two cases where it seems pirates targeted a boat blogging on their YouTube channel about being in a remote bay by themselves.

      The updates are delayed by several hours, which makes for a lot of ocean to search for a small boat.

      Before she gets to the Caribbean, I’ll build in a delay and stop reporting before she stops moving, then dump that once she moves on.

      After the Caribbean the reporting’ll change: I’m working on a Raspberri Pi 4 that reads the bus on the boat and streams the data up to the server delayed and with a buffer in space/time before stopping moving and after starting moving again.

Leave a Reply

Your email address will not be published. Required fields are marked *