Skip to content

Commit

Permalink
Add check for 'type=crs' arguments in PROJ string.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjziebarth committed Aug 18, 2023
1 parent 190c9a7 commit f4ac86f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@ This software is licensed under the European Public License (EUPL) version 1.2 o
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

### [0.2.7] - 2023-08-18
#### Added
- Check for the existence of a `type=crs` argument in the PROJ string, which
leads to `Object is not a coordinate operation` under the hood, and raise
errors if detected.

### [0.2.6] - 2023-01-03
#### Added
- Add Meson build option 'portable' to disable native tuning of the binaries.
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
author = 'Malte J. Ziebarth'

# The full version, including alpha/beta/rc tags
release = '0.2.6'
release = '0.2.7'


# -- General configuration ---------------------------------------------------
Expand Down
3 changes: 3 additions & 0 deletions flottekarte/map.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ def __init__(self, proj_str: str, ax: Axes,
bisection_offset: Union[Literal['auto'],float] ='auto',
minimum_node_distance: Union[Literal['auto'],float] = 'auto',
atol: Union[Literal['auto'],float] = 'auto'):
if 'type=crs' in proj_str:
raise ValueError("Likely running into PROJ error if 'type=crs' "
"is given. Please remove this argument.")
self.proj_str = proj_str
self.ax = ax
if proj is None:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[project]
name = "flottekarte"
version = "0.2.6"
version = "0.2.7"
description = "Plotting with PROJ and Matplotlib."
authors = [
{name = "Malte J. Ziebarth", email = "ziebarth@gfz-potsdam.de"}
Expand Down

0 comments on commit f4ac86f

Please sign in to comment.