-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update edition, metadata, README, dependencies (#51)
* Update README, metadata, and edition * Update CHANGELOG.md Co-authored-by: Michael Kirk <[email protected]> --------- Co-authored-by: Michael Kirk <[email protected]>
- Loading branch information
1 parent
694ca02
commit 2b360f5
Showing
3 changed files
with
29 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,13 @@ | |
name = "polyline" | ||
description = "Encoder and decoder for the Google Encoded Polyline format" | ||
version = "0.10.2" | ||
authors = ["Tom MacWright <[email protected]>", "The GeoRust Developers <[email protected]>"] | ||
repository = "https://github.com/georust/polyline" | ||
documentation = "https://docs.rs/polyline/" | ||
readme = "README.md" | ||
keywords = ["polyline", "geo"] | ||
keywords = ["polyline", "geo", "gis"] | ||
license = "MIT/Apache-2.0" | ||
edition = "2018" | ||
edition = "2021" | ||
categories = ["science::geo"] | ||
|
||
[dependencies] | ||
geo-types = "0.7.8" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,28 @@ | ||
# polyline | ||
|
||
[![Crates.io](https://img.shields.io/crates/d/polyline.svg?maxAge=2592000?style=plastic)](https://crates.io/crates/polyline) | ||
[![Build Status](https://travis-ci.org/georust/polyline.svg?branch=master)](https://travis-ci.org/georust/polyline) | ||
[![polyline](https://avatars1.githubusercontent.com/u/10320338?v=4&s=50)](https://github.com/georust) | ||
|
||
Google Encoded Polyline encoding & decoding in Rust. | ||
[![polyline on Crates.io](https://img.shields.io/crates/v/polyline.svg?color=brightgreen)](https://crates.io/crates/polyline) | ||
[![Documentation](https://img.shields.io/docsrs/polyline/latest.svg)](https://docs.rs/polyline) | ||
[![Discord](https://img.shields.io/discord/598002550221963289)](https://discord.gg/Fp2aape) | ||
|
||
## A Note on Coordinate Order | ||
Fast Google Encoded Polyline encoding & decoding in Rust. | ||
|
||
This crate uses `Coord` and `LineString` types from the `geo-types` crate, which encodes coordinates in `(x, y)` order. The Polyline algorithm and first-party documentation assumes the _opposite_ coordinate order. It is thus advisable to pay careful attention to the order of the coordinates you use for encoding and decoding. | ||
# Example | ||
```rust | ||
use polyline; | ||
use geo_types::line_string; | ||
let coord = line_string![(x: -120.2, y: 38.5), (x: -120.95, y: 40.7), (x: -126.453, y: 43.252)]; | ||
let output = "_p~iF~ps|U_ulLnnqC_mqNvxq`@"; | ||
let result = polyline::encode_coordinates(coord, 5).unwrap(); | ||
assert_eq!(result, output) | ||
``` | ||
|
||
# A Note on Coordinate Order | ||
|
||
This crate uses `Coord` and `LineString` types from the `geo-types` crate, which encodes coordinates in `(x, y)` / `(lon, lat)` order. The Polyline algorithm and its first-party documentation assumes the _opposite_ coordinate order. It is thus advisable to pay careful attention to the order of the coordinates you use for encoding and decoding. | ||
|
||
[Documentation](https://docs.rs/polyline/) | ||
|
||
## FFI | ||
# FFI | ||
C-compatible FFI bindings for this crate are provided by the [polyline-ffi](https://crates.io/crates/polyline-ffi) crate. |