Home

Awesome

Web Mercator Projection

Tests Go Report Card Coverage Status Go Reference

WorldMap

A Go project to explore the Math to calculate and present data in a map using the Web Mercator Projection.

To get more information about this topic, please look at the following references:

How does this project work?

In the main example project, there is a file main.go that contains the following actions available:

This is how the main.go will print out the information:

LonLat: {-74.92010258781309 11.045882360336755}
Point: {298.8939304168872 480.38414652354516 2}
Tile: {1 1 2}
LonLat from Point: {-74.9201025878131 11.045882360336744}

Structs definitions

If you are curious about how the maps where built using the data in OpenStreetMap please take a look at this Gist https://gist.github.com/jorelosorio/7042bd27e4b2bb03865215d6a5607266

Tools

Development

This project contains a Dockerfile file with all required dependencies to run it using Visual Studio Code + Remote - Containers extension. However, if you want to make it run locally in your development machine, please follow the instructions below.

Install Go

Install it from https://go.dev/dl/

Install ImageMagick

Install it using the following instructions https://imagemagick.org/script/download.php

Build the executable

go build ./examples/main.go

The binary file depends on the assets folder to build the map, make sure to have it on the same directory.

Licences and assets