Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mange/googleprojection-rs
Project world- or screen-space coordinates for use in Google Maps tiles
https://github.com/mange/googleprojection-rs
Last synced: 14 days ago
JSON representation
Project world- or screen-space coordinates for use in Google Maps tiles
- Host: GitHub
- URL: https://github.com/mange/googleprojection-rs
- Owner: Mange
- License: apache-2.0
- Created: 2016-09-19T17:32:35.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-09-09T09:50:21.000Z (over 5 years ago)
- Last Synced: 2024-12-17T18:09:14.527Z (18 days ago)
- Language: Rust
- Homepage: https://mange.github.io/googleprojection-rs/
- Size: 583 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: Changelog.md
- License: LICENSE
Awesome Lists containing this project
README
# `googleprojection-rs`
[![Build Status](https://travis-ci.org/Mange/googleprojection-rs.svg?branch=master)](https://travis-ci.org/Mange/googleprojection-rs)
An implementation of "Google Projection" ([WebMercator][webmercator]) in Rust. It projects lat/long coordinates into screenspace pixels and back again for use when building a tileserver that works with Google Maps, among others.
It's a port of Go [code found in the `fawick/go-mapnik` project on GitHub][original-impl], in turn implemented from OpenStreetMap `generate_tiles.py`.
## Usage
Import the `googleprojection` crate and use the public functions `from_ll_to_pixel` and `from_pixel_to_ll` on it. You can also use the `Mercator` struct if you need custom tile sizes. See [API documentation][api-docs] and tests for more details.
## License
This code is released under Apache License 2.0. See `LICENSE` file.
Based on `go-mapnik`, released under the MIT license.
Google and the Google Logo are registered trademarks of Google Inc.
[webmercator]: https://en.wikipedia.org/wiki/Web_Mercator
[original-impl]: https://github.com/fawick/go-mapnik/blob/master/maptiles/googleprojection.go
[api-docs]: https://mange.github.io/googleprojection-rs/