Skip to content

Commit

Permalink
fix: re-standardising TileByteCounts error TDE-850 (#644)
Browse files Browse the repository at this point in the history
* fix: re-standardising TileByteCounts error TDE-850

* test: restandardise

* fix: change target location for restandardise
  • Loading branch information
amfage authored Sep 8, 2023
1 parent 8cfc405 commit c762202
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/format-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,8 @@ jobs:
docker run -v ${HOME}/tmp/:/tmp/ topo-imagery python3 thumbnails.py --from-file ./tests/data/thumbnails.json --target /tmp/
cmp --silent ${HOME}/tmp/CB07_GeoTifv1-02-thumbnail.jpg ./scripts/tests/data/output/CB07_GeoTifv1-02-thumbnail.jpg
cmp --silent ${HOME}/tmp/CB07_TIFFv1-02-thumbnail.jpg ./scripts/tests/data/output/CB07_TIFFv1-02-thumbnail.jpg
- name: End to end test - Restandardise Aerial Imagery
run: |
docker run -v ${HOME}/tmp/:/tmp/ topo-imagery python3 standardise_validate.py --from-file ./tests/data/restandardise.json --preset webp --target-epsg 2193 --source-epsg 2193 --target /tmp/restandardise/ --collection-id 123 --start-datetime 2023-01-01 --end-datetime 2023-01-01
cmp --silent ${HOME}/tmp/restandardise/BG35_1000_4829.tiff ./scripts/tests/data/output/BG35_1000_4829.tiff
2 changes: 1 addition & 1 deletion scripts/standardising.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def standardising(
with tempfile.TemporaryDirectory() as tmp_path:
standardized_working_path = os.path.join(tmp_path, standardized_file_name)
sidecars = find_sidecars(files.inputs, [".prj", ".tfw"])
source_files = write_all(files.inputs + sidecars, tmp_path)
source_files = write_all(files.inputs + sidecars, f"{tmp_path}/source/")
source_tiffs = [file for file in source_files if is_tiff(file)]

vrt_add_alpha = True
Expand Down
6 changes: 6 additions & 0 deletions scripts/tests/data/restandardise.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
{
"output": "BG35_1000_4829",
"input": ["./tests/data/output/BG35_1000_4829.tiff"]
}
]

0 comments on commit c762202

Please sign in to comment.