Skip to main content

This module is used to ecoshard sets of files.

Usage:

python -m ecoshard \[original\_file\] --hashalg md5 --rename

(creates an ecoshard from original file with the md5 hash algorithm and renames the result rather than creating a new copy)

python -m ecoshard *.tif --compress --buildoverviews

(does a GIS compression of all *.tif files in the current directory and builds overviews for them and renames the result rather than making a new copy. Here if –rename had been passed an error would have been raised because rasters cannot be in-place compressed. The target output files will have the format [original_filename]_compressed_[hashalg]_[ecoshard][fileext])

python -m ecoshard *.tif --compress --buildoverviews --upload

(does the previous operation but also uploads the results to gs://ecoshard-root/working-shards and reports the target URLs to stdout)

python -m ecoshard *.tif ./outputs/*.tif --validate

(searches the .tif and ./outputs/.tif globs for ecoshard files and reports whether their hashes are valid or not)

Release History

Unreleased Changes

  • Changed behavior of command line funciton, now takes one of two primary commands process or publish. The command process behaves like the original command line utility with same arguments and behavior. The publish command takes a Google Bucket URI, host to an ecoshard server, and an api key and published the raster to that server.

  • Fixed an issue when summing up that would ignore nodata values.

  • Fixes an issue where the overview interpolation argument was ignored.

  • Added a download_and_unzip function to the API.

0.3.3 (2019/11/09)

  • Fixed an issue that would cause the download rate to be under estimated.

0.3.1 (2019/10/07)

  • Fixing an issue in download_to_url where the file might not be flushed and the final log message is not printed.

0.3.0 (2019/09/26)

  • Added a new command line mode –reduce_factor that reduces the number of pixels in a raster by that integer amount. Ex:

    python -m ecoshard base.tif --reduce_factor 4 max target.tif

    this call makes the size of the pixels in base.tif 4 times larger on the edge, thus reducing the total size of the image by 16 times, the convolution upsample is done with a “max” and the output file is target.tif. The modes “min”, “max”, “sum”, “average”, “mode” are available.

0.2.2 (2019/09/24)

  • Added a download_url function to ecoshard to fetch files via http(s).

  • Developing Flask module to visualize ecoshards.

0.2.1 (2019/06/28)

  • Hotfix: gs to gsutil for copying to buckets.

0.2.0 (2019/06/28)

  • Added functionality to download a url.

  • Added functionality to copy to a google bucket.

  • Fixed an issue on functions that should write a token file but didn’t.

0.1.1 (2019/06/27)

  • Added a --force flag to the command line utility.

0.0.2 (2019/06/26)

  • Initial release.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ecoshard-0.4.0.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ecoshard-0.4.0-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file ecoshard-0.4.0.tar.gz.

File metadata

  • Download URL: ecoshard-0.4.0.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0.post20200311 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2

File hashes

Hashes for ecoshard-0.4.0.tar.gz
Algorithm Hash digest
SHA256 4cbf2e4df2c503e6244443dde6ec18c55e6196a3aaf603ea087fc7706e847759
MD5 ff007e206f1ec985aa763ed96cf60ce1
BLAKE2b-256 97d69dc4c6e7a7ad8c87f8dcf27b100447569a57b2b497b1c26a8af2541574c0

See more details on using hashes here.

File details

Details for the file ecoshard-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: ecoshard-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0.post20200311 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2

File hashes

Hashes for ecoshard-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9556b748cf8c3b099d0d4c474ba90106c6f6144a906c69ea910ad8920b7a91ff
MD5 44138fc66f14a38c510c350b58305763
BLAKE2b-256 317b4cd41d8f5b84584b27e5ee9aaf8475e00b1406216576e3b7ce67c19718dc

See more details on using hashes here.

Release history Release notifications | RSS feed

0.7.0

1 file

0.6.0

1 file

0.5.0

3 files

0.4.1

1 file

This release

0.4.0 This release

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

1 file

0.3.0

1 file

0.2.2

1 file

0.2.1

2 files

0.2.0

2 files

0.1.1

2 files

0.0.2

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page