Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/DaveKram/coord_transforms
Rust crate for performing coordinate transforms
https://github.com/DaveKram/coord_transforms
coordinate-systems coordinates rust rust-lang rust-library
Last synced: 8 days ago
JSON representation
Rust crate for performing coordinate transforms
- Host: GitHub
- URL: https://github.com/DaveKram/coord_transforms
- Owner: DaveKram
- Created: 2017-09-30T23:36:44.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-06-22T20:06:15.000Z (5 months ago)
- Last Synced: 2024-09-17T22:47:15.140Z (about 2 months ago)
- Topics: coordinate-systems, coordinates, rust, rust-lang, rust-library
- Language: Rust
- Size: 64.5 KB
- Stars: 32
- Watchers: 4
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-rust-cn - DaveKram/coord_transforms - d, 3-d, and geospatial) [<img src="https://api.travis-ci.org/DaveKram/coord_transforms.svg?branch=master">](https://travis-ci.org/DaveKram/coord_transforms) (Libraries / Geospatial)
- awesome-rust - DaveKram/coord_transforms - d, 3-d, and geospatial) [<img src="https://api.travis-ci.org/DaveKram/coord_transforms.svg?branch=master">](https://travis-ci.org/DaveKram/coord_transforms) (Libraries / Geospatial)
- awesome-rust - DaveKram/coord_transforms - d, 3-d, and geospatial) (Libraries / Geospatial)
- awesome-rust-cn - DaveKram/coord_transforms
- awesome-georust - coord_transforms - Rust crate for performing coordinate transforms. (Watchlist)
- awesome-rust-zh - DaveKram/coord_transforms - 坐标转换(2-d,3-d 和地理位置)[<img src="https://api.travis-ci.org/DaveKram/coord_transforms.svg?branch=master">](https://travis-ci.org/DaveKram/coord_transforms) (库 / 地理位置)
- awesome-rust - DaveKram/coord_transforms - d, 3-d, and geospatial) [<img src="https://api.travis-ci.org/DaveKram/coord_transforms.svg?branch=master">](https://travis-ci.org/DaveKram/coord_transforms) (库 Libraries / 地理空间 Geospatial)
README
## Synopsis
A Rust crate use for performing coordinate transformations. The crate relies on nalgebra vectors to perform the coordinate transformations.
[![Build Status](https://travis-ci.org/DaveKram/coord_transforms.svg?branch=master)](https://travis-ci.org/DaveKram/coord_transforms)
## Code Example
```
let ellipsoid = geo_ellipsoid::geo_ellipsoid::new(geo_ellipsoid::WGS84_SEMI_MAJOR_AXIS_METERS,
geo_ellipsoid::WGS84_FLATTENING);
let lla_vec: Vector3 = Vector3::new(3.0, 4.0, 5.0);
let ecef_vec = lla2ecef(&lla_vec, &ellipsoid);
assert_approx_eq!(ecef_vec.x, 4127585.379918784);
assert_approx_eq!(ecef_vec.y, 4779006.1975849345);
assert_approx_eq!(ecef_vec.z, 894117.5572814466);
```## Features
* Simple, one line function calls to convert from one coordinate system to another
* Common geodetic models provided for geodetic coordinate transformations
* Uses nalgebra (widely used linear algebra crate)## Suggestions for use
* Use [Rayon!](https://github.com/rayon-rs/rayon "Rayon Github") Rayon allows for easy parallelization - which coordinate transformations are an ideal candidate for. Take a look at examples/benchmarking for an example.
## Roadmap / Ideas
* Asserts/Option return for invalid input data
## Examples
There are very early work in progress examples being built. These contain basic examples, benchmarking, and other types of examples to help aid in use of the crate. To run an example from the /examples directory:
```
cargo run --release --example
```## License
Copyright (c) 2017 David Kramer
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.