raster-mosaic 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. raster_mosaic-0.1.0/.gitignore +164 -0
  2. raster_mosaic-0.1.0/CHANGELOG.md +39 -0
  3. raster_mosaic-0.1.0/LICENSE +21 -0
  4. raster_mosaic-0.1.0/PKG-INFO +635 -0
  5. raster_mosaic-0.1.0/README.md +604 -0
  6. raster_mosaic-0.1.0/cog_policy.md +204 -0
  7. raster_mosaic-0.1.0/docs/running_on_hpc.md +413 -0
  8. raster_mosaic-0.1.0/pyproject.toml +93 -0
  9. raster_mosaic-0.1.0/src/raster_mosaic/__init__.py +0 -0
  10. raster_mosaic-0.1.0/src/raster_mosaic/_version.py +24 -0
  11. raster_mosaic-0.1.0/src/raster_mosaic/cli.py +474 -0
  12. raster_mosaic-0.1.0/src/raster_mosaic/config.py +355 -0
  13. raster_mosaic-0.1.0/src/raster_mosaic/flow.py +684 -0
  14. raster_mosaic-0.1.0/src/raster_mosaic/gdal_ops.py +1051 -0
  15. raster_mosaic-0.1.0/src/raster_mosaic/hpc/__init__.py +0 -0
  16. raster_mosaic-0.1.0/src/raster_mosaic/hpc/base.py +65 -0
  17. raster_mosaic-0.1.0/src/raster_mosaic/hpc/pbs.py +147 -0
  18. raster_mosaic-0.1.0/src/raster_mosaic/hpc/slurm.py +154 -0
  19. raster_mosaic-0.1.0/src/raster_mosaic/hpc/templates/pbs_mosaic.sh.tmpl +28 -0
  20. raster_mosaic-0.1.0/src/raster_mosaic/hpc/templates/pbs_reproject_array.sh.tmpl +34 -0
  21. raster_mosaic-0.1.0/src/raster_mosaic/hpc/templates/slurm_mosaic.sh.tmpl +33 -0
  22. raster_mosaic-0.1.0/src/raster_mosaic/hpc/templates/slurm_reproject_array.sh.tmpl +39 -0
  23. raster_mosaic-0.1.0/src/raster_mosaic/manifest.py +111 -0
  24. raster_mosaic-0.1.0/src/raster_mosaic/validity.py +155 -0
  25. raster_mosaic-0.1.0/tests/test_cli.py +417 -0
  26. raster_mosaic-0.1.0/tests/test_config.py +404 -0
  27. raster_mosaic-0.1.0/tests/test_flow.py +212 -0
  28. raster_mosaic-0.1.0/tests/test_gdal_ops.py +1301 -0
  29. raster_mosaic-0.1.0/tests/test_hpc.py +418 -0
  30. raster_mosaic-0.1.0/tests/test_manifest.py +126 -0
  31. raster_mosaic-0.1.0/tests/test_validity.py +246 -0
