Skip to content

Commit

Permalink
add clip example
Browse files Browse the repository at this point in the history
  • Loading branch information
ungarj committed Mar 29, 2024
1 parent 3d2a457 commit 7143347
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
16 changes: 16 additions & 0 deletions examples/clip/clip.mapchete
@@ -0,0 +1,16 @@
process: mapchete.processes.clip
zoom_levels:
min: 0
max: 8
pyramid:
grid: geodetic
metatiling: 1
input:
inp: ../../test/testdata/cleantopo_br.tif
clip: ../../test/testdata/aoi_br.geojson

output:
path: output
format: GTiff
dtype: uint8
bands: 1
9 changes: 9 additions & 0 deletions test/conftest.py
Expand Up @@ -1111,6 +1111,15 @@ def threads_executor():
yield executor


@pytest.fixture
def example_clip(mp_tmpdir):
"""Fixture for examples/clip/clip.mapchete."""
with ProcessFixture(
EXAMPLES_DIR / "clip/clip.mapchete", output_tempdir=mp_tmpdir
) as example:
yield example


@pytest.fixture
def example_contours(mp_tmpdir):
"""Fixture for examples/contours/contours.mapchete."""
Expand Down
1 change: 1 addition & 0 deletions test/test_examples.py
Expand Up @@ -8,6 +8,7 @@
@pytest.mark.parametrize(
"process_fixture",
[
lazy_fixture("example_clip"),
lazy_fixture("example_contours"),
lazy_fixture("example_custom_grid"),
lazy_fixture("example_file_groups"),
Expand Down

0 comments on commit 7143347

Please sign in to comment.