Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vlopes11/geomorph
Rust implementation to simply convert between coordinate systems
https://github.com/vlopes11/geomorph
Last synced: about 1 month ago
JSON representation
Rust implementation to simply convert between coordinate systems
- Host: GitHub
- URL: https://github.com/vlopes11/geomorph
- Owner: vlopes11
- License: mit
- Created: 2018-06-04T06:49:48.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-09-13T19:59:05.000Z (5 months ago)
- Last Synced: 2025-01-13T20:09:59.002Z (about 1 month ago)
- Language: Rust
- Homepage: https://crates.io/crates/geomorph
- Size: 41 KB
- Stars: 14
- Watchers: 3
- Forks: 7
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-rust-cn - vlopes11/geomorph - ci.org/vlopes11/geomorph.svg?branch=master">](https://travis-ci.org/vlopes11/geomorph) (Libraries / Geospatial)
- awesome-rust - vlopes11/geomorph - ci.org/vlopes11/geomorph.svg?branch=master">](https://travis-ci.org/vlopes11/geomorph) (Libraries / Geospatial)
- awesome-rust - vlopes11/geomorph
- awesome-rust-cn - vlopes11/geomorph
- awesome-rust-zh - vlopes11/geomorph - UTM,LatLon 和 MGRS 坐标之间的转换[<img src="https://api.travis-ci.org/vlopes11/geomorph.svg?branch=master">](https://travis-ci.org/vlopes11/geomorph) (库 / 地理位置)
- awesome-rust - vlopes11/geomorph - ci.org/vlopes11/geomorph.svg?branch=master">](https://travis-ci.org/vlopes11/geomorph) (库 Libraries / 地理空间 Geospatial)
README
# Geomorph
[![Build Status](https://travis-ci.org/vlopes11/geomorph.svg?branch=master)](https://travis-ci.org/vlopes11/geomorph)
[![Latest version](https://img.shields.io/crates/v/geomorph.svg)](https://crates.io/crates/geomorph)
[![Documentation](https://docs.rs/geomorph/badge.svg)](https://docs.rs/geomorph)Simple conversion between different coordinate systems without external wrappers injection
# Example
```rust
use geomorph::{Coord, Mgrs, MgrsPrecision, Utm};let lat: f64 = -23.0095839;
let lon: f64 = -43.4361816;let coord = Coord::new(lat, lon);
let utm = Utm::from(coord);
let mgrs = Mgrs::from_latlon(lat, lon);println!("coord: {}", coord);
println!("utm: {}", utm);
println!(
"mgrs precision 10km: {}",
mgrs.with_precision(MgrsPrecision::P10km)
)
```