Replacing coordinates with MGRS

Alternative geolocation resource identifier for link building and cache strategy

One of the problems I have experienced while working on GO2CINEMA is how to describe a geolocation in the URLs. Coordinates (latitude, longitude) does not sound like a good solution because:

  • Describing a geographic location at ~1M precision requires 5 decimal places. This makes for a long string, e.g. 51.52286,-0.22673.
  • Representation of coordinates is non-standardised. It can be 51.52286,-0.22673 (where it is unclear whether the data is in the latitude, longitude format or the vice-versa) or it can be any number of other formats (e.g. using query string).

The same issues can be extended to creating a resource identifier as part of the caching strategy.

MGRS

MGRS (Military Grid Reference System) is the geocoordinate standard used by NATO militaries forlocating points on the earth. MGRS divides the entire earth surface into “grid squares” down to 1 m precision.

Location is referenced using a single identifier, e.g. 1 m precision identification 4QFJ1234567890 (14 characters) is equivalent to 21.30944,-157.91681 (19 characters).

MGRS have the following benefits over the coordinates:

  • Identifier consists only of alphanumeric characters (case-insensitive).
  • Identifier’s length is constant (for a set precision).
  • It is approx. 20% shorter.

SEO

Using MGRS allows to construct URLs that incorporate geolocation reference. Here is an example of URLs describing showtimes for different geolocation:

The only significant part of the URL is the last segment, which is the MGRS location identifier.

Development

MGRS can be converted to coordinates and back. If you are developing using Node.js, I recommend the mgrs package by Calvin Metcalf and Andreas Hocevar.

I am using it as such:

Bonus

When debugging, it is worth knowing that Google Maps support MGRS, e.g. https://www.google.co.uk/maps/search/4QFJ1234567890

Can you help me with GO2CINEMA?

GO2CINEMA is my baby. I love working working on it 😍. However, it is my first startup this decade and there are a lot of things I need help with.

If you can give feedback, an SEO advice, a business advice, know an angel investor, know someone who can write an article about GO2CINEMA, make a tweet, invite me to a conference, a radio talk show, etc. or just want to express your support/ curiosity and say “Hi!”, email me at gajus@gajus.com or DM via Twitter, https://twitter.com/kuizinas.

Written by

Software architect, startup adviser. Editor of https://medium.com/applaudience. Founder of https://go2cinema.com.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store