-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge wkt repo with history as /wkt dir
This merges the entire history of the wkt repository from https://github.com/georust/wkt/tree/dbd80f22099fc11ad69a1d072c3516f9a1ca4376 as a `/wkt` directory, and adds the CI and adds path links from Crates.toml files: * wkt/Cargo.toml - link to `/geo-types` * geo-test-fixtures/Cargo.toml - link to `/wkt`
- Loading branch information
Showing
23 changed files
with
3,429 additions
and
2 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 |
---|---|---|
@@ -1,8 +1,9 @@ | ||
[workspace] | ||
members = ["geo", "geo-types", "geo-postgis", "geo-test-fixtures"] | ||
members = ["geo", "geo-types", "geo-postgis", "geo-test-fixtures", "wkt"] | ||
|
||
[patch.crates-io] | ||
|
||
# Ensure any transitive dependencies also use the local geo/geo-types | ||
geo = { path = "geo" } | ||
geo-types = { path = "geo-types" } | ||
wkt = { path = "wkt" } |
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Changes | ||
|
||
## 0.10.0 - 2022-02-24 | ||
### Changed | ||
* Now accepts `MULTIPOINT`s with fewer parentheses, as output by `ST_AsText` in postgis: | ||
`MULTIPOINT(0 1, 2 3)` in addition to `MULTIPOINT((0 1), (2 3))` | ||
* BREAKING: Replace `Wkt::items` with `Wkt::item` and remove `Wkt::add_item()`. | ||
* <https://github.com/georust/wkt/pull/72> | ||
* BREAKING: Reject empty strings instead of parsing them into an empty `Wkt`. | ||
* <https://github.com/georust/wkt/pull/72> | ||
* BREAKING: move `Wkt::from_str` to `FromStr` trait. Add `use std::str::FromStr;` to your code to use it. | ||
* <https://github.com/georust/wkt/pull/79> | ||
* Switch to 2021 edition and add examples | ||
* <https://github.com/georust/wkt/pull/65> | ||
* Update to geo-types v0.7.3 | ||
* Add MIT license file | ||
|
||
## 0.9.2 - 2020-04-30 | ||
### Added | ||
* Minimal support for JTS extension: `LINEARRING` by parsing it as a `LINESTRING`. | ||
* Support `POINT EMPTY` in conversion to `geo_types`. | ||
Converts to `MultiPoint([])`. | ||
* <https://github.com/georust/wkt/pull/64> | ||
### Fixed | ||
* Some "numeric" characters like `¾` and `①` were being treated as digits. | ||
### Changed | ||
* Approximately 40% faster according to `cargo bench`. | ||
|
||
## 0.9.1 | ||
|
||
* Add `serde::Deserialize` for `Wkt` and `Geometry`. | ||
* <https://github.com/georust/wkt/pull/59> | ||
* Add helper functions for deserializing from WKT format into | ||
`geo_types::Geometry` and `geo_types::Point` | ||
* <https://github.com/georust/wkt/pull/59> | ||
* <https://github.com/georust/wkt/pull/62> | ||
|
||
## 0.9.0 | ||
|
||
* WKT errors impl `std::error::Error` | ||
* <https://github.com/georust/wkt/pull/57> | ||
* Add TryFrom for converting directly to geo-types::Geometry enum members, such | ||
as `geo_types::LineString::try_from(wkt)` | ||
* <https://github.com/georust/wkt/pull/57> | ||
* Add `geo-types::Geometry::from(wkt)` | ||
* BREAKING: update geo-types, apply new `geo_types::CoordFloat` | ||
* <https://github.com/georust/wkt/pull/53> | ||
* BREAKING: Add Debug to Wkt structs by using new WktFloat instead of num_traits::Float | ||
* <https://github.com/georust/wkt/pull/54> | ||
|
||
## 0.8.0 | ||
|
||
* update geo-types |
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[package] | ||
name = "wkt" | ||
description = "Rust read/write support for well-known text (WKT)" | ||
version = "0.10.0" | ||
license = "MIT/Apache-2.0" | ||
repository = "https://github.com/georust/wkt" | ||
autobenches = true | ||
readme = "README.md" | ||
keywords = ["geo", "geospatial", "wkt"] | ||
edition = "2021" | ||
|
||
[dependencies] | ||
geo-types = { path = "../geo-types", version = "0.7.3", optional = true } | ||
num-traits = "0.2" | ||
serde = { version = "1.0", default-features = false, optional = true } | ||
thiserror = "1.0.23" | ||
|
||
[dev-dependencies] | ||
criterion = { version = "0.2" } | ||
serde = { version = "1.0", default-features = false, features = ["derive"] } | ||
serde_json = "1.0" | ||
|
||
[features] | ||
default = ["geo-types"] | ||
|
||
[[bench]] | ||
name = "parse" | ||
harness = false |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
wkt | ||
=== | ||
|
||
Rust read/write support for [well-known text (WKT)](https://en.wikipedia.org/wiki/Well-known_text). | ||
|
||
[![Crate][crates-badge]][crates-url] | ||
[![API Documentation][docs-badge]][docs-url] | ||
|
||
[crates-badge]: https://img.shields.io/crates/v/wkt.svg | ||
[crates-url]: https://crates.io/crates/wkt | ||
[docs-badge]: https://docs.rs/wkt/badge.svg | ||
[docs-url]: https://docs.rs/wkt | ||
|
||
## License | ||
|
||
Licensed under either of | ||
|
||
* Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) | ||
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) | ||
|
||
at your option. | ||
|
||
### Contribution | ||
|
||
Unless you explicitly state otherwise, any contribution intentionally submitted | ||
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any | ||
additional terms or conditions. |
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#[macro_use] | ||
extern crate criterion; | ||
extern crate wkt; | ||
|
||
use std::str::FromStr; | ||
|
||
fn criterion_benchmark(c: &mut criterion::Criterion) { | ||
c.bench_function("parse small", |bencher| { | ||
let s = include_str!("./small.wkt"); | ||
bencher.iter(|| { | ||
let _ = wkt::Wkt::<f64>::from_str(s).unwrap(); | ||
}); | ||
}); | ||
|
||
c.bench_function("parse big", |bencher| { | ||
let s = include_str!("./big.wkt"); | ||
bencher.iter(|| { | ||
let _ = wkt::Wkt::<f64>::from_str(s).unwrap(); | ||
}); | ||
}); | ||
} | ||
|
||
criterion_group!(benches, criterion_benchmark); | ||
criterion_main!(benches); |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
POLYGON ((35 10, 45 45, 15 40, 10 20, 35 10), (20 30, 35 35, 30 20, 20 30)) |
Oops, something went wrong.