https://github.com/daguich/mapgen
https://github.com/daguich/mapgen
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/daguich/mapgen
- Owner: DaGuich
- Created: 2022-09-23T17:47:14.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-04T20:44:30.000Z (over 3 years ago)
- Last Synced: 2025-06-10T00:05:14.224Z (12 months ago)
- Language: Rust
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Information
# Usage
## Import Data
## Generate one Tile
## Generate multiple tiles
## Run tile server
# Implementation Details
## Format of imported data
## Formulas used
### Retrieve Tile
For a latitude $\varphi$ and a longitude $\lambda$, both in radians, we can
calculate the n_th tile in $x$ and $y$ direction for a given zoom level $z$.
$$
x = \lfloor {\varphi + \pi \over 2\pi} \cdot 2^{z} \rfloor
$$
$$
y = \lfloor (1 - {\ln ( \tan \varphi + {1 \over \cos \varphi}) \over \pi}) \cdot 2^{z-1} \rfloor
$$
### Get bounding box of tile