Comparing Location Codes Around the World
The debate about location codes continues with Google entering the market place with it’s Open Location Codes and MapCode from a Dutch team of former TomTom employees. There is also ubicate.me (which claims to be open source but doesn’t seem to have any code).
What seems to be missing is an easy way to compare the codes that reference a location, so following on from my last blog post I’ve put together a REST service that takes a latitude longitude pair and returns a set of location codes.
I have also provided a demonstration page to allow you to move around and see how the different schemes compare.
I implemented the Google Open Location Code in Java based on the released java script code I’ve submitted a pull request or you can fork my repo.
MapCode provide a Java library - you just need add the following to your pom file:
<dependency> <groupId>com.mapcode</groupId> <artifactId>mapcode</artifactId> <version>2.0.0</version> </dependency>
MGRS is based on code from this repository which builds on the NASA WorldWind base.
The What3Words code is actually quite easy and is available here. The only tricky bit is keeping your API key out of the repository.