googleprojection

Crates.iogoogleprojection
lib.rsgoogleprojection
version1.2.0
sourcesrc
created_at2016-09-22 16:50:24.74517
updated_at2019-09-09 17:39:28.72264
descriptionProject world- or screen-space coordinates for use in Google Maps tiles (WebMercator)
homepage
repositoryhttps://github.com/Mange/googleprojection-rs
max_upload_size
id6591
size29,633
Magnus Bergmark (Mange)

documentation

https://mange.github.io/googleprojection-rs/googleprojection/index.html

README

googleprojection-rs

Build Status

An implementation of "Google Projection" (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, 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 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.

Commit count: 27

cargo fmt