Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Readme
Tiler Swift, the swiftest quadkey tiler in the wild west.
Features
This project provides a Python library and a thin command line wrapper on top of it to cut quadkey raster tiles.
Quadkey tiles are raster files of equal size (width, height) on a specific zoom level; the coordinate reference system is the Mercator Projection. The quadkey identifier is constructed by dividing the world into four, then dividing each cell into four again, and so on, recursively.
See
The quadkeys(dataset, z, nodata=0, tile_filter_fn=None)
function provides a generator yielding quadkeys and their associated data.
Args
dataset
: the rasterio dataset to cut quadkeys fromz
: the zoom level to cut quadkeys atnodata
: the value to use for fillingtile_filter_fn
: a function mercantile.Tile -> bool
to filter the quadkey generator withYields a tuple with
quadkey
: the quadkey name e.g. 1202121012
data
: the pixel data as a numpy ndarrayprofile
: the rasterio profile with metadata e.g. transformation for geo-referencingExample usage:
for quadkey, data, profile in quadkeys(dataset, z=args.zoom):
print(quadkey)
with rasterio.open(args.out, "w", **profile) as out:
out.write(data)
usage: tiler-swift [-h] -z ZOOM -o OUT [-n NODATA] raster
cuts quadkeys from raster
positional arguments:
raster raster to cut quadkeys from
optional arguments:
-h, --help show this help message and exit
-z ZOOM, --zoom ZOOM zoom level to cut quadkeys at (default: None)
-o OUT, --out OUT directory to write quadkeys to (default: None)
-n NODATA, --nodata NODATA
nodata value to use for filling at edges (default: None)
Example usage:
quadkeys input.tif -o output.tif -z 10 -n 0
For development
make
make run
$ tiler-swift --help
Inside the self-contained reproducible container
flake8 rfq
mypy rfq
pytest
Copyright © 2020 robofarm
Distributed under the MIT License (MIT).
FAQs
Tiler Swift, the swiftest quadkey tiler in the wild west
We found that tiler-swift demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.