Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@cligj.projection_projected_opt
@cligj.projection_mercator_opt
def cmd(projection):
click.echo("%s" % projection)
@cligj.projection_projected_opt
@options.sequence_opt
@cligj.use_rs_opt
@cligj.geojson_type_feature_opt(True)
@cligj.geojson_type_bbox_opt(False)
@click.option('--band/--mask', default=True,
help="Choose to extract from a band (the default) or a mask.")
@click.option('--bidx', 'bandidx', type=int, default=None,
help="Index of the band or mask that is the source of shapes.")
@click.option('--sampling', type=int, default=1,
help="Inverse of the sampling fraction; "
"a value of 10 decimates.")
@click.option('--with-nodata/--without-nodata', default=False,
help="Include or do not include (the default) nodata regions.")
@click.option('--as-mask/--not-as-mask', default=False,
help="Interpret a band as a mask and output only one class of "
"valid data shapes.")
@projection_projected_opt
@projection_mercator_opt
@click.option(
'--dst-crs', default='', metavar="EPSG:NNNN", callback=to_lower,
help="Output in specified coordinates.")
@options.sequence_opt
@use_rs_opt
@geojson_type_collection_opt(True)
@geojson_type_feature_opt(False)
@geojson_type_bbox_opt(False)
@click.pass_context
def bounds(ctx, input, precision, indent, compact, projection, dst_crs,
sequence, use_rs, geojson_type):
"""Write bounding boxes to stdout as GeoJSON for use with, e.g.,
geojsonio
$ rio bounds *.tif | geojsonio
@cligj.projection_projected_opt
@cligj.sequence_opt
@cligj.use_rs_opt
@click.option(
'--bidx', type=click.INT, default=0,
help="Index of the band that is the source of shapes.")
@click.pass_context
def blocks(
ctx, input, output, precision, indent, compact, projection, sequence,
use_rs, bidx):
"""Write dataset blocks as GeoJSON features.
This command writes features describing a raster's internal blocks, which
are used directly for raster I/O. These features can be used to visualize
how a windowed operation would operate using those blocks.
@projection_projected_opt
@projection_mercator_opt
@click.option(
'--dst-crs', default='', metavar="EPSG:NNNN", callback=to_lower,
help="Output in specified coordinates.")
@sequence_opt
@use_rs_opt
@geojson_type_collection_opt(True)
@geojson_type_feature_opt(False)
@geojson_type_bbox_opt(False)
@click.pass_context
def bounds(ctx, input, precision, indent, compact, projection, dst_crs,
sequence, use_rs, geojson_type):
"""Write bounding boxes to stdout as GeoJSON for use with, e.g.,
geojsonio
$ rio bounds *.tif | geojsonio
@projection_projected_opt
@projection_mercator_opt
@sequence_opt
@use_rs_opt
@geojson_type_collection_opt(True)
@geojson_type_feature_opt(False)
@geojson_type_bbox_opt(False)
@click.pass_context
def bounds(ctx, input, precision, indent, compact, projection, sequence,
use_rs, geojson_type):
"""Write bounding boxes to stdout as GeoJSON for use with, e.g.,
geojsonio
$ rio bounds *.tif | geojsonio
"""
import rasterio.warp
@projection_projected_opt
@sequence_opt
@use_rs_opt
@geojson_type_feature_opt(True)
@geojson_type_bbox_opt(False)
@click.option('--band/--mask', default=True,
help="Choose to extract from a band (the default) or a mask.")
@click.option('--bidx', 'bandidx', type=int, default=None,
help="Index of the band or mask that is the source of shapes.")
@click.option('--sampling', type=int, default=1,
help="Inverse of the sampling fraction; "
"a value of 10 decimates.")
@click.option('--with-nodata/--without-nodata', default=False,
help="Include or do not include (the default) nodata regions.")
@click.option('--as-mask/--not-as-mask', default=False,
help="Interpret a band as a mask and output only one class of "
"valid data shapes.")