Beispiel #1
0
    meridian = fields.Integer(required=True, load_only=True)
    degreesx = fields.Float(required=True, load_only=True)
    degreesy = fields.Float(required=True, load_only=True)
    bbox = fields.String(required=True, load_only=True)
    srid = fields.Integer(required=False, load_only=True)

    class Meta:
        """Internal meta information of form interface."""

        model = GridRefSys
        sqla_session = db.session
        exclude = ('table_id', )


INVALID_CUBE_NAME = 'Invalid data cube name. Expected only letters and numbers.'
SUPPORTED_DATA_TYPES = list(dtype_ranges.keys())


class BandDefinition(Schema):
    """Define a simple marshmallow structure for data cube bands on creation."""

    name = fields.String(required=True, allow_none=False)
    common_name = fields.String(required=True, allow_none=False)
    data_type = fields.String(required=True,
                              allow_none=False,
                              validate=OneOf(SUPPORTED_DATA_TYPES))
    nodata = fields.Integer(required=False, allow_none=False)
    metadata = fields.Dict(required=False, allow_none=False)


class QAConfidence(Schema):
Beispiel #2
0
              type=click.Path(exists=True),
              help="Clip output by geometry")
@click.option("--bidx", callback=_validate_bidx, help="Band indexes to copy.")
@click.option("--output-pyramid",
              type=click.Choice(tilematrix._conf.PYRAMID_PARAMS.keys()),
              help="Output pyramid to write to.")
@click.option(
    "--output-metatiling",
    type=click.INT,
    help="Output metatiling.",
)
@click.option("--output-format",
              type=click.Choice(available_output_formats()),
              help="Output format.")
@click.option("--output-dtype",
              type=click.Choice(dtype_ranges.keys()),
              help="Output data type (for raster output only).")
@click.option("--output-geometry-type",
              type=click.STRING,
              help="Output geometry type (for vector output only).")
@creation_options
@click.option("--scale-ratio",
              type=click.FLOAT,
              default=1.,
              help="Scaling factor (for raster output only).")
@click.option("--scale-offset",
              type=click.FLOAT,
              default=0.,
              help="Scaling offset (for raster output only).")
@utils.opt_resampling_method
@click.option("--overviews",