Skip to content

Commit

Permalink
Minor conversion documentation with usage example.
Browse files Browse the repository at this point in the history
  • Loading branch information
gibbz00 committed Dec 12, 2023
1 parent 6b1b43b commit 0e508eb
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/conversions/axisswap.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Refernce: https://proj.org/en/9.3/operations/conversions/axisswap.html
//! Refernce: <https://proj.org/en/9.3/operations/conversions/axisswap.html>

use crate::*;

Expand Down
14 changes: 14 additions & 0 deletions src/conversions/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
//! Implemented converions
//!
//! Reference: <https://proj.org/en/9.3/operations/conversions>
//!
//! Example:
//! ```
//! use proj4rs::conversions::Conversion;
//!
//! let conversion = Conversion::from_proj_string("+proj=axisswap +order=2,1").unwrap();
//! let mut points = (1., 2., 0.);
//! conversion.convert(&mut points).unwrap();
//! assert_eq!((2., 1., 0.), points);
//! ```

mod conversion;
pub use conversion::Conversion;

Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
//!
//! Note that angular units are in radians, not degrees !
//!
//! Radian is natural unit for trigonometric opérations, like proj, proj4rs use radians
//! Radian is natural unit for trigonometric operations, like proj, proj4rs use radians
//! for its operation while degrees are mostly used as end user input/output.
//!
//! Example:
Expand Down

0 comments on commit 0e508eb

Please sign in to comment.