Skip to content

crs: select coordinate transformations for a provider's transformation area - #695

Open
cportele wants to merge 1 commit into
masterfrom
crs-transformation-area
Open

cportele wants to merge 1 commit into
masterfrom
crs-transformation-area

Conversation

@cportele

Copy link
Copy Markdown
Contributor

When several coordinate operations connect two coordinate reference systems, the operation was chosen without an area of interest. A national operation then ranks before a more accurate regional one, even when the regional grid file is available, e.g. a gridless Helmert transformation instead of the HeTA2010 grid for DHDN to ETRS89 in Hessen.

The new provider option transformationArea (a bounding box in CRS84) is passed to the operation selection for all transformations of the provider, so the most accurate operation whose area of use contains the box is used. Without the option the selection is unchanged.

The box has to lie completely within the area of use of the intended transformation. If it extends beyond it, even by a few hundredths of a degree, a less accurate transformation that covers the whole box is selected instead. For this reason, the spatial extent of the data, of an API or of a provider is often not suitable: for a dataset that covers the region of a regional transformation completely, the extent usually extends slightly beyond its area of use, for example because of features on the boundary, or because the extent of data stored in a projected coordinate reference system becomes larger when it is converted to CRS84.

CrsTransformerFactory gets an overload with an area of interest and a view that applies an area to all transformers; transformers are cached per area. A box that covers the whole world selects like no box.

…n area

When several coordinate operations connect two coordinate reference systems,
the operation was chosen without an area of interest. A national operation then
ranks before a more accurate regional one, even when the regional grid file is
available, e.g. a gridless Helmert transformation instead of the HeTA2010 grid
for DHDN to ETRS89 in Hessen.

The new provider option transformationArea (a bounding box in CRS84) is passed
to the operation selection for all transformations of the provider, so the most
accurate operation whose area of use contains the box is used. Without the
option the selection is unchanged.

CrsTransformerFactory gets an overload with an area of interest and a view that
applies an area to all transformers; transformers are cached per area. A box
that covers the whole world selects like no box.
@cportele
cportele requested a review from azahnen as a code owner November 10, 2026 11:42
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.

1 participant