feat: alternatives for area-of-use and projection - #1200
Draft
jdroenner wants to merge 6 commits into
Draft
Conversation
ChristianBeilschmidt
requested changes
Jul 9, 2026
ChristianBeilschmidt
left a comment
Member
There was a problem hiding this comment.
Coole Idee mit dem MixedProjector.
| @@ -0,0 +1,21 @@ | |||
| [package] | |||
| name = "crs-bounds" | |||
Member
There was a problem hiding this comment.
- Was ist die Idee hinter dem eigenen Crate?
- Sollte man die Projektion auch hier reinstecken?
| pub mod registry { | ||
| #![allow(clippy::unreadable_literal, clippy::approx_constant)] | ||
|
|
||
| include!("epsg_registry.rs"); |
Member
There was a problem hiding this comment.
wieso nicht mod epsg_registry;?
Comment on lines
+18
to
+21
| default = ["metadata"] | ||
| code = [] | ||
| name = [] | ||
| metadata = ["code", "name"] |
| let bbox = SpatialPartition2D::new_unchecked((-180., 90.).into(), (180., -90.).into()); | ||
|
|
||
| let (input, output) = reproject_and_unify_bbox_internal( | ||
| /* This is not a good test since math outside the bounds is questionable! |
Member
There was a problem hiding this comment.
Was ist mit dem ganzen auskommentierten Kram?
| where | ||
| Self: Sized; | ||
| fn area_of_use<A: AxisAlignedRectangle>(&self) -> Result<A>; | ||
| fn area_of_use_projected<A: AxisAlignedRectangle>(&self) -> Result<A>; |
Member
There was a problem hiding this comment.
Weiß man wohin?
Vielleicht mal das Trait und die Member dokumentieren.
| use crate::spatial_reference::{AreaOfUseProvider, SpatialReference, SpatialReferenceAuthority}; | ||
| use crs_bounds::EpsgBounds; | ||
|
|
||
| pub struct StaticEpsgAreaProvider { |
Member
There was a problem hiding this comment.
Auch kurz mal dokumentieren, was das ist.
| }; | ||
|
|
||
| #[derive(Clone, Debug, Copy)] | ||
| pub struct StaticAreaofUseProvider { |
Member
There was a problem hiding this comment.
Auch kurz mal dokumentieren, was das ist.
| }; | ||
|
|
||
| #[derive(Clone, Debug, Copy)] | ||
| pub struct StaticAreaofUseProvider { |
Member
There was a problem hiding this comment.
Suggested change
| pub struct StaticAreaofUseProvider { | |
| pub struct StaticAreaOfUseProvider { |
| request::query(url_decoded(contains(( | ||
| "bbox", | ||
| "8.751627919756874,50.79897568511778,8.765865426422579,50.80799775499464", | ||
| "8.75162,50.79897,8.76587,50.80800", |
Member
There was a problem hiding this comment.
Wieso weniger Precision?
| let epsg_4326_ref = SpatialReference::epsg_4326(); | ||
| let projector = CoordinateProjector::from_known_srs(native_spatial_ref, epsg_4326_ref)?; | ||
| // Note: this uses the `DefaultCoordinateProjector` which may change. | ||
| // TODO: use area provider!!! |
Member
There was a problem hiding this comment.
Gäbe es jetzt, oder?
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CHANGELOG.mdif knowledge of this change could be valuable to users.Here is a brief summary of what I did: