A scope for async_std to spawn non-static futures
Web bundler written in Rust
Raster processing library and tools written in rust
Rust bindings for GDAL
Pet-project for Freeform Handwriting recognition
Aura Bill Generator
Rust bindings for GDAL
Geospatial primitives and algorithms for Rust
push eventgeorust/geo
commit sha fa69b2ad895dc14f477a5b6b33d59fcedcef8b2e
build matrix
commit sha 6aec3e03d889724c48e237334531ae3e8c73efb5
Remove clippy warnings. #630
commit sha a8c2f160fc9ed30bef1b8ffb8f287312893bae9b
Merge #631 631: Remove clippy warnings. #630 r=frewsxcv a=martinfrances107 - [x ] I agree to follow the project's [code of conduct](https://github.com/georust/geo/blob/master/CODE_OF_CONDUCT.md). - [ x] I added an entry to `CHANGES.md` if knowledge of this change could be valuable to users. --- Minor fixup: Removes clippy warnings. Co-authored-by: Martin <martinfrances107@hotmail.com>
commit sha 3ea5cccd9c350c1a7d7b627f71360b9675060308
approx for all Geometry types previously it was only implemented for Coord, Point, LineString, and a few others.
commit sha 6008397d61f1803d3158c28585e7bc4b25d0876e
fixup! approx for all Geometry types stylistic change only
commit sha c169918826af4113208bba10eed676ce4f13011e
easier CI organization for bors
commit sha b317c7bcc98bb3b21e62249d44f0bba2d069d1ec
Merge #628 628: approx for all Geometry types r=frewsxcv a=michaelkirk - [x] I agree to follow the project's [code of conduct](https://github.com/georust/geo/blob/master/CODE_OF_CONDUCT.md). - [x] I added an entry to `CHANGES.md` if knowledge of this change could be valuable to users. --- Follow up to https://github.com/georust/geo/pull/567 which implemented for Coord, Point, LineString, and a few others, this PR implements it for the remaining types, and `Geometry` itself. FYI this is a precursor to an integration I'm working on with some of the JTS test suite. Co-authored-by: Michael Kirk <michael.code@endoftheworl.de>
commit sha f46ff0ac2696be9cdcd8c5b0649506e0e9fd45f0
Merge #627 627: introduce build matrix for rust-1.49 and rust-1.50 r=michaelkirk a=michaelkirk - [x] I agree to follow the project's [code of conduct](https://github.com/georust/geo/blob/master/CODE_OF_CONDUCT.md). - [n/a] I added an entry to `CHANGES.md` if knowledge of this change could be valuable to users. --- Based on https://github.com/georust/docker-images/pull/11 Co-authored-by: Michael Kirk <michael.code@endoftheworl.de>
commit sha 401ab1136ba7eb5e01368aec1d31e89d59fff091
Rewrite `geo` crate documentation.
commit sha 54160329232ae16c0b9fa1aac1f40d96ef27d1f4
Rewrite Orient crate root description
commit sha cd12516d91676b16929738181cc0926d987e752b
Mention geo-types crate in the Types section
commit sha 9bad4bf5dc415284a344b19325f66c5ea0ed726e
Add a section in the docs for the ecosystem
commit sha 5a4c924be639acb6fafad548a27fd9ec8945ebab
Merge #619 619: Rewrite `geo` crate documentation. r=michaelkirk,urschrei a=frewsxcv - [x] I agree to follow the project's [code of conduct](https://github.com/georust/geo/blob/master/CODE_OF_CONDUCT.md). - [x] I added an entry to `CHANGES.md` if knowledge of this change could be valuable to users. --- Extracted out of https://github.com/georust/geo/pull/576  Co-authored-by: Corey Farwell <coreyf@rwell.org>
commit sha 4c8363edfbaf7ed43a7d07ee31433bf3f2e60fa4
Add optional `arbitrary` integration in geo-types.
commit sha ffec53f8b082bc1f4a0dfe79b1548b53628de416
Fill in PR link
commit sha 26c5f88e14e965107ff8dd8f8f15d5c53d934b39
Upgrade to arbitrary 1.0
commit sha 4ecb277893c4bbfd9a0c9b1332a145b1f60c2218
rustfmt
commit sha ffa3f05eaa581ad78e4a78581a9b66c42f70f8b4
Include NaN in coordinate values
commit sha c3811870d5835d4a7606af314e4769efa2cb3bfc
Add size_hint for Arbitrary LineString impl
commit sha 60d26f8e987cc9cd7f9c002c92479198b9968ad7
Merge #622 622: Add optional `arbitrary` integration in geo-types. r=michaelkirk a=frewsxcv - [x] I agree to follow the project's [code of conduct](https://github.com/georust/geo/blob/master/CODE_OF_CONDUCT.md). - [x] I added an entry to `CHANGES.md` if knowledge of this change could be valuable to users. --- Extracted from https://github.com/georust/geo/pull/532/ If people feel this is too niche, this could also just be a separate crate that lives in this repo or a separate one 🤷🏻 Co-authored-by: Corey Farwell <coreyf@rwell.org>
push time in 19 minutes
Pull request review commentgeorust/geo
where type Output = Option<Point<T>>; fn centroid(&self) -> Self::Output {- if self.0.is_empty() {- return None;+ centroid_of_coords(self.iter().map(|p| p.0)).map(Point)+ }+}++impl<T> Centroid for Geometry<T>+where+ T: CoordFloat + FromPrimitive + Sum + Default,+{+ type Output = Option<Point<T>>;++ crate::geometry_delegate_impl! {+ fn centroid(&self) -> Self::Output;+ }+}++impl<T> Centroid for GeometryCollection<T>+where+ T: CoordFloat + FromPrimitive + Sum + Default,+{+ type Output = Option<Point<T>>;+ fn centroid(&self) -> Self::Output {+ use crate::algorithm::dimensions::{Dimensions, HasDimensions};++ // The Geometries in the GeometryCollection could have different dimensionality. Centroids+ // must be considered separately by dimensionality.+ //+ // e.g. If I have several Points, adding a new `Point` will affect their centroid.+ //+ // However, because a Point is zero dimensional, it is infinitely small when compared to+ // any 2-D Polygon. Thus a Point will not affect the centroid of any GeometryCollection+ // containing a 2-D Polygon.+ //+ // So, for each Geometry in the GeometryCollection, we accumulate that Geometry's+ // `(centroid, weight)` with that of other geometries of the same dimensionality. And at+ // the end, the centroid of the GeometryCollection as a whole is the highest dimensional+ // centroid which has `Some` value.++ // (accumulated centroid, accumulated weight) tuples for each dimensionality.+ let mut centroid_0d_accum: Option<(Point<T>, T)> = None;+ let mut centroid_1d_accum: Option<(Point<T>, T)> = None;+ let mut centroid_2d_accum: Option<(Point<T>, T)> = None;++ for geometry in self.iter() {+ let centroid = geometry.centroid();+ match (geometry.dimensions(), centroid) {+ (Dimensions::Empty, _) | (_, None) => continue,+ (Dimensions::ZeroDimensional, Some(centroid)) => {+ let mut centroid_accum = centroid_0d_accum.unwrap_or_default();+ let weight = T::one();
Ok, I believe I've addressed this, but it ended being non-trivial. In the process I found a few more bugs and fleshed out some more tests (almost always the issues were with degenerate geometries).
I think we should extend our Centroid trait to add a method that returns both the centroid Point, and the total weight of the geometry.
I started with this approach, and it would've worked fine, but I felt things ended up cleaner when I bundled the state and logic into a separate private CentroidOperation
accumulation struct.
Even in cases where there is a single geometry, we'll still utilize the aggregating operation, which at first seems weird. This is primarily to avoid redundantly having to recompute the centroids weight in the case the geometry does appear in a collection. Since computing the centroid essentially involves computing its weight anyway, there's not much lost by tracking it in this way, except some small extra stack allocations in some cases.
Since I've essentially re-written the trait at this point, it'd be great if I could get another review.
comment created time in 4 hours
push eventgeorust/geo
commit sha 2ff2acfa34b7c7d901cb700bc50ce91051df6def
fixup off-axis degenerate triangles
push time in 4 hours
push eventgeorust/geo
commit sha d744ee8ed234790bd64933c99ed562bdbac4db80
Properly weight compound geometries Introduces a private CentroidOperation to accumulate results.
push time in 4 hours
push eventgeorust/geo
commit sha 1611c8c985deb55fb69e43c338cefc871a4031c7
use local crates for transitive deps too
commit sha 0e07db52f6e1f3ba43ca308f3478615bce60512b
add failing test case
commit sha eb3c24b9359d91dc09aa21cb472bf0f6156bd9c3
Properly weight compound geometries Introduces a private CentroidOperation to accumulate results.
push time in 5 hours
push eventgeorust/geo
commit sha 06a0ec2e1856e48cbcc0d5ce6d97110101ceb529
use local crates for transitive deps too
push time in 5 hours
push eventgeorust/geo
commit sha f1828f8fc708e61a9ae375679ab3b630786f7ba3
Properly weight compound geometries Introduces a private CentroidOperation to accumulate results.
push time in 5 hours
push eventgeorust/geo
commit sha 527e80aea5eba9f13e099c9aea552251b5c397a0
Properly weight compound geometries Introduces a private CentroidOperation to accumulate results.
push time in 6 hours
push eventgeorust/geo
commit sha 4aae2d015ee613fd6bf0f1fb887f7dc79bde9df8
Properly weight compound geometries Introduces a private CentroidOperation to accumulate results.
push time in 6 hours
push eventgeorust/geo
commit sha 54c09a435a0ff35829aee45eaee567d65dad3d12
Prepare for geo 0.17.1 release
commit sha 1e36d1e07bd7b83b6132940c66ebedb6204c3c8e
Add first fuzz target for fuzzing simplify algorithm.
commit sha 1a1942e0721d27033734bd1c87d73f93b0152f00
Remove unnecessary negative epsilon check
commit sha dd4139d2d841dad4378725ae599c242332570d66
Add post-simplify verifications
commit sha ab958654664e178b7996317fe316ef09ae60de43
Merge #633 633: Add first fuzz target for fuzzing simplify algorithm. r=michaelkirk a=frewsxcv - [x] I agree to follow the project's [code of conduct](https://github.com/georust/geo/blob/master/CODE_OF_CONDUCT.md). - ~I added an entry to `CHANGES.md` if knowledge of this change could be valuable to users.~ --- Based off of https://github.com/georust/geo/pull/532. Fuzzing allows us to find buggy edge cases and alsocheck the validity of our algorithms (by comparing results against the result of other libraries like GEOS). This pull request just adds one fuzz target for fuzzing our `Simplify` algorithm to get us started. How to fuzz: ```sh cargo install cargo-fuzz cd geo cargo fuzz run simplify # cargo fuzz run <fuzz target> ``` Co-authored-by: Corey Farwell <coreyf@rwell.org>
commit sha b1e656dec87edda483902e85292ee578bab1505c
cargo fmt
commit sha 4109c44b30785d35f5398cd5bf0f4f000b84b834
always use local geo versions when working in workspace
commit sha a759fb4e95f7ca671d170c95c59162ad46830739
add missing centroid impls
commit sha 927324a2a63a124b329b242a04bd71caa1d7306b
per JTS test suite: the centroid of a dimensionally collapsed MultiLineString is the centroid of it's points
commit sha 3fa05e523b99a10ab453d165ce46d307d4ccf673
Fix GeometryCollection centroid
commit sha 39a0be1ee3a513253abd0178593d212f609c5c87
update tests I replaced assert_eq with assert_relative_eq to fix a new failure from a very small deviation in expected results from the new centroid calculation
commit sha 84a8f2c6cab04137f34664a3d9184b0a2ecc0057
update CHANGES
commit sha 06e6b1885d518af4b33c066999b882c5dbd6cf86
avoid allocating for MultiPoint when computing centroid of degenerate MultiLineString
commit sha 86ab753ce83a9749bd54acabe372bb3cd9b3f748
Revert "always use local geo versions when working in workspace" This reverts commit 00df4bdf52f2e863f049594f208c57b05dabca78.
commit sha 4b4126ed465c034efc42a3d870f074754bbaea71
code comments / algo overview
commit sha d53b76cb12881e7633f80e2802294db2802a398c
integrate jts-test-runner
commit sha 61ef4e321ca77ab5dd304dbb74fa22321a50914d
Add some assertions in Centroid Of these Geometry cases: - only Triangle/Rect support collapsing to 1-D - Point/MultiPoint should truly never be 1-D - Polygon/MultiPolygon don't *currently* support being 1-D, but I could imagine a future that similarly allows invalid Polygons to collapse. In that case I'd rather hit a debug_assert and return a reasonable value here than crash someone in production.
commit sha 7d3a719641ef92287aac0fcfeeee6faf1e640b87
verified some JTS test cases fail if I switch to `signed` area
commit sha d258b6d613485925b938f41ca1f622be9a906ad0
proper syntax for referencing a commit in crates patches
commit sha 8f3bbe2d1eb8684437df197d6fac06a66b2d29a9
add failing test case
push time in 6 hours
PR merged georust/geo
- [x] I agree to follow the project's code of conduct.
- [x] I added an entry to
CHANGES.md
if knowledge of this change could be valuable to users.
Hello,
Here a small patch for #625, I hope it’s good enough.
pr closed time in a day
push eventgeorust/geo
commit sha 1fe263c0a683f7d35cd3a218d33997c798034693
Add From<Line> for LineString #625
commit sha 554dbfa912546dfd873234b5399a1a4419a369bc
Add new feature to CHANGES.md
commit sha 168726a8ff5cdbdd7f3d684147410d825429f72e
Merge #634 634: Add From<Line> for LineString #625 r=michaelkirk a=NolwennD - [x] I agree to follow the project's [code of conduct](https://github.com/georust/geo/blob/master/CODE_OF_CONDUCT.md). - [x] I added an entry to `CHANGES.md` if knowledge of this change could be valuable to users. --- Hello, Here a small patch for #625, I hope it’s good enough. Co-authored-by: NolwennD <donolwenn@gmail.com>
push time in a day
pull request commentgeorust/geo
Add From<Line> for LineString #625
Build succeeded:
comment created time in a day
push eventgeorust/geo
commit sha 168726a8ff5cdbdd7f3d684147410d825429f72e
Merge #634 634: Add From<Line> for LineString #625 r=michaelkirk a=NolwennD - [x] I agree to follow the project's [code of conduct](https://github.com/georust/geo/blob/master/CODE_OF_CONDUCT.md). - [x] I added an entry to `CHANGES.md` if knowledge of this change could be valuable to users. --- Hello, Here a small patch for #625, I hope it’s good enough. Co-authored-by: NolwennD <donolwenn@gmail.com>
push time in a day
push eventgeorust/geo
commit sha 1fe263c0a683f7d35cd3a218d33997c798034693
Add From<Line> for LineString #625
commit sha 554dbfa912546dfd873234b5399a1a4419a369bc
Add new feature to CHANGES.md
commit sha d4d5b55a7c5df8c77d34bac17d24fe5b2245dea0
[ci skip][skip ci][skip netlify] -bors-staging-tmp-634
push time in a day
pull request commentgeorust/geo
Add From<Line> for LineString #625
bors retry
comment created time in a day
pull request commentgeorust/geo
Add From<Line> for LineString #625
Build failed:
Looks like crates.io is having a fit. We'll try again later.
Run cargo install cargo-all-features
Updating crates.io index
Downloading crates ...
Downloaded cargo-all-features v1.5.0
Installing cargo-all-features v1.5.0
Downloading crates ...
warning: spurious network error (2 tries remaining): failed to get 200 response from `https://crates.io/api/v1/crates/termcolor/1.1.2/download`, got 503
warning: spurious network error (1 tries remaining): failed to get 200 response from `https://crates.io/api/v1/crates/termcolor/1.1.2/download`, got 503
error: failed to compile `cargo-all-features v1.5.0`, intermediate artifacts can be found at `/tmp/cargo-installRvlbhA`
comment created time in a day
pull request commentgeorust/geo
Add From<Line> for LineString #625
Build failed:
comment created time in a day
push eventgeorust/geo
commit sha 1fe263c0a683f7d35cd3a218d33997c798034693
Add From<Line> for LineString #625
commit sha b1e656dec87edda483902e85292ee578bab1505c
cargo fmt
commit sha 554dbfa912546dfd873234b5399a1a4419a369bc
Add new feature to CHANGES.md
commit sha af4897549461b867ac53a205c22bf17606f0caed
Merge #634 634: Add From<Line> for LineString #625 r=michaelkirk a=NolwennD - [x] I agree to follow the project's [code of conduct](https://github.com/georust/geo/blob/master/CODE_OF_CONDUCT.md). - [x] I added an entry to `CHANGES.md` if knowledge of this change could be valuable to users. --- Hello, Here a small patch for #625, I hope it’s good enough. Co-authored-by: NolwennD <donolwenn@gmail.com>
push time in a day
push eventgeorust/geo
commit sha 1fe263c0a683f7d35cd3a218d33997c798034693
Add From<Line> for LineString #625
commit sha 554dbfa912546dfd873234b5399a1a4419a369bc
Add new feature to CHANGES.md
commit sha d0411ea6190d2ab72a6ccc11c4a7243080dc9ea3
[ci skip][skip ci][skip netlify] -bors-staging-tmp-634
push time in a day
pull request commentgeorust/geo
Add From<Line> for LineString #625
I have updated the changelog.
comment created time in a day
push eventgeorust/geo
commit sha b1e656dec87edda483902e85292ee578bab1505c
cargo fmt
push time in a day
PR opened georust/geo
The short description of the algorithm is in the docs for the trait.
- [ ] I agree to follow the project's code of conduct.
- [ ] I added an entry to
CHANGES.md
if knowledge of this change could be valuable to users.
pr created time in a day
PR opened georust/geo
- [ ] I agree to follow the project's code of conduct.
- [ ] I added an entry to
CHANGES.md
if knowledge of this change could be valuable to users.
Hello,
Here a small patch for #625, I hope it’s good enough.
pr created time in 2 days
issue commentgeorust/gdal
On the other hand, we could try to do this "the right way" and define a set of conversion traits. This way we could get rid of the enum and still be able to make the chrono
dependency optional.
comment created time in 2 days
PR opened georust/proj
I added the support of vcpkg libraries in proj-sys. This allow to build proj-sys on windows with msvc without pkg-config.
To use vcpkg libraries on your rust program, you need:
- in .cargo/config file
[target.x86_64-pc-windows-msvc]
linker = "rust-lld.exe"
rustflags = ["-Ctarget-feature=+crt-static"]
- in Cargo.toml file
[package.metadata.vcpkg]
git = "https://github.com/microsoft/vcpkg"
rev = "96a1f9c" # PROJ version 7.2.1 - https://github.com/microsoft/vcpkg/search?q=proj4&type=commits
install = ["proj:x64-windows-static"]
To build, run
cargo install cargo-vcpkg
cargo vcpkg build
cargo build
I'm new to rust, I hope this isn't to ugly in my implementation.
pr created time in 3 days