[Git][debian-gis-team/antimeridian][upstream] New upstream version 0.3.6
Antonio Valentino (@antonio.valentino)
gitlab at salsa.debian.org
Mon May 20 06:50:37 BST 2024
Antonio Valentino pushed to branch upstream at Debian GIS Project / antimeridian
Commits:
9e2e5b43 by Antonio Valentino at 2024-05-20T05:45:41+00:00
New upstream version 0.3.6
- - - - -
5 changed files:
- .pre-commit-config.yaml
- CHANGELOG.md
- pyproject.toml
- src/antimeridian/_implementation.py
- tests/test_polygon.py
Changes:
=====================================
.pre-commit-config.yaml
=====================================
@@ -1,20 +1,20 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v4.5.0
+ rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/pre-commit/mirrors-mypy
- rev: v1.9.0
+ rev: v1.10.0
hooks:
- id: mypy
additional_dependencies:
- click~=8.1.6
- pytest~=8.0
- repo: https://github.com/charliermarsh/ruff-pre-commit
- rev: v0.3.4
+ rev: v0.4.4
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
=====================================
CHANGELOG.md
=====================================
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## [Unreleased]
+## [0.3.6] - 2024-05-16
+
+### Fixed
+
+- Preserve z coordinates ([#116](https://github.com/gadomski/antimeridian/pull/116))
+
## [0.3.5] - 2024-05-05
### Fixed
@@ -128,7 +134,8 @@ This v0.1.0 release is to indicate that we think that this package is ready to u
Initial release.
-[unreleased]: https://github.com/gadomski/antimeridian/compare/v0.3.5...HEAD
+[unreleased]: https://github.com/gadomski/antimeridian/compare/v0.3.6...HEAD
+[0.3.6]: https://github.com/gadomsk/antimeridian/compare/v0.3.5...v0.3.6
[0.3.5]: https://github.com/gadomsk/antimeridian/compare/v0.3.4...v0.3.5
[0.3.4]: https://github.com/gadomsk/antimeridian/compare/v0.3.3...v0.3.4
[0.3.3]: https://github.com/gadomsk/antimeridian/compare/v0.3.2...v0.3.3
=====================================
pyproject.toml
=====================================
@@ -1,6 +1,6 @@
[project]
name = "antimeridian"
-version = "0.3.5"
+version = "0.3.6"
authors = [{ name = "Pete Gadomski", email = "pete.gadomski at gmail.com" }]
description = "Fix GeoJSON geometries that cross the antimeridian"
readme = "README.md"
=====================================
src/antimeridian/_implementation.py
=====================================
@@ -452,6 +452,10 @@ def normalize(coords: List[XY]) -> List[XY]:
else:
coords[i] = (((point[0] + 180) % 360) - 180, point[1])
all_are_on_antimeridian = False
+ if len(point) > 2:
+ point_as_list = list(coords[i])
+ point_as_list.extend(point[2:])
+ coords[i] = tuple(point_as_list)
if all_are_on_antimeridian:
return original
else:
=====================================
tests/test_polygon.py
=====================================
@@ -157,3 +157,10 @@ def test_centroid_split_with_shift(read_input: Reader) -> None:
centroid = cast(Point, antimeridian.centroid(input))
assert centroid.x == -179
assert centroid.y == 45
+
+
+def test_z_coordinates() -> None:
+ # https://github.com/gadomski/antimeridian/issues/115
+ polygon = Polygon([[0, 0, 1], [10, 0, 2], [10, 10, 3], [0, 10, 4]])
+ fixed = antimeridian.fix_polygon(polygon)
+ assert fixed.has_z
View it on GitLab: https://salsa.debian.org/debian-gis-team/antimeridian/-/commit/9e2e5b43e3548d3ed01736340828aa94e1ee5075
--
This project does not include diff previews in email notifications.
View it on GitLab: https://salsa.debian.org/debian-gis-team/antimeridian/-/commit/9e2e5b43e3548d3ed01736340828aa94e1ee5075
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20240520/7078b23b/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list