pax_global_header 0000666 0000000 0000000 00000000064 14644060706 0014521 g ustar 00root root 0000000 0000000 52 comment=8e390dda4bdd7435b8457d7f8695733da1dccb1d
antimeridian-0.3.8/ 0000775 0000000 0000000 00000000000 14644060706 0014175 5 ustar 00root root 0000000 0000000 antimeridian-0.3.8/.github/ 0000775 0000000 0000000 00000000000 14644060706 0015535 5 ustar 00root root 0000000 0000000 antimeridian-0.3.8/.github/dependabot.yml 0000664 0000000 0000000 00000000374 14644060706 0020371 0 ustar 00root root 0000000 0000000 version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
versioning-strategy: increase-if-necessary
antimeridian-0.3.8/.github/pull_request_template.md 0000664 0000000 0000000 00000000446 14644060706 0022502 0 ustar 00root root 0000000 0000000 ## Related issues and pull requests
- Closes #XXX (any issues closed by this pull request)
- Related to #XXX (any issues or pull requests related to this pull request)
## Description
Short description of the pull request.
## Checklist
- [ ] Add tests
- [ ] Add docs
- [ ] Update CHANGELOG
antimeridian-0.3.8/.github/workflows/ 0000775 0000000 0000000 00000000000 14644060706 0017572 5 ustar 00root root 0000000 0000000 antimeridian-0.3.8/.github/workflows/ci.yaml 0000664 0000000 0000000 00000004051 14644060706 0021051 0 ustar 00root root 0000000 0000000 name: Continuous integration
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- main
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
extras:
- "dev"
- "cli,dev"
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install with development dependencies
run: pip install .[${{ matrix.extras }}]
- name: Check with pre-commit
run: pre-commit run --all-files
- name: Test
run: pytest
min-dependencies:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Insall uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install with development dependencies
run: uv pip install .[cli,dev] --resolution lowest-direct --system
- name: Test
run: pytest
docs:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
env:
PYDEVD_DISABLE_FILE_VALIDATION: 1
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache conda
uses: actions/cache@v4
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ hashFiles('docs/environment.yaml') }}
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
environment-file: docs/environment.yaml
use-mamba: true
- name: Check docs
run: sphinx-build -W docs docs/_build/html
antimeridian-0.3.8/.github/workflows/release.yaml 0000664 0000000 0000000 00000001605 14644060706 0022100 0 ustar 00root root 0000000 0000000 name: Release
on:
push:
tags:
- v*
workflow_dispatch:
concurrency:
group: "release"
cancel-in-progress: false
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install build
run: pip install build
- name: Build
run: python -m build
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
skip-existing: true
- name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags/v')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
antimeridian-0.3.8/.gitignore 0000664 0000000 0000000 00000006006 14644060706 0016167 0 ustar 00root root 0000000 0000000 # Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
antimeridian-0.3.8/.pre-commit-config.yaml 0000664 0000000 0000000 00000001131 14644060706 0020452 0 ustar 00root root 0000000 0000000 repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
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.10.1
hooks:
- id: mypy
additional_dependencies:
- click~=8.1.6
- pytest~=8.0
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.5.1
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
- id: ruff-format
types_or: [python, pyi, jupyter]
antimeridian-0.3.8/.readthedocs.yaml 0000664 0000000 0000000 00000000236 14644060706 0017425 0 ustar 00root root 0000000 0000000 version: 2
build:
os: ubuntu-22.04
tools:
python: "mambaforge-4.10"
conda:
environment: docs/environment.yaml
sphinx:
configuration: docs/conf.py
antimeridian-0.3.8/CHANGELOG.md 0000664 0000000 0000000 00000012245 14644060706 0016012 0 ustar 00root root 0000000 0000000 # Changelog
All notable changes to this project will be documented in this file.
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).
## [Unreleased]
## [0.3.8] - 2024-07-11
### Fixed
- Forcing the north or the south pole wasn't working in some cases ([#125](https://github.com/gadomski/antimeridian/pull/125))
## [0.3.7] - 2024-06-20
### Fixed
- `__geo_interface` is a property ([#121](https://github.com/gadomski/antimeridian/pull/121))
## [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
- Correct the case when neighboring points are on 180 and -180 and are not part of a latitude band ([#114](https://github.com/gadomski/antimeridian/pull/114))
## [0.3.4] - 2024-03-29
### Fixed
- Project url ([#106](https://github.com/gadomski/antimeridian/issues/106))
## [0.3.3] - 2023-08-21
### Fixed
- Wrapping of centroid points ([#69](https://github.com/gadomski/antimeridian/pull/69))
## [0.3.2] - 2023-08-21
### Added
- `centroid` ([#67](https://github.com/gadomski/antimeridian/pull/67))
## [0.3.1] - 2023-07-10
### Added
- Read from standard input in the CLI ([#48](https://github.com/gadomski/antimeridian/pull/48))
- Support for line strings and multi-line strings ([#50](https://github.com/gadomski/antimeridian/pull/50))
### Fixed
- Don't produce meaningless splits when one corner of an input polygon is on the antimeridian ([#49](https://github.com/gadomski/antimeridian/pull/49))
- Correct tiny floating point deltas on the antimeridian ([#52](https://github.com/gadomski/antimeridian/pull/52))
## [0.3.0] - 2023-06-29
### Changed
- Clockwise input polygons are reversed by default, though this behavior can be overridden ([#39](https://github.com/gadomski/antimeridian/pull/39))
## [0.2.6] - 2023-05-31
### Fixed
- Don't segment polygons that simply overlap the antimeridian ([#37](https://github.com/gadomski/antimeridian/pull/37))
## [0.2.5] - 2023-05-31
### Added
- Calculate spec-conforming bounding boxes ([#35](https://github.com/gadomski/antimeridian/pull/35))
## [0.2.4] - 2023-05-12
### Fixed
- Minimum shapely version needs to be 2.0 ([#27](https://github.com/gadomski/antimeridian/pull/27))
## [0.2.3] - 2023-04-28
## Fixed
- Unused arguments in `fix_multi_polygon` ([#21](https://github.com/gadomski/antimeridian/pull/21))
## [0.2.2] - 2023-04-28
### Added
- Boolean flags to force a polygon to enclose the north or south poles ([#17](https://github.com/gadomski/antimeridian/pull/17))
## [0.2.1] - 2023-04-28
### Added
- Support for unsplit clockwise inputs ([#13](https://github.com/gadomski/antimeridian/pull/13))
- More documentation ([#14](https://github.com/gadomski/antimeridian/pull/14))
## [0.2.0] - 2023-04-26
### Added
- Segmentation functions to the public API ([#12](https://github.com/gadomski/antimeridian/pull/12))
- click-based command line interface ([#12](https://github.com/gadomski/antimeridian/pull/12))
### Fixed
- Protect against longitudes outside of 180 or -180 ([#8](https://github.com/gadomski/antimeridian/pull/8))
### Removed
- The ability to run the module as a script via `__main__` ([#12](https://github.com/gadomski/antimeridian/pull/12))
## [0.1.0] - 2023-04-18
This v0.1.0 release is to indicate that we think that this package is ready to use!
### Removed
- **setuptools-scm**, it was too fragile ([#2](https://github.com/gadomski/antimeridian/pull/2))
## [0.0.2] - 2023-04-14
### Added
- `__main__`
- This changelog and releasing instructions
- Readthedocs
### Changed
- `local_scheme` for setuptools-scm
### Removed
- `examples/fix.py`
## [0.0.1] - 2023-04-14
Initial release.
[unreleased]: https://github.com/gadomski/antimeridian/compare/v0.3.8...HEAD
[0.3.8]: https://github.com/gadomsk/antimeridian/compare/v0.3.7...v0.3.8
[0.3.7]: https://github.com/gadomsk/antimeridian/compare/v0.3.6...v0.3.7
[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
[0.3.2]: https://github.com/gadomsk/antimeridian/compare/v0.3.1...v0.3.2
[0.3.1]: https://github.com/gadomsk/antimeridian/compare/v0.3.0...v0.3.1
[0.3.0]: https://github.com/gadomsk/antimeridian/compare/v0.2.6...v0.3.0
[0.2.6]: https://github.com/gadomsk/antimeridian/compare/v0.2.5...v0.2.6
[0.2.5]: https://github.com/gadomsk/antimeridian/compare/v0.2.4...v0.2.5
[0.2.4]: https://github.com/gadomsk/antimeridian/compare/v0.2.3...v0.2.4
[0.2.3]: https://github.com/gadomsk/antimeridian/compare/v0.2.2...v0.2.3
[0.2.2]: https://github.com/gadomsk/antimeridian/compare/v0.2.1...v0.2.2
[0.2.1]: https://github.com/gadomsk/antimeridian/compare/v0.2.0...v0.2.1
[0.2.0]: https://github.com/gadomsk/antimeridian/compare/v0.1.0...v0.2.0
[0.1.0]: https://github.com/gadomsk/antimeridian/compare/v0.0.2...v0.1.0
[0.0.2]: https://github.com/gadomsk/antimeridian/compare/v0.0.1...v0.0.2
[0.0.1]: https://github.com/gadomski/antimeridian/releases/tag/v0.0.1
antimeridian-0.3.8/CODE_OF_CONDUCT 0000664 0000000 0000000 00000012562 14644060706 0016403 0 ustar 00root root 0000000 0000000
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
pete.gadomski@gmail.com. All complaints will be reviewed and investigated
promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series of
actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within the
community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].
[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
antimeridian-0.3.8/LICENSE 0000664 0000000 0000000 00000022773 14644060706 0015215 0 ustar 00root root 0000000 0000000 Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
antimeridian-0.3.8/README.md 0000664 0000000 0000000 00000006424 14644060706 0015462 0 ustar 00root root 0000000 0000000 # antimeridian
[](https://github.com/gadomski/antimeridian/actions/workflows/ci.yaml)
[](https://antimeridian.readthedocs.io/en/stable/)
[](https://pypi.org/project/antimeridian/)
[](https://github.com/gadomski/antimeridian/blob/main/LICENSE)
[](https://github.com/gadomski/antimeridian/blob/main/CODE_OF_CONDUCT)
Fix shapes that cross the antimeridian.
See [the documentation](https://antimeridian.readthedocs.io) for information about the underlying algorithm.
Depends on [shapely](https://shapely.readthedocs.io) and [numpy](https://numpy.org/).
Can fix:
- Shapely [`Polygon`](https://shapely.readthedocs.io/en/stable/reference/shapely.Polygon.html#shapely.Polygon), [`MultiPolygon`](https://shapely.readthedocs.io/en/stable/reference/shapely.MultiPolygon.html#shapely.MultiPolygon), [`LineString`](https://shapely.readthedocs.io/en/stable/reference/shapely.LineString.html#shapely.LineString), and [`MultiLineString`](https://shapely.readthedocs.io/en/stable/reference/shapely.MultiLineString.html#shapely.MultiLineString) objects
- GeoJSON [Polygons](https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6), [MultiPolygons](https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.7), [Features](https://datatracker.ietf.org/doc/html/rfc7946#section-3.2) and [FeatureCollections](https://datatracker.ietf.org/doc/html/rfc7946#section-3.3), as dictionaries
- Anything that has a [`__geo_interface__`](https://gist.github.com/sgillies/2217756)
## Usage
```shell
pip install antimeridian
```
Then:
```python
import antimeridian
fixed = antimeridian.fix_geojson(geojson)
```
We also have some utilities to create [bounding boxes](https://antimeridian.readthedocs.io/en/latest/api.html#antimeridian.bbox) and [centroids](https://antimeridian.readthedocs.io/en/latest/api.html#antimeridian.centroid) from antimeridian-crossing polygons and multipolygons.
See [the documentation](https://antimeridian.readthedocs.io/) for a complete API reference.
### Command line interface
Use the `cli` optional dependency to install the `antimeridian` CLI:
```shell
pip install 'antimeridian[cli]'
antimeridian fix input.json > output.json
```
## Developing
Clone and install in editable mode with the development optional dependencies:
```shell
git clone https://github.com/gadomski/antimeridian
cd antimeridian
pip install -e '.[dev,docs]'
```
We use [pytest](https://docs.pytest.org) for tests:
```shell
pytest
```
We use [Sphinx](https://www.sphinx-doc.org) for docs:
```shell
make -C docs html
```
## Contributing
Github [issues](https://github.com/gadomski/antimeridian/issues) and [pull requests](https://github.com/gadomski/antimeridian/pulls), please and thank you!
## License
[Apache-2.0](https://github.com/gadomski/antimeridian/blob/main/LICENSE)
antimeridian-0.3.8/RELEASING.md 0000664 0000000 0000000 00000001517 14644060706 0016034 0 ustar 00root root 0000000 0000000 # Releasing
1. Determine the next version. Try to follow [semantic versioning](https://semver.org/).
Our public API is every importable Python function and class, except for `antimeridian.main` -- the CLI is not part of the API, and can break at any time.
2. Create a branch named `release/vX.Y.Z`.
3. Update:
- The version in [pyproject.toml](./pyproject.toml)
- The [CHANGELOG](./CHANGELOG.md)
- The **pre-commit** hooks:
- `pre-commit autoupdate`
- Update any `additional_dependencies` fields to match `pyproject.toml`
4. Open a PR with the changes
5. When the PR is merged, created a tag on `main` with that version with a `v` prefix, e.g. `vX.Y.Z`.
6. Push the tag to Github, which will fire off the release workflow.
7. Create a release via [the Github interface](https://github.com/gadomski/antimeridian/releases).
antimeridian-0.3.8/docs/ 0000775 0000000 0000000 00000000000 14644060706 0015125 5 ustar 00root root 0000000 0000000 antimeridian-0.3.8/docs/Makefile 0000664 0000000 0000000 00000001172 14644060706 0016566 0 ustar 00root root 0000000 0000000 # Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
antimeridian-0.3.8/docs/_static/ 0000775 0000000 0000000 00000000000 14644060706 0016553 5 ustar 00root root 0000000 0000000 antimeridian-0.3.8/docs/_static/.gitignore 0000664 0000000 0000000 00000000000 14644060706 0020531 0 ustar 00root root 0000000 0000000 antimeridian-0.3.8/docs/api.rst 0000664 0000000 0000000 00000000120 14644060706 0016421 0 ustar 00root root 0000000 0000000 API documentation
=================
.. automodule:: antimeridian
:members:
antimeridian-0.3.8/docs/cli.rst 0000664 0000000 0000000 00000000617 14644060706 0016432 0 ustar 00root root 0000000 0000000 Command line interface
======================
The **antimeridian** :abbr:`CLI (command line interface)` takes a GeoJSON file
path as its input, and outputs a fixed GeoJSON dictionary to standard output.
Installation
~~~~~~~~~~~~
Install with **pip**:
.. code-block:: shell
pip install antimeridian[cli]
Usage
~~~~~
.. click:: antimeridian._cli:cli
:prog: antimeridian
:nested: full
antimeridian-0.3.8/docs/conf.py 0000664 0000000 0000000 00000001430 14644060706 0016422 0 ustar 00root root 0000000 0000000 import importlib.metadata
import os
os.environ["PYDEVD_DISABLE_FILE_VALIDATION"] = "1"
project = "antimeridian"
copyright = "2023, Pete Gadomski"
author = "Pete Gadomski"
version = importlib.metadata.version("antimeridian")
release = importlib.metadata.version("antimeridian")
extensions = [
"nbsphinx",
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"sphinx.ext.napoleon",
"sphinx_click",
]
templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
html_theme = "pydata_sphinx_theme"
html_static_path = ["_static"]
html_theme_options = {"github_url": "https://github.com/gadomski/antimeridian"}
intersphinx_mapping = {"shapely": ("https://shapely.readthedocs.io/en/stable", None)}
nbsphinx_custom_formats = {".md": "jupytext.reads"}
antimeridian-0.3.8/docs/environment.yaml 0000664 0000000 0000000 00000000371 14644060706 0020356 0 ustar 00root root 0000000 0000000 name: antimeridian-docs
channels:
- conda-forge
dependencies:
- cartopy~=0.21
- geos~=3.11
- pandoc<3
- pip~=22.3
- scipy~=1.10.0 # need to stay below 1.11 due to https://github.com/SciTools/cartopy/issues/2199
- pip:
- ..[docs]
antimeridian-0.3.8/docs/examples.md 0000664 0000000 0000000 00000006155 14644060706 0017274 0 ustar 00root root 0000000 0000000 ---
jupyter:
jupytext:
text_representation:
extension: .md
format_name: markdown
---
# Examples
Here's some examples of using the **antimeridian** package on some artificial and real-world data.
## Test cases
Our test suite exercises the antimeridian algorithm in a variety of ways.
Here, we visualize some our test cases in two projections.
```python
import warnings
import json
from pathlib import Path
from typing import Any, Dict, Optional
import shapely.geometry
from cartopy.crs import Mollweide, PlateCarree
from cartopy.io import DownloadWarning
from matplotlib import pyplot
import antimeridian
warnings.filterwarnings("ignore", category=DownloadWarning)
def read_json(path: Path) -> Dict[str, Any]:
with open(path) as f:
return json.load(f)
def plot(name: str, fix_winding: bool = True, suptitle: Optional[str] = None) -> None:
data = read_json(f"../tests/data/input/{name}.json")
input = shapely.geometry.shape(data)
output = shapely.geometry.shape(
antimeridian.fix_geojson(data, fix_winding=fix_winding)
)
if suptitle is None:
suptitle = name
figure = pyplot.figure()
figure.suptitle(suptitle)
axes = figure.add_subplot(2, 2, 1, projection=PlateCarree())
axes.set_title("Original in PlateCarree")
axes.stock_img()
axes.coastlines()
axes.add_geometries(input, crs=PlateCarree(), color="coral", alpha=0.7)
axes = figure.add_subplot(2, 2, 2, projection=PlateCarree())
axes.set_title("Fixed in PlateCarree")
axes.stock_img()
axes.coastlines()
axes.add_geometries(output, crs=PlateCarree(), color="coral", alpha=0.7)
axes = figure.add_subplot(2, 2, 3, projection=Mollweide(central_longitude=180))
axes.set_title("Original in Mollweide")
axes.stock_img()
axes.coastlines()
axes.add_geometries(input, crs=PlateCarree(), color="coral", alpha=0.7)
axes = figure.add_subplot(2, 2, 4, projection=Mollweide(central_longitude=180))
axes.set_title("Fixed in Mollweide")
axes.stock_img()
axes.coastlines()
axes.add_geometries(output, crs=PlateCarree(), color="coral", alpha=0.7)
pyplot.show()
for name in [
"split",
"north-pole",
"complex-split",
"multi-split",
"overlap",
]:
plot(name)
```
## Winding order
The exterior ring of a GeoJSON Polygon _should_ be wound counter-clockwise.
Taken literally, this means that a clockwise-wound polygon would be a hole in a large polygon that encloses both poles.
However, in practice, it is common for polygons to be wound incorrectly (e.g. [#29](https://github.com/gadomski/antimeridian/issues/29) and [#32](https://github.com/gadomski/antimeridian/issues/32)).
Our package therefore defaults to correcting the winding order to be counter-clockwise, and only creates these pole-encompassing polygons if explicitly asked.
Most GIS software will automatically fix clockwise exterior polygons, and so it can be hard to know if your Polygon is wound correctly without inspecting the points themselves.
```python
plot("cw-split", fix_winding=True, suptitle="Fix winding")
plot("cw-split", fix_winding=False, suptitle="No fix winding")
```
antimeridian-0.3.8/docs/examples/ 0000775 0000000 0000000 00000000000 14644060706 0016743 5 ustar 00root root 0000000 0000000 antimeridian-0.3.8/docs/examples/S3A_SL_2_LST_20160521T015552_20160521T033651_6059_004_217_____.json0000664 0000000 0000000 00000041607 14644060706 0027543 0 ustar 00root root 0000000 0000000 {
"type" : "Feature",
"stac_version" : "1.0.0",
"id" : "S3A_SL_2_LST_20160521T015552_20160521T033651_6059_004_217_____",
"properties" : {
"sat:platform_international_designator" : "2016-011A",
"sat:orbit_state" : "descending",
"sat:absolute_orbit" : 1345,
"sat:relative_orbit" : 217,
"eo:cloud_cover" : 69.995412,
"start_datetime" : "2016-05-21 01:55:51.526891+00:00",
"end_datetime" : "2016-05-21 03:36:50.747700+00:00",
"instruments" : [ "SLSTR" ],
"s3:mode" : "EO",
"s3:productType" : "SL_2_LST___",
"s3:gsd" : {
"S1-S6" : 500,
"S7-S9 and F1-F2" : 1000
},
"s3:salineWaterPixels_percentage" : 60.225457,
"s3:landPixels_percentage" : 39.774543,
"s3:coastalPixels_percentage" : 0.108386,
"s3:freshInlandWaterPixels_percentage" : 0.515418,
"s3:tidalRegionPixels_percentage" : 0.815563,
"s3:cosmeticPixels_percentage" : 23.036702,
"s3:duplicatedPixels_percentage" : 5.515401,
"s3:saturatedPixels_percentage" : 0.0,
"s3:outOfRangePixels_percentage" : 0.0,
"s3:shape" : [ 1500, 35370 ],
"providers" : [ {
"name" : "ESA",
"roles" : [ "producer", "processor", "licensor" ],
"url" : "https://earth.esa.int/web/guest/home"
}, {
"name" : "Microsoft",
"roles" : [ "host", "processor" ],
"url" : "https://planetarycomputer.microsoft.com"
} ],
"platform" : "Sentinel-3A",
"constellation" : "Sentinel-3",
"datetime" : "2016-05-21T02:46:21.137295Z"
},
"geometry" : {
"type" : "Polygon",
"coordinates" : [ [ [ 30.2377, 89.6066 ], [ 127.863, 89.7997 ], [ 169.548, 89.4129 ], [ 176.741, 88.9698 ], [ 179.493, 88.5176 ], [ -179.038, 88.0634 ], [ -178.127, 87.6082 ], [ -177.507, 87.1526 ], [ -177.21, 86.6909 ], [ -176.731, 86.234 ], [ -176.467, 85.7811 ], [ -176.332, 85.3206 ], [ -176.107, 84.8668 ], [ -175.917, 84.4154 ], [ -175.792, 83.9589 ], [ -175.706, 83.4959 ], [ -175.612, 83.041 ], [ -175.541, 82.5833 ], [ -175.471, 82.1318 ], [ -175.411, 81.6744 ], [ -175.361, 81.218 ], [ -175.263, 80.7608 ], [ -175.226, 80.3002 ], [ -175.203, 79.8445 ], [ -175.131, 79.3929 ], [ -175.095, 78.9362 ], [ -175.061, 78.4795 ], [ -175.048, 78.0219 ], [ -175.022, 77.5607 ], [ -175.013, 77.1017 ], [ -174.965, 76.9301 ], [ -168.227, 76.8626 ], [ -157.653, 76.3931 ], [ -148.044, 75.5193 ], [ -139.685, 74.3084 ], [ -91.2522, 32.4953 ], [ -90.4387, 30.0976 ], [ -89.6646, 27.6948 ], [ -88.9254, 25.2875 ], [ -88.217, 22.8761 ], [ -87.5361, 20.4613 ], [ -86.8794, 18.0434 ], [ -86.2451, 15.6252 ], [ -85.6292, 13.2023 ], [ -85.0305, 10.7774 ], [ -84.4469, 8.35092 ], [ -83.8766, 5.92304 ], [ -83.3181, 3.49408 ], [ -82.7699, 1.06432 ], [ -82.2306, -1.36601 ], [ -81.6988, -3.79666 ], [ -81.1734, -6.22741 ], [ -80.6531, -8.65805 ], [ -80.1367, -11.0884 ], [ -79.6231, -13.5182 ], [ -79.1112, -15.9473 ], [ -78.5996, -18.3756 ], [ -78.0873, -20.8028 ], [ -77.5729, -23.2289 ], [ -77.0551, -25.6536 ], [ -76.5324, -28.0768 ], [ -76.0031, -30.4985 ], [ -75.4654, -32.9184 ], [ -74.9174, -35.3364 ], [ -74.3567, -37.7525 ], [ -73.7806, -40.1664 ], [ -73.1859, -42.578 ], [ -72.5688, -44.9873 ], [ -71.9249, -47.394 ], [ -71.2487, -49.798 ], [ -70.5331, -52.199 ], [ -69.7696, -54.5967 ], [ -68.9472, -56.9909 ], [ -68.0514, -59.381 ], [ -67.0631, -61.7664 ], [ -65.9564, -64.1462 ], [ -64.6948, -66.5192 ], [ -63.2264, -68.8836 ], [ -61.4734, -71.2366 ], [ -59.3154, -73.5739 ], [ -56.5555, -75.8881 ], [ -52.8519, -78.1662 ], [ -47.5674, -80.3834 ], [ -39.4194, -82.4859 ], [ -25.7129, -84.3451 ], [ -1.89129, -85.6386 ], [ 30.9551, -85.8057 ], [ 57.7352, -84.7376 ], [ 73.4915, -82.9771 ], [ 82.6873, -80.9181 ], [ 88.5242, -78.7225 ], [ 92.5436, -76.4563 ], [ 95.4974, -74.1493 ], [ 97.7822, -71.8168 ], [ 99.6221, -69.467 ], [ 101.153, -67.1049 ], [ 102.46, -64.7336 ], [ 103.601, -62.355 ], [ 104.616, -59.9706 ], [ 105.533, -57.5813 ], [ 106.372, -55.1878 ], [ 107.149, -52.7906 ], [ 107.875, -50.39 ], [ 108.561, -47.9863 ], [ 109.212, -45.5799 ], [ 109.835, -43.1708 ], [ 110.435, -40.7593 ], [ 111.016, -38.3454 ], [ 111.58, -35.9294 ], [ 112.131, -33.5114 ], [ 112.671, -31.0915 ], [ 113.202, -28.6697 ], [ 113.726, -26.2464 ], [ 114.245, -23.8215 ], [ 114.76, -21.3952 ], [ 115.273, -18.9677 ], [ 115.785, -16.5391 ], [ 116.297, -14.1096 ], [ 116.81, -11.6794 ], [ 117.326, -9.24861 ], [ 117.845, -6.81746 ], [ 118.369, -4.38615 ], [ 118.899, -1.95488 ], [ 119.437, 0.476114 ], [ 119.983, 2.90661 ], [ 120.539, 5.33635 ], [ 121.106, 7.76507 ], [ 121.687, 10.1925 ], [ 122.282, 12.6184 ], [ 122.893, 15.0423 ], [ 123.524, 17.464 ], [ 124.175, 19.8832 ], [ 124.85, 22.2993 ], [ 125.552, 24.712 ], [ 126.283, 27.1208 ], [ 127.049, 29.5252 ], [ 127.853, 31.9246 ], [ 128.7, 34.3183 ], [ 129.597, 36.7056 ], [ 130.55, 39.0855 ], [ 131.569, 41.457 ], [ 132.662, 43.8189 ], [ 133.842, 46.1696 ], [ 135.124, 48.5074 ], [ 136.525, 50.8302 ], [ 138.066, 53.135 ], [ 139.776, 55.4187 ], [ 141.686, 57.6767 ], [ 143.841, 59.9035 ], [ 146.293, 62.092 ], [ 149.112, 64.2323 ], [ 152.385, 66.3119 ], [ 156.223, 68.3133 ], [ 160.767, 70.213 ], [ 166.181, 71.9793 ], [ 172.65, 73.5692 ], [ -179.661, 74.9267 ], [ -170.685, 75.9846 ], [ -160.558, 76.6715 ], [ -149.711, 76.9288 ], [ -149.721, 77.1079 ], [ -149.753, 77.5573 ], [ -149.775, 78.0215 ], [ -149.806, 78.4782 ], [ -149.865, 78.9344 ], [ -149.918, 79.3882 ], [ -149.935, 79.8425 ], [ -149.965, 80.2993 ], [ -150.054, 80.7592 ], [ -150.099, 81.2167 ], [ -150.148, 81.673 ], [ -150.199, 82.1309 ], [ -150.267, 82.5825 ], [ -150.349, 83.0389 ], [ -150.442, 83.4935 ], [ -150.546, 83.9494 ], [ -150.746, 84.414 ], [ -150.844, 84.8636 ], [ -150.971, 85.3269 ], [ -151.206, 85.7772 ], [ -151.567, 86.2331 ], [ -151.78, 86.6955 ], [ -152.235, 87.1493 ], [ -152.864, 87.6023 ], [ -153.828, 88.0611 ], [ -155.21, 88.5093 ], [ -158.21, 88.9683 ], [ -164.686, 89.4147 ], [ 155.449, 89.8008 ], [ 55.3032, 89.6085 ], [ 112.75, 87.4294 ], [ 116.195, 85.0549 ], [ 117.172, 82.6723 ], [ 117.494, 80.2872 ], [ 117.548, 77.9007 ], [ 117.466, 75.5133 ], [ 117.305, 73.1249 ], [ 117.094, 70.7355 ], [ 116.849, 68.3452 ], [ 116.579, 65.9539 ], [ 116.291, 63.5614 ], [ 115.987, 61.1678 ], [ 115.672, 58.773 ], [ 115.347, 56.377 ], [ 115.013, 53.9797 ], [ 114.671, 51.5811 ], [ 114.322, 49.1811 ], [ 113.966, 46.7799 ], [ 113.604, 44.3773 ], [ 113.235, 41.9734 ], [ 112.859, 39.5682 ], [ 112.477, 37.1618 ], [ 112.089, 34.7542 ], [ 111.693, 32.3456 ], [ 111.291, 29.9359 ], [ 110.881, 27.5253 ], [ 110.464, 25.1139 ], [ 110.039, 22.7019 ], [ 109.605, 20.2893 ], [ 109.162, 17.8764 ], [ 108.71, 15.4633 ], [ 108.247, 13.0502 ], [ 107.774, 10.6373 ], [ 107.288, 8.22478 ], [ 106.791, 5.81296 ], [ 106.28, 3.40207 ], [ 105.754, 0.992384 ], [ 105.212, -1.4158 ], [ 104.654, -3.82217 ], [ 104.077, -6.22637 ], [ 103.48, -8.62804 ], [ 102.861, -11.0268 ], [ 102.218, -13.4221 ], [ 101.549, -15.8137 ], [ 100.852, -18.2008 ], [ 100.122, -20.5831 ], [ 99.3579, -22.9598 ], [ 98.5549, -25.3303 ], [ 97.7089, -27.6937 ], [ 96.8149, -30.0492 ], [ 95.8672, -32.3957 ], [ 94.8594, -34.7322 ], [ 93.7835, -37.0573 ], [ 92.6308, -39.3694 ], [ 91.3908, -41.6666 ], [ 90.051, -43.9469 ], [ 88.5967, -46.2077 ], [ 87.0106, -48.4458 ], [ 85.2717, -50.6575 ], [ 83.3553, -52.8382 ], [ 81.2312, -54.9823 ], [ 78.8637, -57.0827 ], [ 76.2097, -59.1306 ], [ 73.2177, -61.1151 ], [ 69.8279, -63.0224 ], [ 65.9714, -64.835 ], [ 61.5728, -66.5313 ], [ 56.5558, -68.0844 ], [ 50.8543, -69.4618 ], [ 44.4333, -70.6263 ], [ 37.3138, -71.5376 ], [ 29.6006, -72.1572 ], [ 21.4945, -72.454 ], [ 13.2737, -72.4117 ], [ 5.24145, -72.0327 ], [ -2.33954, -71.3376 ], [ -9.29192, -70.3598 ], [ -15.5337, -69.139 ], [ -21.0604, -67.7148 ], [ -25.9173, -66.1236 ], [ -30.1742, -64.3963 ], [ -33.9081, -62.5585 ], [ -37.1931, -60.6309 ], [ -40.0961, -58.6297 ], [ -42.6746, -56.5681 ], [ -44.9779, -54.4564 ], [ -47.0474, -52.303 ], [ -48.9172, -50.1145 ], [ -50.6161, -47.8962 ], [ -52.1677, -45.6525 ], [ -53.5921, -43.387 ], [ -54.9059, -41.1027 ], [ -56.1232, -38.802 ], [ -57.2559, -36.487 ], [ -58.3141, -34.1594 ], [ -59.3064, -31.8208 ], [ -60.2402, -29.4724 ], [ -61.1218, -27.1153 ], [ -61.9567, -24.7506 ], [ -62.7498, -22.3791 ], [ -63.5051, -20.0015 ], [ -64.2263, -17.6185 ], [ -64.9166, -15.2307 ], [ -65.5788, -12.8388 ], [ -66.2155, -10.4431 ], [ -66.8287, -8.04415 ], [ -67.4206, -5.6424 ], [ -67.9928, -3.23821 ], [ -68.5469, -0.831951 ], [ -69.0843, 1.57605 ], [ -69.6064, 3.98547 ], [ -70.1141, 6.39603 ], [ -70.6086, 8.80746 ], [ -71.0908, 11.2195 ], [ -71.5615, 13.6319 ], [ -72.0215, 16.0445 ], [ -72.4715, 18.457 ], [ -72.9115, 20.8669 ], [ -73.3432, 23.2788 ], [ -73.7665, 25.6902 ], [ -74.1818, 28.1009 ], [ -74.5895, 30.5107 ], [ -74.9901, 32.9197 ], [ -75.3836, 35.3276 ], [ -80.5693, 81.5262 ], [ -79.9861, 83.9101 ], [ -78.1968, 86.29 ], [ -68.8649, 88.6452 ], [ 30.2377, 89.6066 ] ] ]
},
"links" : [ {
"rel" : "license",
"href" : "https://sentinel.esa.int/documents/247904/690755/Sentinel_Data_Legal_Notice"
} ],
"assets" : {
"safe-manifest" : {
"href" : "https://sentinel3euwest.blob.core.windows.net/sentinel-3/SLSTR/SL_2_LST___/2016/05/21/S3A_SL_2_LST____20160521T015552_20160521T033651_20180929T120407_6059_004_217______LR1_R_NT_003.SEN3/xfdumanifest.xml",
"type" : "application/xml",
"file:checksum" : "f040310fd6423d017400ba97839e687e",
"file:local_path" : "S3A_SL_2_LST____20160521T015552_20160521T033651_20180929T120407_6059_004_217______LR1_R_NT_003.SEN3/xfdumanifest.xml",
"file:size" : 4328608,
"roles" : [ "metadata" ]
},
"LST_IN" : {
"href" : "https://sentinel3euwest.blob.core.windows.net/sentinel-3/SLSTR/SL_2_LST___/2016/05/21/S3A_SL_2_LST____20160521T015552_20160521T033651_20180929T120407_6059_004_217______LR1_R_NT_003.SEN3/LST_in.nc",
"type" : "application/x-netcdf",
"description" : "Land Surface Temperature (LST) values",
"resolution" : [ 1000, 1000 ],
"eo:bands" : [ {
"name" : "S8",
"description" : "Band 8 - SST, LST, Active fire",
"center_wavelength" : 10854,
"band_width" : 776
}, {
"name" : "S9",
"description" : "Band 9 - SST, LST",
"center_wavelength" : 12022.5,
"band_width" : 905
} ],
"file:checksum" : "7223e12537b5e97a8911fc119baa0766",
"file:local_path" : "S3A_SL_2_LST____20160521T015552_20160521T033651_20180929T120407_6059_004_217______LR1_R_NT_003.SEN3/LST_in.nc",
"file:size" : 37016958,
"roles" : [ "data" ]
},
"LST_ANCILLARY_DS" : {
"href" : "https://sentinel3euwest.blob.core.windows.net/sentinel-3/SLSTR/SL_2_LST___/2016/05/21/S3A_SL_2_LST____20160521T015552_20160521T033651_20180929T120407_6059_004_217______LR1_R_NT_003.SEN3/LST_ancillary_ds.nc",
"type" : "application/x-netcdf",
"description" : "LST ancillary Data Set",
"resolution" : [ 1000, 1000 ],
"file:checksum" : "aeecead297c2e5b1b2c29f9fbcd2c513",
"file:local_path" : "S3A_SL_2_LST____20160521T015552_20160521T033651_20180929T120407_6059_004_217______LR1_R_NT_003.SEN3/LST_ancillary_ds.nc",
"file:size" : 65384444,
"roles" : [ "data" ]
},
"SLSTR_FLAGS_IN" : {
"href" : "https://sentinel3euwest.blob.core.windows.net/sentinel-3/SLSTR/SL_2_LST___/2016/05/21/S3A_SL_2_LST____20160521T015552_20160521T033651_20180929T120407_6059_004_217______LR1_R_NT_003.SEN3/flags_in.nc",
"type" : "application/x-netcdf",
"description" : "Global Flags Annotation Data Set",
"resolution" : [ 1000, 1000 ],
"file:checksum" : "fa74e33cc798206b474a5c8b75846b88",
"file:local_path" : "S3A_SL_2_LST____20160521T015552_20160521T033651_20180929T120407_6059_004_217______LR1_R_NT_003.SEN3/flags_in.nc",
"file:size" : 31808068,
"roles" : [ "data" ]
},
"SLSTR_INDICES_IN" : {
"href" : "https://sentinel3euwest.blob.core.windows.net/sentinel-3/SLSTR/SL_2_LST___/2016/05/21/S3A_SL_2_LST____20160521T015552_20160521T033651_20180929T120407_6059_004_217______LR1_R_NT_003.SEN3/indices_in.nc",
"type" : "application/x-netcdf",
"description" : "Indices Annotation Data Set",
"resolution" : [ 1000, 1000 ],
"file:checksum" : "ce3f8fea40b5bd2ab1b18d37a1cd6e21",
"file:local_path" : "S3A_SL_2_LST____20160521T015552_20160521T033651_20180929T120407_6059_004_217______LR1_R_NT_003.SEN3/indices_in.nc",
"file:size" : 20339860,
"roles" : [ "data" ]
},
"SLSTR_TIME_IN" : {
"href" : "https://sentinel3euwest.blob.core.windows.net/sentinel-3/SLSTR/SL_2_LST___/2016/05/21/S3A_SL_2_LST____20160521T015552_20160521T033651_20180929T120407_6059_004_217______LR1_R_NT_003.SEN3/time_in.nc",
"type" : "application/x-netcdf",
"description" : "Time Annotation Data Set",
"resolution" : [ 1000, 1000 ],
"file:checksum" : "14c11754e4dac4bf437ced6fd7623556",
"file:local_path" : "S3A_SL_2_LST____20160521T015552_20160521T033651_20180929T120407_6059_004_217______LR1_R_NT_003.SEN3/time_in.nc",
"file:size" : 226062,
"roles" : [ "data" ]
},
"SLSTR_GEODETIC_IN" : {
"href" : "https://sentinel3euwest.blob.core.windows.net/sentinel-3/SLSTR/SL_2_LST___/2016/05/21/S3A_SL_2_LST____20160521T015552_20160521T033651_20180929T120407_6059_004_217______LR1_R_NT_003.SEN3/geodetic_in.nc",
"type" : "application/x-netcdf",
"description" : "Geodetic Coordinates Annotation Data Set",
"resolution" : [ 1000, 1000 ],
"file:checksum" : "5eeea3aeb7d53713c430e7c72913729e",
"file:local_path" : "S3A_SL_2_LST____20160521T015552_20160521T033651_20180929T120407_6059_004_217______LR1_R_NT_003.SEN3/geodetic_in.nc",
"file:size" : 244129593,
"roles" : [ "data" ]
},
"SLSTR_CARTESIAN_IN" : {
"href" : "https://sentinel3euwest.blob.core.windows.net/sentinel-3/SLSTR/SL_2_LST___/2016/05/21/S3A_SL_2_LST____20160521T015552_20160521T033651_20180929T120407_6059_004_217______LR1_R_NT_003.SEN3/cartesian_in.nc",
"type" : "application/x-netcdf",
"description" : "Cartesian Coordinates Annotation Data Set",
"resolution" : [ 1000, 1000 ],
"file:checksum" : "6877435d2f7fa788e675009b8f0db964",
"file:local_path" : "S3A_SL_2_LST____20160521T015552_20160521T033651_20180929T120407_6059_004_217______LR1_R_NT_003.SEN3/cartesian_in.nc",
"file:size" : 137953915,
"roles" : [ "data" ]
},
"SLSTR_GEOMETRY_TN" : {
"href" : "https://sentinel3euwest.blob.core.windows.net/sentinel-3/SLSTR/SL_2_LST___/2016/05/21/S3A_SL_2_LST____20160521T015552_20160521T033651_20180929T120407_6059_004_217______LR1_R_NT_003.SEN3/geometry_tn.nc",
"type" : "application/x-netcdf",
"description" : "Solar and Satellite Annotation Data Set",
"resolution" : [ 16000, 1000 ],
"file:checksum" : "0e519f39abd4394ac44aab8494aa3d12",
"file:local_path" : "S3A_SL_2_LST____20160521T015552_20160521T033651_20180929T120407_6059_004_217______LR1_R_NT_003.SEN3/geometry_tn.nc",
"file:size" : 99823715,
"roles" : [ "data" ]
},
"SLSTR_GEODETIC_TX" : {
"href" : "https://sentinel3euwest.blob.core.windows.net/sentinel-3/SLSTR/SL_2_LST___/2016/05/21/S3A_SL_2_LST____20160521T015552_20160521T033651_20180929T120407_6059_004_217______LR1_R_NT_003.SEN3/geodetic_tx.nc",
"type" : "application/x-netcdf",
"description" : "Geodetic Coordinates Annotation Data Set",
"resolution" : [ 16000, 1000 ],
"file:checksum" : "31c6982a4cf18ff1d0f48e5c9ccb7ee0",
"file:local_path" : "S3A_SL_2_LST____20160521T015552_20160521T033651_20180929T120407_6059_004_217______LR1_R_NT_003.SEN3/geodetic_tx.nc",
"file:size" : 50111071,
"roles" : [ "data" ]
},
"SLSTR_CARTESIAN_TX" : {
"href" : "https://sentinel3euwest.blob.core.windows.net/sentinel-3/SLSTR/SL_2_LST___/2016/05/21/S3A_SL_2_LST____20160521T015552_20160521T033651_20180929T120407_6059_004_217______LR1_R_NT_003.SEN3/cartesian_tx.nc",
"type" : "application/x-netcdf",
"description" : "Cartesian Coordinates Annotation Data Set",
"resolution" : [ 16000, 1000 ],
"file:checksum" : "adfaca865f94381ffd792cdcb540ab25",
"file:local_path" : "S3A_SL_2_LST____20160521T015552_20160521T033651_20180929T120407_6059_004_217______LR1_R_NT_003.SEN3/cartesian_tx.nc",
"file:size" : 1806582,
"roles" : [ "data" ]
},
"SLSTR_MET_TX" : {
"href" : "https://sentinel3euwest.blob.core.windows.net/sentinel-3/SLSTR/SL_2_LST___/2016/05/21/S3A_SL_2_LST____20160521T015552_20160521T033651_20180929T120407_6059_004_217______LR1_R_NT_003.SEN3/met_tx.nc",
"type" : "application/x-netcdf",
"description" : "Meteorological Parameters Auxiliary Data Set",
"resolution" : [ 16000, 1000 ],
"file:checksum" : "670e50726e754f5a0fa54c1d00d99b9b",
"file:local_path" : "S3A_SL_2_LST____20160521T015552_20160521T033651_20180929T120407_6059_004_217______LR1_R_NT_003.SEN3/met_tx.nc",
"file:size" : 1002079660,
"roles" : [ "data" ]
}
},
"bbox" : [ -179.661, -85.8057, 179.493, 89.8008 ],
"stac_extensions" : [ "https://stac-extensions.github.io/file/v2.1.0/schema.json", "https://stac-extensions.github.io/sat/v1.0.0/schema.json", "https://stac-extensions.github.io/eo/v1.0.0/schema.json" ]
}
antimeridian-0.3.8/docs/examples/S3A_SL_2_LST_20160521T033651_20160521T051750_6059_004_218_____.json0000664 0000000 0000000 00000041534 14644060706 0027543 0 ustar 00root root 0000000 0000000 {
"type" : "Feature",
"stac_version" : "1.0.0",
"id" : "S3A_SL_2_LST_20160521T033651_20160521T051750_6059_004_218_____",
"properties" : {
"sat:platform_international_designator" : "2016-011A",
"sat:orbit_state" : "descending",
"sat:absolute_orbit" : 1346,
"sat:relative_orbit" : 218,
"eo:cloud_cover" : 76.199516,
"start_datetime" : "2016-05-21 03:36:50.747700+00:00",
"end_datetime" : "2016-05-21 05:17:49.968558+00:00",
"instruments" : [ "SLSTR" ],
"s3:mode" : "EO",
"s3:productType" : "SL_2_LST___",
"s3:gsd" : {
"S1-S6" : 500,
"S7-S9 and F1-F2" : 1000
},
"s3:salineWaterPixels_percentage" : 63.027585,
"s3:landPixels_percentage" : 36.972415,
"s3:coastalPixels_percentage" : 0.059344,
"s3:freshInlandWaterPixels_percentage" : 0.78588,
"s3:tidalRegionPixels_percentage" : 0.249145,
"s3:cosmeticPixels_percentage" : 22.989514,
"s3:duplicatedPixels_percentage" : 5.531053,
"s3:saturatedPixels_percentage" : 0.0,
"s3:outOfRangePixels_percentage" : 0.0,
"s3:shape" : [ 1500, 40396 ],
"providers" : [ {
"name" : "ESA",
"roles" : [ "producer", "processor", "licensor" ],
"url" : "https://earth.esa.int/web/guest/home"
}, {
"name" : "Microsoft",
"roles" : [ "host", "processor" ],
"url" : "https://planetarycomputer.microsoft.com"
} ],
"platform" : "Sentinel-3A",
"constellation" : "Sentinel-3",
"datetime" : "2016-05-21T04:27:20.358129Z"
},
"geometry" : {
"type" : "Polygon",
"coordinates" : [ [ [ 3.5561, 89.6105 ], [ 103.61, 89.8094 ], [ 145.253, 89.4159 ], [ 152.076, 88.973 ], [ 154.659, 88.5202 ], [ 156.034, 88.0656 ], [ 156.886, 87.6103 ], [ 157.465, 87.1545 ], [ 157.883, 86.6985 ], [ 158.174, 86.2354 ], [ 158.426, 85.7826 ], [ 158.551, 85.3224 ], [ 158.768, 84.8688 ], [ 158.95, 84.4169 ], [ 159.03, 83.9518 ], [ 159.147, 83.4982 ], [ 159.235, 83.0433 ], [ 159.3, 82.5856 ], [ 159.365, 82.1341 ], [ 159.421, 81.6767 ], [ 159.467, 81.2204 ], [ 159.563, 80.7644 ], [ 159.596, 80.3026 ], [ 159.616, 79.847 ], [ 159.684, 79.3943 ], [ 159.697, 78.9297 ], [ 159.745, 78.4728 ], [ 159.759, 78.0242 ], [ 159.782, 77.5629 ], [ 159.83, 77.1106 ], [ 159.839, 76.9314 ], [ 167.919, 76.8281 ], [ 179.81, 76.1957 ], [ -169.687, 75.0583 ], [ -160.854, 73.5201 ], [ -153.6, 71.6816 ], [ -147.68, 69.6236 ], [ -142.825, 67.4059 ], [ -138.801, 65.0707 ], [ -135.424, 62.648 ], [ -132.552, 60.1587 ], [ -130.078, 57.618 ], [ -127.92, 55.0369 ], [ -126.018, 52.4234 ], [ -124.322, 49.7838 ], [ -122.796, 47.1225 ], [ -121.412, 44.4434 ], [ -120.146, 41.7492 ], [ -118.979, 39.0423 ], [ -117.896, 36.3244 ], [ -116.886, 33.5972 ], [ -115.938, 30.8619 ], [ -115.044, 28.1196 ], [ -114.196, 25.3713 ], [ -113.388, 22.6177 ], [ -112.616, 19.8596 ], [ -111.874, 17.0976 ], [ -111.16, 14.3324 ], [ -110.469, 11.5643 ], [ -109.798, 8.79402 ], [ -109.145, 6.02187 ], [ -108.509, 3.25079 ], [ -107.884, 0.476216 ], [ -107.271, -2.29901 ], [ -106.668, -5.07455 ], [ -106.071, -7.85007 ], [ -105.481, -10.6253 ], [ -104.894, -13.3998 ], [ -104.31, -16.1735 ], [ -103.725, -18.946 ], [ -103.14, -21.7172 ], [ -102.551, -24.4867 ], [ -101.957, -27.2544 ], [ -101.355, -30.02 ], [ -100.742, -32.7834 ], [ -100.116, -35.5444 ], [ -99.4734, -38.3027 ], [ -98.8097, -41.0582 ], [ -98.12, -43.8108 ], [ -97.3983, -46.5601 ], [ -96.6371, -49.3058 ], [ -95.8265, -52.0478 ], [ -94.9542, -54.7856 ], [ -94.0037, -57.5186 ], [ -92.9525, -60.2461 ], [ -91.7694, -62.9672 ], [ -90.4098, -65.6802 ], [ -88.8067, -68.3829 ], [ -86.8567, -71.0716 ], [ -84.3901, -73.7402 ], [ -81.1097, -76.3776 ], [ -76.4542, -78.9625 ], [ -69.2515, -81.4479 ], [ -56.8219, -83.7158 ], [ -33.4376, -85.4314 ], [ 3.16629, -85.8424 ], [ 33.7911, -84.6406 ], [ 50.5409, -82.571 ], [ 59.7515, -80.1666 ], [ 65.4167, -77.6207 ], [ 69.2583, -75.0046 ], [ 72.0649, -72.3489 ], [ 74.2348, -69.6687 ], [ 75.9874, -66.972 ], [ 77.4533, -64.2634 ], [ 78.7141, -61.5457 ], [ 79.8237, -58.8209 ], [ 80.8191, -56.0902 ], [ 81.7264, -53.3543 ], [ 82.5646, -50.6141 ], [ 83.3481, -47.8698 ], [ 84.0877, -45.1218 ], [ 84.7918, -42.3705 ], [ 85.4673, -39.616 ], [ 86.1196, -36.8587 ], [ 86.7531, -34.0986 ], [ 87.3716, -31.336 ], [ 87.9784, -28.571 ], [ 88.5762, -25.8039 ], [ 89.1675, -23.0348 ], [ 89.7544, -20.264 ], [ 90.339, -17.4917 ], [ 90.9231, -14.7182 ], [ 91.5086, -11.9436 ], [ 92.0972, -9.16824 ], [ 92.6907, -6.39243 ], [ 93.2907, -3.61645 ], [ 93.8991, -0.840616 ], [ 94.5178, 1.93473 ], [ 95.1487, 4.70923 ], [ 95.7939, 7.4825 ], [ 96.4558, 10.2541 ], [ 97.1369, 13.0237 ], [ 97.8401, 15.7907 ], [ 98.5686, 18.5547 ], [ 99.326, 21.3151 ], [ 100.117, 24.0713 ], [ 100.945, 26.8225 ], [ 101.817, 29.5681 ], [ 102.739, 32.3072 ], [ 103.719, 35.0387 ], [ 104.766, 37.7614 ], [ 105.891, 40.474 ], [ 107.109, 43.1747 ], [ 108.435, 45.8615 ], [ 109.891, 48.5318 ], [ 111.503, 51.1823 ], [ 113.303, 53.809 ], [ 115.334, 56.4064 ], [ 117.651, 58.9674 ], [ 120.324, 61.4826 ], [ 123.448, 63.9389 ], [ 127.148, 66.3185 ], [ 131.586, 68.5959 ], [ 136.973, 70.7353 ], [ 143.565, 72.6858 ], [ 151.629, 74.3767 ], [ 161.353, 75.716 ], [ 172.656, 76.5981 ], [ -175.005, 76.9299 ], [ -175.015, 77.1091 ], [ -175.056, 77.5583 ], [ -175.074, 78.0226 ], [ -175.116, 78.4718 ], [ -175.174, 78.9356 ], [ -175.186, 79.3904 ], [ -175.249, 79.8437 ], [ -175.283, 80.3005 ], [ -175.323, 80.7608 ], [ -175.424, 81.2179 ], [ -175.477, 81.6741 ], [ -175.532, 82.132 ], [ -175.605, 82.5836 ], [ -175.693, 83.04 ], [ -175.793, 83.4947 ], [ -175.904, 83.9505 ], [ -176.045, 84.4068 ], [ -176.223, 84.8645 ], [ -176.35, 85.3278 ], [ -176.616, 85.7777 ], [ -176.856, 86.2402 ], [ -177.213, 86.6962 ], [ -177.734, 87.1491 ], [ -178.413, 87.602 ], [ -179.33, 88.0542 ], [ 179.059, 88.5092 ], [ 175.859, 88.9681 ], [ 169.062, 89.4125 ], [ 127.841, 89.7927 ], [ 31.3159, 89.6023 ], [ 88.3728, 87.0832 ], [ 91.334, 84.3689 ], [ 92.1041, 81.6471 ], [ 92.2952, 78.9229 ], [ 92.2493, 76.1973 ], [ 92.0829, 73.4705 ], [ 91.8461, 70.7424 ], [ 91.5645, 68.013 ], [ 91.2518, 65.2823 ], [ 90.9164, 62.5502 ], [ 90.5636, 59.8165 ], [ 90.1966, 57.0812 ], [ 89.8176, 54.3443 ], [ 89.4282, 51.6057 ], [ 89.0292, 48.8654 ], [ 88.6213, 46.1233 ], [ 88.2049, 43.3795 ], [ 87.78, 40.6341 ], [ 87.3468, 37.887 ], [ 86.905, 35.1384 ], [ 86.4544, 32.3883 ], [ 85.9946, 29.6369 ], [ 85.5253, 26.8844 ], [ 85.0459, 24.1309 ], [ 84.5557, 21.3766 ], [ 84.0541, 18.6217 ], [ 83.5403, 15.8665 ], [ 83.0133, 13.1113 ], [ 82.4721, 10.3563 ], [ 81.9155, 7.60194 ], [ 81.3423, 4.84853 ], [ 80.751, 2.09648 ], [ 80.1399, -0.653796 ], [ 79.5072, -3.40183 ], [ 78.8508, -6.14712 ], [ 78.1683, -8.88912 ], [ 77.457, -11.6272 ], [ 76.7138, -14.3608 ], [ 75.9352, -17.0891 ], [ 75.1171, -19.8114 ], [ 74.255, -22.5266 ], [ 73.3433, -25.234 ], [ 72.3757, -27.9321 ], [ 71.3449, -30.6199 ], [ 70.2421, -33.2956 ], [ 69.0572, -35.9575 ], [ 67.7777, -38.6035 ], [ 66.389, -41.2311 ], [ 64.8736, -43.8371 ], [ 63.2098, -46.4177 ], [ 61.3717, -48.9684 ], [ 59.3273, -51.4834 ], [ 57.0372, -53.9553 ], [ 54.4532, -56.3749 ], [ 51.5155, -58.7302 ], [ 48.1513, -61.0059 ], [ 44.2729, -63.182 ], [ 39.7774, -65.2323 ], [ 34.5524, -67.1234 ], [ 28.4873, -68.8129 ], [ 21.5009, -70.2491 ], [ 13.5863, -71.3737 ], [ 4.86213, -72.1278 ], [ -4.39163, -72.4637 ], [ -13.7635, -72.3577 ], [ -22.8088, -71.8172 ], [ -31.1711, -70.8793 ], [ -38.6481, -69.5983 ], [ -45.1874, -68.0342 ], [ -50.8386, -66.2427 ], [ -55.7005, -64.2709 ], [ -59.8875, -62.1569 ], [ -63.5084, -59.9307 ], [ -66.6587, -57.6149 ], [ -69.4192, -55.2274 ], [ -71.8561, -52.7817 ], [ -74.0233, -50.2884 ], [ -75.9648, -47.7558 ], [ -77.7159, -45.1904 ], [ -79.3059, -42.5975 ], [ -80.7584, -39.9811 ], [ -82.0928, -37.3446 ], [ -83.3255, -34.6911 ], [ -84.4698, -32.0226 ], [ -85.537, -29.3413 ], [ -86.5366, -26.6488 ], [ -87.4766, -23.9465 ], [ -88.3639, -21.2356 ], [ -89.2044, -18.5173 ], [ -90.003, -15.7924 ], [ -90.7642, -13.0619 ], [ -91.4918, -10.3265 ], [ -92.189, -7.58688 ], [ -92.8587, -4.84366 ], [ -93.5035, -2.09742 ], [ -94.1257, 0.651306 ], [ -94.7271, 3.40205 ], [ -95.3095, 6.15437 ], [ -95.8741, 8.90538 ], [ -96.4231, 11.6596 ], [ -96.9574, 14.4144 ], [ -97.478, 17.1692 ], [ -97.9858, 19.9239 ], [ -98.4818, 22.6781 ], [ -98.9667, 25.4317 ], [ -99.4412, 28.1844 ], [ -99.9059, 30.936 ], [ -100.361, 33.6864 ], [ -100.807, 36.4354 ], [ -101.245, 39.183 ], [ -101.674, 41.929 ], [ -102.095, 44.6734 ], [ -102.507, 47.4161 ], [ -102.911, 50.157 ], [ -103.305, 52.8963 ], [ -103.69, 55.6339 ], [ -104.063, 58.3698 ], [ -104.424, 61.1041 ], [ -104.768, 63.8369 ], [ -105.094, 66.5682 ], [ -105.393, 69.2982 ], [ -105.655, 72.0268 ], [ -105.862, 74.7542 ], [ -105.979, 77.4804 ], [ -105.934, 80.2053 ], [ -105.539, 82.9285 ], [ -104.142, 85.6481 ], [ -96.7984, 88.3481 ], [ 3.5561, 89.6105 ] ] ]
},
"links" : [ {
"rel" : "license",
"href" : "https://sentinel.esa.int/documents/247904/690755/Sentinel_Data_Legal_Notice"
} ],
"assets" : {
"safe-manifest" : {
"href" : "https://sentinel3euwest.blob.core.windows.net/sentinel-3/SLSTR/SL_2_LST___/2016/05/21/S3A_SL_2_LST____20160521T033651_20160521T051750_20180929T120412_6059_004_218______LR1_R_NT_003.SEN3/xfdumanifest.xml",
"type" : "application/xml",
"file:checksum" : "5a5f2ffb07d6077ca1f900670393f12d",
"file:local_path" : "S3A_SL_2_LST____20160521T033651_20160521T051750_20180929T120412_6059_004_218______LR1_R_NT_003.SEN3/xfdumanifest.xml",
"file:size" : 5020367,
"roles" : [ "metadata" ]
},
"LST_IN" : {
"href" : "https://sentinel3euwest.blob.core.windows.net/sentinel-3/SLSTR/SL_2_LST___/2016/05/21/S3A_SL_2_LST____20160521T033651_20160521T051750_20180929T120412_6059_004_218______LR1_R_NT_003.SEN3/LST_in.nc",
"type" : "application/x-netcdf",
"description" : "Land Surface Temperature (LST) values",
"resolution" : [ 1000, 1000 ],
"eo:bands" : [ {
"name" : "S8",
"description" : "Band 8 - SST, LST, Active fire",
"center_wavelength" : 10854,
"band_width" : 776
}, {
"name" : "S9",
"description" : "Band 9 - SST, LST",
"center_wavelength" : 12022.5,
"band_width" : 905
} ],
"file:checksum" : "6dcae6b8ffca7340d7304bf6b0b16b74",
"file:local_path" : "S3A_SL_2_LST____20160521T033651_20160521T051750_20180929T120412_6059_004_218______LR1_R_NT_003.SEN3/LST_in.nc",
"file:size" : 40564649,
"roles" : [ "data" ]
},
"LST_ANCILLARY_DS" : {
"href" : "https://sentinel3euwest.blob.core.windows.net/sentinel-3/SLSTR/SL_2_LST___/2016/05/21/S3A_SL_2_LST____20160521T033651_20160521T051750_20180929T120412_6059_004_218______LR1_R_NT_003.SEN3/LST_ancillary_ds.nc",
"type" : "application/x-netcdf",
"description" : "LST ancillary Data Set",
"resolution" : [ 1000, 1000 ],
"file:checksum" : "4db9630ce9201b6ac47c3df0af0bf786",
"file:local_path" : "S3A_SL_2_LST____20160521T033651_20160521T051750_20180929T120412_6059_004_218______LR1_R_NT_003.SEN3/LST_ancillary_ds.nc",
"file:size" : 66084917,
"roles" : [ "data" ]
},
"SLSTR_FLAGS_IN" : {
"href" : "https://sentinel3euwest.blob.core.windows.net/sentinel-3/SLSTR/SL_2_LST___/2016/05/21/S3A_SL_2_LST____20160521T033651_20160521T051750_20180929T120412_6059_004_218______LR1_R_NT_003.SEN3/flags_in.nc",
"type" : "application/x-netcdf",
"description" : "Global Flags Annotation Data Set",
"resolution" : [ 1000, 1000 ],
"file:checksum" : "da9741b3f32b0c3f25c8fbf9bcc86ac6",
"file:local_path" : "S3A_SL_2_LST____20160521T033651_20160521T051750_20180929T120412_6059_004_218______LR1_R_NT_003.SEN3/flags_in.nc",
"file:size" : 35499393,
"roles" : [ "data" ]
},
"SLSTR_INDICES_IN" : {
"href" : "https://sentinel3euwest.blob.core.windows.net/sentinel-3/SLSTR/SL_2_LST___/2016/05/21/S3A_SL_2_LST____20160521T033651_20160521T051750_20180929T120412_6059_004_218______LR1_R_NT_003.SEN3/indices_in.nc",
"type" : "application/x-netcdf",
"description" : "Indices Annotation Data Set",
"resolution" : [ 1000, 1000 ],
"file:checksum" : "8926de588e6a53e89f4011b18bb5a319",
"file:local_path" : "S3A_SL_2_LST____20160521T033651_20160521T051750_20180929T120412_6059_004_218______LR1_R_NT_003.SEN3/indices_in.nc",
"file:size" : 22876623,
"roles" : [ "data" ]
},
"SLSTR_TIME_IN" : {
"href" : "https://sentinel3euwest.blob.core.windows.net/sentinel-3/SLSTR/SL_2_LST___/2016/05/21/S3A_SL_2_LST____20160521T033651_20160521T051750_20180929T120412_6059_004_218______LR1_R_NT_003.SEN3/time_in.nc",
"type" : "application/x-netcdf",
"description" : "Time Annotation Data Set",
"resolution" : [ 1000, 1000 ],
"file:checksum" : "410fe967b53bbbe27128034914556dd1",
"file:local_path" : "S3A_SL_2_LST____20160521T033651_20160521T051750_20180929T120412_6059_004_218______LR1_R_NT_003.SEN3/time_in.nc",
"file:size" : 249061,
"roles" : [ "data" ]
},
"SLSTR_GEODETIC_IN" : {
"href" : "https://sentinel3euwest.blob.core.windows.net/sentinel-3/SLSTR/SL_2_LST___/2016/05/21/S3A_SL_2_LST____20160521T033651_20160521T051750_20180929T120412_6059_004_218______LR1_R_NT_003.SEN3/geodetic_in.nc",
"type" : "application/x-netcdf",
"description" : "Geodetic Coordinates Annotation Data Set",
"resolution" : [ 1000, 1000 ],
"file:checksum" : "788d0f11bd665688819acc8b63fc5d96",
"file:local_path" : "S3A_SL_2_LST____20160521T033651_20160521T051750_20180929T120412_6059_004_218______LR1_R_NT_003.SEN3/geodetic_in.nc",
"file:size" : 278868396,
"roles" : [ "data" ]
},
"SLSTR_CARTESIAN_IN" : {
"href" : "https://sentinel3euwest.blob.core.windows.net/sentinel-3/SLSTR/SL_2_LST___/2016/05/21/S3A_SL_2_LST____20160521T033651_20160521T051750_20180929T120412_6059_004_218______LR1_R_NT_003.SEN3/cartesian_in.nc",
"type" : "application/x-netcdf",
"description" : "Cartesian Coordinates Annotation Data Set",
"resolution" : [ 1000, 1000 ],
"file:checksum" : "61e403ab80261a9e044f4f7fd30d1284",
"file:local_path" : "S3A_SL_2_LST____20160521T033651_20160521T051750_20180929T120412_6059_004_218______LR1_R_NT_003.SEN3/cartesian_in.nc",
"file:size" : 157020445,
"roles" : [ "data" ]
},
"SLSTR_GEOMETRY_TN" : {
"href" : "https://sentinel3euwest.blob.core.windows.net/sentinel-3/SLSTR/SL_2_LST___/2016/05/21/S3A_SL_2_LST____20160521T033651_20160521T051750_20180929T120412_6059_004_218______LR1_R_NT_003.SEN3/geometry_tn.nc",
"type" : "application/x-netcdf",
"description" : "Solar and Satellite Annotation Data Set",
"resolution" : [ 16000, 1000 ],
"file:checksum" : "e226dbb1886eeb6c8d34a40270a80c92",
"file:local_path" : "S3A_SL_2_LST____20160521T033651_20160521T051750_20180929T120412_6059_004_218______LR1_R_NT_003.SEN3/geometry_tn.nc",
"file:size" : 113696941,
"roles" : [ "data" ]
},
"SLSTR_GEODETIC_TX" : {
"href" : "https://sentinel3euwest.blob.core.windows.net/sentinel-3/SLSTR/SL_2_LST___/2016/05/21/S3A_SL_2_LST____20160521T033651_20160521T051750_20180929T120412_6059_004_218______LR1_R_NT_003.SEN3/geodetic_tx.nc",
"type" : "application/x-netcdf",
"description" : "Geodetic Coordinates Annotation Data Set",
"resolution" : [ 16000, 1000 ],
"file:checksum" : "4357c8de6455a093a696b2ff09cace1e",
"file:local_path" : "S3A_SL_2_LST____20160521T033651_20160521T051750_20180929T120412_6059_004_218______LR1_R_NT_003.SEN3/geodetic_tx.nc",
"file:size" : 57242613,
"roles" : [ "data" ]
},
"SLSTR_CARTESIAN_TX" : {
"href" : "https://sentinel3euwest.blob.core.windows.net/sentinel-3/SLSTR/SL_2_LST___/2016/05/21/S3A_SL_2_LST____20160521T033651_20160521T051750_20180929T120412_6059_004_218______LR1_R_NT_003.SEN3/cartesian_tx.nc",
"type" : "application/x-netcdf",
"description" : "Cartesian Coordinates Annotation Data Set",
"resolution" : [ 16000, 1000 ],
"file:checksum" : "51f4e9b349a4649596e048b3f3bb6551",
"file:local_path" : "S3A_SL_2_LST____20160521T033651_20160521T051750_20180929T120412_6059_004_218______LR1_R_NT_003.SEN3/cartesian_tx.nc",
"file:size" : 2074096,
"roles" : [ "data" ]
},
"SLSTR_MET_TX" : {
"href" : "https://sentinel3euwest.blob.core.windows.net/sentinel-3/SLSTR/SL_2_LST___/2016/05/21/S3A_SL_2_LST____20160521T033651_20160521T051750_20180929T120412_6059_004_218______LR1_R_NT_003.SEN3/met_tx.nc",
"type" : "application/x-netcdf",
"description" : "Meteorological Parameters Auxiliary Data Set",
"resolution" : [ 16000, 1000 ],
"file:checksum" : "4211318fe0259c3f3c54bd8ca129e50e",
"file:local_path" : "S3A_SL_2_LST____20160521T033651_20160521T051750_20180929T120412_6059_004_218______LR1_R_NT_003.SEN3/met_tx.nc",
"file:size" : 1157869919,
"roles" : [ "data" ]
}
},
"bbox" : [ -179.33, -85.8424, 179.81, 89.8094 ],
"stac_extensions" : [ "https://stac-extensions.github.io/file/v2.1.0/schema.json", "https://stac-extensions.github.io/sat/v1.0.0/schema.json", "https://stac-extensions.github.io/eo/v1.0.0/schema.json" ]
}
antimeridian-0.3.8/docs/examples/crossing.json 0000664 0000000 0000000 00000000645 14644060706 0021472 0 ustar 00root root 0000000 0000000 {
"type": "Polygon",
"coordinates": [
[
[
140,
-20
],
[
220,
-20
],
[
220,
20
],
[
140,
20
],
[
140,
-20
]
]
]
}
antimeridian-0.3.8/docs/examples/wrapped.json 0000664 0000000 0000000 00000000647 14644060706 0021307 0 ustar 00root root 0000000 0000000 {
"type": "Polygon",
"coordinates": [
[
[
140,
-20
],
[
-140,
-20
],
[
-140,
20
],
[
140,
20
],
[
140,
-20
]
]
]
}
antimeridian-0.3.8/docs/failure-modes.md 0000664 0000000 0000000 00000010417 14644060706 0020206 0 ustar 00root root 0000000 0000000 # Failure modes
Our algorithm doesn't always work.
It breaks down when a geometry's edge comes very close to a pole, which usually means the GeoJSON geometry is especially strange.
Here's one real-world example from a [Sentinel 3](https://sentinels.copernicus.eu/web/sentinel/missions/sentinel-3) [STAC](https://stacspec.org/) Item:
```python
import json
from pathlib import Path
from typing import Any, Dict
from cartopy.crs import RotatedPole, PlateCarree
from matplotlib import pyplot
def read_example(name: str) -> Dict[str, Any]:
with open(Path("examples") / f"{name}.json") as f:
return json.load(f)
data = read_example("S3A_SL_2_LST_20160521T015552_20160521T033651_6059_004_217_____")
x = list()
y = list()
for point in data["geometry"]["coordinates"][0]:
x.append(point[0])
y.append(point[1])
rotated_pole = RotatedPole(pole_latitude=37.5, pole_longitude=177.5)
plate_carree = PlateCarree()
axes = pyplot.axes(projection=rotated_pole)
axes.set_title("S3A_SL_2_LST_20160521T015552_20160521T033651_6059_004_217_____")
axes.coastlines()
axes.gridlines()
axes.plot(x, y, marker="o", transform=plate_carree)
axes.set_xlim(-90, 90)
pyplot.show()
```
## What's an algorithm to do?
Our normal algorithm can't handle this strange geometry:
```python
import antimeridian
import shapely.geometry
from cartopy.crs import Mollweide, PlateCarree
from shapely.geometry import Polygon, MultiPolygon
def plot(input: Polygon, output: Polygon | MultiPolygon, name: str) -> None:
figure = pyplot.figure()
figure.suptitle(name)
axes = figure.add_subplot(2, 2, 1, projection=PlateCarree())
axes.set_title("Original in PlateCarree")
axes.stock_img()
axes.coastlines()
axes.add_geometries(input, crs=PlateCarree(), color="coral", alpha=0.7)
axes = figure.add_subplot(2, 2, 2, projection=PlateCarree())
axes.set_title("Fixed in PlateCarree")
axes.stock_img()
axes.coastlines()
axes.add_geometries(output, crs=PlateCarree(), color="coral", alpha=0.7)
axes = figure.add_subplot(2, 2, 3, projection=Mollweide(central_longitude=180))
axes.set_title("Original in Mollweide")
axes.stock_img()
axes.coastlines()
axes.add_geometries(input, crs=PlateCarree(), color="coral", alpha=0.7)
axes = figure.add_subplot(2, 2, 4, projection=Mollweide(central_longitude=180))
axes.set_title("Fixed in Mollweide")
axes.stock_img()
axes.coastlines()
axes.add_geometries(output, crs=PlateCarree(), color="coral", alpha=0.7)
pyplot.show()
input = shapely.geometry.shape(data["geometry"])
output = shapely.geometry.shape(antimeridian.fix_geojson(data["geometry"]))
plot(input, output, "S3A_SL_2_LST_20160521T015552_20160521T033651_6059_004_217_____")
```
## Force the geometry over the north pole
In some cases, we can use our priors to help the algorithm out.
Here, we can force our fixer to extend the geometry over the north pole, which provides a better result:
```python
output = shapely.geometry.shape(
antimeridian.fix_geojson(data["geometry"], force_north_pole=True)
)
plot(
input,
output,
"S3A_SL_2_LST_20160521T015552_20160521T033651_6059_004_217_____\n(forced north pole)",
)
```
## It doesn't always work
Some geometries are so bad that even our north pole hack doesn't produce a valid result:
```python
data = read_example("S3A_SL_2_LST_20160521T033651_20160521T051750_6059_004_218_____")
input = shapely.geometry.shape(data["geometry"])
output = shapely.geometry.shape(
antimeridian.fix_geojson(data["geometry"], force_north_pole=True)
).buffer(0)
plot(
input,
output,
"S3A_SL_2_LST_20160521T033651_20160521T051750_6059_004_218_____\n(forced north pole)",
)
```
In this case, you're better off not using the **antimeridian** package at all, but instead using [shapely's buffer(0) fixer](https://shapely.readthedocs.io/en/stable/manual.html#constructive-methods).
You lose the pole coverage, but at least your geometry is close to what you want:
```python
input = shapely.geometry.shape(data["geometry"])
output = input.buffer(0)
plot(
input,
output,
"S3A_SL_2_LST_20160521T033651_20160521T051750_6059_004_218_____\n(buffer(0))",
)
```
## Conclusions
It's a messy business, dealing with these improperly constructed GeoJSON geometries.
There's probably not going to be one solution that works for every case.
antimeridian-0.3.8/docs/img/ 0000775 0000000 0000000 00000000000 14644060706 0015701 5 ustar 00root root 0000000 0000000 antimeridian-0.3.8/docs/img/another-delta.png 0000664 0000000 0000000 00000316434 14644060706 0021151 0 ustar 00root root 0000000 0000000 ‰PNG
IHDR Æ $ WÍ… IDATx^ìÝ ”\U½>lÒ “
2Á"¨((( EEÀEQœ'TQÁYATEôª8*
(¢ ‚ýQQH:I“Ë ×«ABBÒüßÍW¯r¨îªJ:¡ûÔsÖÚ«ºªöös¬Ê[¿ÚgÂ: @€ @€ ÐCzh¬†J€ @€ @€ ÖŒ» @€ @€ @ §ã=uº
– @€ @€ ã® @€ @€ è)ÁxOnƒ%@€ @€ @€ Á¸k€ @€ @€ zJ@0ÞS§Û` @€ @€ @@0î @€ @€ @€ žŒ÷Ôé6X @€ @€ Œ» @€ @€ @ §ã=uº
– @€ @€ ã® @€ @€ è)ÁxOnƒ%@€ @€ @€ Á¸k€ @€ @€ zJ@0ÞS§Û` @€ @€ @@0î @€ @€ @€ žŒ÷Ôé6X @€ @€ Œ» @€ @€ @ §ã=uº
– @€ @€ ã® @€ @€ è)ÁxOnƒ%@€ @€ @€ Á¸k€ @€ @€ zJ@0ÞS§Û` @€ @€ @@0î @€ @€ @€ žŒ÷Ôé6X @€ @€ ¬™3gî´|ùòãï¹çžûúúŸ7oÞܵ³çö{Œ·7Òƒ @€ @€ º˜6mÚÁ&LøÎÐ* Ç_¸`Á‚¯•ç“'O~ÐFm4qΜ9ÿìb“£ÚU0>ªœ6F€ @€ @€ Þ˜:uêcR!þ‡ŠÂEç{åq£Æßs˜_¾—¯»îºçÝxãKÖ–œ`|mIÛ @€ @€ VS`Ê”)X¸p᫹™5ºúÖ[oýãìài]ä/HUùµ]®·JÝã«Äf% @€ @€ ¬=éÓ§?){ûbÂãíòxéüùóŸ¾:{Ÿ1cÆ–YÿÙÞ¬Òò÷”<þ3ÕÛ7d
”oö÷÷ß²*ÛO(¾o9¾UY·¬“cØ/áx Ö×è"_£¼6N€ @€ @€ ÕH(¾ã‹›¶òÇã;t»Õ„ÖeÓž“ö„Ö_”p|·Ü,óO«°4öÑíªCý
ÎøßUÝ@'ë Æ;QÒ‡ @€ @€ ÷ƒ@æëÞ1UÜ¿¯ìº«`<7ÂÜ+A÷IÙÆ>]á3 ß_ÛEÿuR…>#¡öÜaÖù~^ÿiþëóxSÆ´}þÞ3¿-mhÎñ¡UÏ;_Ö;»í+ïV¬Ãþùça9±oÎ÷ì\G¯òÿM7 @€ @€ Æ@BñÍ¡øÔÊávŒgýÝ’Ož–¶w·ÃM¶yI2Íš×Ûb‹-˜›dn›ím“×gæñ× °¯ê“ þ]yíÔûúJúÑêRÅ^¶õ³´•Æ8qâÄÇÎ;·ú…@·Ã¶¿`|Ô(ÿÿ
å(ÇoóÊÐ7+¾]™5kÖú‹/~ÐÍ7ßü÷5°k›$@€ @€ @ ;C9¸ÅpFƳަ ¶OIFù†(¥Ïìô™Ÿ>wæïÍzY7S©|ªÌEž÷J{^úÝ熚É:7ºýöÛï(ûI±ð
9ÐWÚmÂô-nºé¦Û†;–ø³òÀ_+0½T¹¯‘E0>ʬå[“
6ØàúÊðÇìæº´ýÒÚØå¢<þ<ý~u÷ÝwŸ}Ë-·Ü>ʇbs @€ @€ ŒSß¾6áôYÃþ°ÁxBñ=²Î…M9duçe»ç&ô.UÚË›ß,ÕÛyoÿ¼ÖŸ0ûÊ¥K—Ÿ¿mC¸Yì$\cš”¡î%ÿ|w¶7}•ãqɾߓ'6uš“ínÛn½U}\ãùæ`ÃLº¾$ƒ\Õ¯éõrß™}¼¿Ûýä¢yY~špn·ëéO€ @€ @€@½fΜ¹ýòåËÿ<¨Zã¥hwýõ×ÿŸ¬W³»lêÜeË–¸páÂí´’q>7}ÎL*ò®RnÎy^2͆¦RÉ:H§ã†:æ½3“wÝn_Cïo¹å–“×[o½•ªÊc0-3otºnú‹`<ߎL ô2°Rq½Nsy~7ƒê[Êÿó÷#rrf•–¿§äñŸ)׿!ûùfÿ-«²Ý¶ÚjóÌ}ó·UY·±ÎI¹NYõJ€ @€ @€À8HÈüó¡Ü˜r¸¥e0>\ žÌóí©Úþp;–¬¿EÂèO¥ßaÃô-Ó¯œ”Jò³o½õÖ7õéË1—@~Ež}>9ûüe»}6¿Ÿmü0Ïï̀˒}í•pýÊn¶Ñiß1Œ7îdzM3j¾Ù˜œo6º
ƒºC¶q`ÚsÒž0Pù¶c·œ´?uŠ8Ô/?8&'«íÖf»{4OXßí1èO€ @€ @€ÀøH–ynFðÒ¦QÌÉßå&•CKË`<3nìØ¸YçJ ÜÈ2û|fV:?Uµy™åÔ,Ÿ54Ÿxó²î“óüM¯
$ãÜ:ÏïéæL$_=+ùêk›Öyi¶óån¶Ñiß1Œo³Í6N^¾UxTó€º ÆSm¾W‚î2Iû>¢¤ßŠ›ev±NùV¤Lß|~}Žá;yò›\„³Ëñçùóüèêdôyý/ùVæ±™2fqûÖ• @€ @€ $$~X†ó°;ï¼ó/xÀžñ²¦á
7Çø¤¬7»Å
0oËkÏMõu©D¯.å&Ÿe
”VÓC—"â&Ó