{"id":13413006,"url":"https://github.com/jorelosorio/web-mercator-projection","last_synced_at":"2025-05-07T20:04:27.632Z","repository":{"id":57659157,"uuid":"470739299","full_name":"jorelosorio/web-mercator-projection","owner":"jorelosorio","description":"A Go project to explore the math to calculate and present data in a map using the `Web Mercator Projection`","archived":false,"fork":false,"pushed_at":"2022-03-24T20:30:37.000Z","size":3475,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-07-31T20:51:47.179Z","etag":null,"topics":["geolocation","geospatial","golang","golang-library","google-mercator-projection","image-processing","imagemagick","map","maps","openstreetmap","web-mercator"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jorelosorio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-16T20:19:56.000Z","updated_at":"2024-05-13T23:39:48.000Z","dependencies_parsed_at":"2022-09-08T01:10:39.695Z","dependency_job_id":null,"html_url":"https://github.com/jorelosorio/web-mercator-projection","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jorelosorio%2Fweb-mercator-projection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jorelosorio%2Fweb-mercator-projection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jorelosorio%2Fweb-mercator-projection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jorelosorio%2Fweb-mercator-projection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jorelosorio","download_url":"https://codeload.github.com/jorelosorio/web-mercator-projection/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252949271,"owners_count":21830151,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["geolocation","geospatial","golang","golang-library","google-mercator-projection","image-processing","imagemagick","map","maps","openstreetmap","web-mercator"],"created_at":"2024-07-30T20:01:32.248Z","updated_at":"2025-05-07T20:04:27.234Z","avatar_url":"https://github.com/jorelosorio.png","language":"Go","funding_links":[],"categories":["Geographic","地理"],"sub_categories":["Search and Analytic Databases","检索及分析资料库","Advanced Console UIs"],"readme":"# Web Mercator Projection\n\n[![Tests](https://github.com/jorelosorio/web-mercator-projection/actions/workflows/tests.yml/badge.svg)](https://github.com/jorelosorio/web-mercator-projection/actions/workflows/tests.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/jorelosorio/web-mercator-projection)](https://goreportcard.com/report/github.com/jorelosorio/web-mercator-projection)\n[![Coverage Status](https://coveralls.io/repos/github/jorelosorio/web-mercator-projection/badge.svg?branch=main)](https://coveralls.io/github/jorelosorio/web-mercator-projection?branch=main)\n[![Go Reference](https://pkg.go.dev/badge/github.com/jorelosorio/web-mercator-projection.svg)](https://pkg.go.dev/github.com/jorelosorio/web-mercator-projection)\n\n![WorldMap](https://github.com/jorelosorio/web-mercator-projection/blob/main/assets/cover.png?raw=true)\n\nA Go project to explore the `Math` to calculate and present data in a map using the `Web Mercator Projection`.\n\n\u003e To get more information about this topic, please look at the following references: \n\n- https://en.wikipedia.org/wiki/Web_Mercator_projection\n- https://www.maptiler.com/google-maps-coordinates-tile-bounds-projection/#3/15.00/50.00\n- https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames\n\n## How does this project work?\n\nIn the main example project, there is a file `main.go` that contains the following actions available:\n\n- Convert a `LonLat` into a `Point` coordinates and vice versa.\n\n- A function to add a `Red-Marker` into a map image. (The coordinates must be setted manually in the code)\n    \u003e The resultant image will be stored in a folder named `data`.\n\nThis is how the `main.go` will print out the information:\n\n    LonLat: {-74.92010258781309 11.045882360336755}\n    Point: {298.8939304168872 480.38414652354516 2}\n    Tile: {1 1 2}\n    LonLat from Point: {-74.9201025878131 11.045882360336744}\n\n### Structs definitions\n\n- `LonLat`: A location in the map using angles in degrees.\n- `Point`: A pixel in the map for a specific zoom or scale.\n- `Tile`: Represent at which (tile/block) a Point or LonLat is.\n\n\u003e 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\n\n## Tools\n\n- GoLang `1.17`\n- Docker\n- ImageMagick `6.9.11-60`\n- Visual Studio Code `Optional!`\n    \u003e It requires a `Remote - Containers` extension. for more information please refers to: https://code.visualstudio.com/docs/remote/containers#_getting-started\n\n## Development\n\nThis project contains a `Dockerfile` file with all required dependencies to run it using `Visual Studio Code` + `Remote - Containers` extension.\nHowever, if you want to make it run locally in your development machine, please follow the instructions below.\n\n### Install Go\n\nInstall it from https://go.dev/dl/\n\n### Install ImageMagick\n\nInstall it using the following instructions https://imagemagick.org/script/download.php\n\n### Build the executable\n\n    go build ./examples/main.go\n\n\u003e The binary file depends on the `assets` folder to build the map, make sure to have it on the same directory.\n\n## Licences and assets\n\n- `OpenStreetMap` data is licenced under the Open Data Commons Open Database Licence (ODbL). https://opendatacommons.org/licenses/odbl/1-0/\n\n- `Red marker icon` https://www.iconfinder.com/icons/299087/marker_map_icon Creative Commons (Attribution 3.0 Unported) http://creativecommons.org/licenses/by/3.0/","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjorelosorio%2Fweb-mercator-projection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjorelosorio%2Fweb-mercator-projection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjorelosorio%2Fweb-mercator-projection/lists"}