diff --git a/galileo-types/Cargo.toml b/galileo-types/Cargo.toml
index 4629b5b..4105674 100644
--- a/galileo-types/Cargo.toml
+++ b/galileo-types/Cargo.toml
@@ -5,8 +5,12 @@ edition.workspace = true
authors.workspace = true
repository.workspace = true
+[features]
+default = ["geo-types"]
+
[dependencies]
num-traits = "0.2.17"
nalgebra = "0.32"
serde = { version = "1.0", features = ["derive"] }
-geodesy = "0.11.1"
\ No newline at end of file
+geodesy = "0.11.1"
+geo-types = { version = "0.7", optional = true }
\ No newline at end of file
diff --git a/galileo-types/src/cartesian/impls/contour.rs b/galileo-types/src/cartesian/impls/contour.rs
index 06ca044..39d4019 100644
--- a/galileo-types/src/cartesian/impls/contour.rs
+++ b/galileo-types/src/cartesian/impls/contour.rs
@@ -2,7 +2,8 @@ use crate::cartesian::rect::Rect;
use crate::cartesian::traits::cartesian_point::CartesianPoint2d;
use crate::cartesian::traits::contour::CartesianContour;
use crate::geo::traits::projection::Projection;
-use crate::geometry::{CartesianGeometry2d, Geom, Geometry};
+use crate::geometry::CartesianGeometry2d;
+use crate::geometry_type::{ContourGeometryType, GeometryType};
use num_traits::Float;
use serde::{Deserialize, Serialize};
@@ -89,11 +90,11 @@ impl
From> for Contour {
}
}
-impl
crate::cartesian::traits::contour::ClosedContour for ClosedContour
{
+impl
crate::contour::ClosedContour for ClosedContour
{
type Point = P;
- fn iter_points(&self) -> Box + '_> {
- Box::new(self.points.iter())
+ fn iter_points(&self) -> impl Iterator- {
+ self.points.iter()
}
}
@@ -103,15 +104,15 @@ impl
crate::cartesian::traits::contour::ClosedContour for ClosedContour
{
// }
// }
-impl
crate::cartesian::traits::contour::Contour for Contour
{
+impl
crate::contour::Contour for Contour
{
type Point = P;
fn is_closed(&self) -> bool {
self.is_closed
}
- fn iter_points(&self) -> Box + '_> {
- Box::new(self.points.iter())
+ fn iter_points(&self) -> impl Iterator- {
+ self.points.iter()
}
}
@@ -120,45 +121,17 @@ impl
crate::cartesian::traits::contour::Contour for Contour
{
// {
// }
-impl
Geometry for ClosedContour
{
- type Point = P;
-
- fn project + ?Sized>(
- &self,
- projection: &Proj,
- ) -> Option> {
- let points = self
- .points
- .iter()
- .map(|p| projection.project(p))
- .collect::