Skip to content

feat: alternatives for area-of-use and projection - #1200

Draft
jdroenner wants to merge 6 commits into
mainfrom
alternative-proj
Draft

feat: alternatives for area-of-use and projection#1200
jdroenner wants to merge 6 commits into
mainfrom
alternative-proj

Conversation

@jdroenner

@jdroenner jdroenner commented Jun 10, 2026

Copy link
Copy Markdown
Member
  • I added an entry to CHANGELOG.md if knowledge of this change could be valuable to users.

Here is a brief summary of what I did:

  • Added a static area of use provider that is used as default with fallback to proj
  • Added a projection provider based on the geodesy crate that is used by default with fallback to proj

@jdroenner jdroenner changed the title Alternative proj feat: alternatives for area-of-use and projection Jun 10, 2026
Comment thread geoengine/datatypes/src/operations/reproject.rs Dismissed
Comment thread geoengine/datatypes/src/operations/reproject.rs Dismissed
Comment thread geoengine/services/src/api/handlers/spatial_references.rs Dismissed
Comment thread geoengine/services/src/api/handlers/spatial_references.rs Dismissed

@ChristianBeilschmidt ChristianBeilschmidt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coole Idee mit dem MixedProjector.

@@ -0,0 +1,21 @@
[package]
name = "crs-bounds"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Was ist die Idee hinter dem eigenen Crate?
  2. Sollte man die Projektion auch hier reinstecken?

pub mod registry {
#![allow(clippy::unreadable_literal, clippy::approx_constant)]

include!("epsg_registry.rs");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wieso nicht mod epsg_registry;?

Comment on lines +18 to +21
default = ["metadata"]
code = []
name = []
metadata = ["code", "name"]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was tut das?

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!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auch kurz mal dokumentieren, was das ist.

};

#[derive(Clone, Debug, Copy)]
pub struct StaticAreaofUseProvider {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auch kurz mal dokumentieren, was das ist.

};

#[derive(Clone, Debug, Copy)]
pub struct StaticAreaofUseProvider {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!!!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gäbe es jetzt, oder?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants