-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
75e7f60
commit 96b11c0
Showing
49 changed files
with
1,255 additions
and
161 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
pull_request: {} | ||
|
||
|
||
jobs: | ||
|
||
build: | ||
name: cargo build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- name: Build | ||
run: cargo build | ||
|
||
test: | ||
name: cargo test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: rustfmt clippy | ||
- name: rustfmt | ||
run: cargo fmt --all -- --check | ||
- name: clippy | ||
run: cargo clippy | ||
- name: test | ||
run: cargo test --verbose |
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 |
---|---|---|
|
@@ -3,18 +3,22 @@ members = [ | |
"crates/*" | ||
] | ||
|
||
resolver = "2" | ||
|
||
[workspace.package] | ||
version = "0.0.1-alpha.1" | ||
authors = ["Benedikt Schwab"] | ||
version = "0.0.1-alpha.3" | ||
authors = ["Benedikt Schwab <[email protected]>"] | ||
edition = "2021" | ||
license = "MIT OR Apache-2.0" | ||
repository = "https://github.com/tum-gis/egml" | ||
repository = "https://github.com/envis-space/egml" | ||
|
||
[workspace.dependencies] | ||
thiserror = "1.0" | ||
tracing = "0.1.30" | ||
tracing-subscriber = "0.3.8" | ||
nalgebra = "0.31.1" | ||
serde = "1.0" | ||
quick-xml = "0.27.0" | ||
geo = "0.23.1" | ||
thiserror = "1.0.61" | ||
tracing = "0.1.40" | ||
tracing-subscriber = "0.3.18" | ||
nalgebra = "0.33.0" | ||
parry3d-f64 = "0.16.1" | ||
serde = "1.0.204" | ||
quick-xml = "0.36.0" | ||
geo = "0.28.0" | ||
itertools = "0.13.0" |
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,2 +1,11 @@ | ||
# egml | ||
|
||
A Rust library for processing [GML](https://www.ogc.org/standard/gml/) data. | ||
|
||
> [!WARNING] | ||
> The library is at an early stage of development. | ||
## Contributing | ||
|
||
The library is developed at the [TUM Chair of Geoinformatics](https://github.com/tum-gis) and contributions are highly welcome. | ||
|
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,10 @@ | ||
# egml-cli | ||
|
||
CLI tool for processing [GML](https://www.ogc.org/standard/gml/) data. | ||
|
||
> [!WARNING] | ||
> The library is at an early stage of development. | ||
## Contributing | ||
|
||
The library is developed at the [TUM Chair of Geoinformatics](https://github.com/tum-gis) and contributions are highly welcome. |
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
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,10 @@ | ||
# egml-core | ||
|
||
Core primitives and operations for processing [GML](https://www.ogc.org/standard/gml/) data. | ||
|
||
> [!WARNING] | ||
> The library is at an early stage of development. | ||
## Contributing | ||
|
||
The library is developed at the [TUM Chair of Geoinformatics](https://github.com/tum-gis) and contributions are highly welcome. |
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 @@ | ||
pub mod multi_surface; |
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,41 @@ | ||
use crate::error::Error; | ||
use crate::geometry::primitives::polygon::Polygon; | ||
use crate::{enlarge_envelopes, Envelope}; | ||
|
||
#[derive(Debug, Clone, PartialEq)] | ||
pub struct MultiSurface { | ||
members: Vec<Polygon>, | ||
} | ||
|
||
impl MultiSurface { | ||
pub fn new(members: Vec<Polygon>) -> Result<Self, Error> { | ||
if members.is_empty() { | ||
return Err(Error::MustNotBeEmpty("")); | ||
} | ||
|
||
Ok(Self { members }) | ||
} | ||
|
||
pub fn members(&self) -> &Vec<Polygon> { | ||
self.members.as_ref() | ||
} | ||
|
||
pub fn set_members(&mut self, val: Vec<Polygon>) -> Result<(), Error> { | ||
if val.is_empty() { | ||
return Err(Error::MustNotBeEmpty("")); | ||
} | ||
self.members = val; | ||
Ok(()) | ||
} | ||
|
||
pub fn get_envelope(&self) -> Result<Envelope, Error> { | ||
let envelopes: Vec<Envelope> = self | ||
.members | ||
.iter() | ||
.map(|m| m.get_envelope()) | ||
.collect::<Vec<_>>(); | ||
|
||
let enlarged_envelope = enlarge_envelopes(&envelopes)?; | ||
Ok(enlarged_envelope) | ||
} | ||
} |
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
Oops, something went wrong.