@@ -0,0 +1,164 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ public/*
15
+ downloads/
16
+ eggs/
17
+ .eggs/
18
+ lib/
19
+ lib64/
20
+ parts/
21
+ sdist/
22
+ var/
23
+ wheels/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+ *_version.py
30
+
31
+ # PyInstaller
32
+ # Usually these files are written by a python script from a template
33
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
34
+ *.manifest
35
+ *.spec
36
+
37
+ # Installer logs
38
+ pip-log.txt
39
+ pip-delete-this-directory.txt
40
+
41
+ # Unit test / coverage reports
42
+ htmlcov/
43
+ .tox/
44
+ .nox/
45
+ .coverage
46
+ .coverage.*
47
+ .cache
48
+ nosetests.xml
49
+ coverage.xml
50
+ *.cover
51
+ *.py,cover
52
+ .hypothesis/
53
+ .pytest_cache/
54
+ cover/
55
+
56
+ # Translations
57
+ *.mo
58
+ *.pot
59
+
60
+ # Django stuff:
61
+ *.log
62
+ local_settings.py
63
+ db.sqlite3
64
+ db.sqlite3-journal
65
+
66
+ # Flask stuff:
67
+ instance/
68
+ .webassets-cache
69
+
70
+ # Scrapy stuff:
71
+ .scrapy
72
+
73
+ # Sphinx documentation
74
+ docs/_build/
75
+ docs_test/
76
+
77
+ # PyBuilder
78
+ .pybuilder/
79
+ target/
80
+
81
+ # Jupyter Notebook
82
+ .ipynb_checkpoints
83
+
84
+ # IPython
85
+ profile_default/
86
+ ipython_config.py
87
+
88
+ # pyenv
89
+ # For a library or package, you might want to ignore these files since the code is
90
+ # intended to run in multiple environments; otherwise, check them in:
91
+ # .python-version
92
+
93
+ # pipenv
94
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
95
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
96
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
97
+ # install all needed dependencies.
98
+ #Pipfile.lock
99
+
100
+ # poetry
101
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
102
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
103
+ # commonly ignored for libraries.
104
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
105
+ #poetry.lock
106
+
107
+ # pdm
108
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
109
+ #pdm.lock
110
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
111
+ # in version control.
112
+ # https://pdm.fming.dev/#use-with-ide
113
+ .pdm.toml
114
+
115
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
116
+ __pypackages__/
117
+
118
+ # Celery stuff
119
+ celerybeat-schedule
120
+ celerybeat.pid
121
+
122
+ # SageMath parsed files
123
+ *.sage.py
124
+
125
+ # Environments
126
+ .env
127
+ .venv*
128
+ env/
129
+ venv/
130
+ ENV/
131
+ env.bak/
132
+ venv.bak/
133
+
134
+ # Spyder project settings
135
+ .spyderproject
136
+ .spyproject
137
+
138
+ # Rope project settings
139
+ .ropeproject
140
+
141
+ # mkdocs documentation
142
+ site/
143
+
144
+ # mypy
145
+ .mypy_cache/
146
+ .dmypy.json
147
+ dmypy.json
148
+
149
+ # Pyre type checker
150
+ .pyre/
151
+
152
+ # pytype static type analyzer
153
+ .pytype/
154
+
155
+ # Cython debug symbols
156
+ cython_debug/
157
+
158
+ # PyCharm
159
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
160
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
161
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
162
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
163
+ #.idea/
164
+ not_tracked/
@@ -0,0 +1,39 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [0.1.0] - 2026-10-14
11
+
12
+ First public release.
13
+
14
+ ### Added
15
+
16
+ - Reproject + mosaic of any GDAL-readable rasters (any number of bands, any dtype) to a
17
+ target CRS and resolution, with target-aligned pixels (`-tap`).
18
+ - Respects each input's own validity -- an internal valid-data mask band or a NoData value --
19
+ through reprojection and mosaicking, and chooses whether the output carries a mask band or a
20
+ NoData value (`output_validity`, `output_nodata`); conflicting inputs raise rather than guess.
21
+ - Final mosaic written as a Cloud Optimized GeoTIFF following `cog_policy.md` (creation
22
+ options, overviews and `PROCESSING_*` provenance tags), with overview resampling chosen by
23
+ `product_type`.
24
+ - Optional embedded band statistics (`compute_stats`) and histograms (`compute_histogram`).
25
+ - Optional land masking, extra dataset/band metadata, and band scale/offset.
26
+ - `build-manifest`, `reproject-tile` and `mosaic` commands, plus `submit-reproject` and
27
+ `submit-mosaic` to run the stages as PBS Pro or SLURM jobs, with reprojection as a chunked,
28
+ parallel array job.
29
+ - Container image with GDAL and this package, built by CI and published to
30
+ `registry.gitlab.com/jrsrp/sys/raster_mosaic`, so the HPC host needs no GDAL install.
31
+ - Optional Prefect + Dask flow (`flow` extra) running the stages on dask-jobqueue PBS/SLURM
32
+ workers, started with `raster-mosaic run` after pre-flight checks of the parameters, config,
33
+ inputs, output, container and Prefect API.
34
+ - `raster-mosaic --version`; the flow checks that the container's version matches the
35
+ installed package before doing any work.
36
+ - Published to PyPI as `raster-mosaic`, so it can be run with `uvx raster-mosaic`.
37
+
38
+ [Unreleased]: https://gitlab.com/jrsrp/sys/raster_mosaic/-/compare/0.1.0...main
39
+ [0.1.0]: https://gitlab.com/jrsrp/sys/raster_mosaic/-/tags/0.1.0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 The University of Queensland and contributors.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.