How to use the terracotta.server.flask_api.TILE_API.route function in terracotta

To help you get started, we’ve selected a few terracotta examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DHI-GRAS / terracotta / terracotta / server / rgb.py View on Github external
@TILE_API.route('/rgb/preview.png', methods=['GET'])
@TILE_API.route('/rgb//preview.png', methods=['GET'])
@convert_exceptions
def get_rgb_preview(keys: str = '') -> Any:
    """Return the requested RGB dataset preview as a PNG image.
    ---
    get:
        summary: /rgb (preview)
        description: Combine three datasets to RGB image, and return preview as PNG
        parameters:
            - in: path
              schema: RGBPreviewQuerySchema
            - in: query
              schema: RGBOptionSchema
        responses:
            200:
                description:
github DHI-GRAS / terracotta / terracotta / server / compute.py View on Github external
@TILE_API.route('/compute/preview.png', methods=['GET'])
@TILE_API.route('/compute//preview.png', methods=['GET'])
@convert_exceptions
def get_compute_preview(keys: str = '') -> Any:
    """Combine datasets into a single-band PNG image through a given mathematical expression
    ---
    get:
        summary: /compute (preview)
        description:
            Combine datasets into a single-band PNG image through a given mathematical expression
        parameters:
            - in: path
              schema: ComputePreviewSchema
            - in: query
              schema: ComputeOptionSchema
        responses:
            200:
github DHI-GRAS / terracotta / terracotta / server / rgb.py View on Github external
@TILE_API.route('/rgb////.png', methods=['GET'])
@convert_exceptions
def get_rgb(tile_z: int, tile_y: int, tile_x: int, keys: str = '') -> Any:
    """Return the requested RGB tile as a PNG image.
    ---
    get:
        summary: /rgb (tile)
        description: Combine three datasets to RGB image, and return tile as PNG
        parameters:
            - in: path
              schema: RGBQuerySchema
            - in: query
              schema: RGBOptionSchema
        responses:
            200:
                description:
                    PNG image of requested tile
github DHI-GRAS / terracotta / terracotta / server / rgb.py View on Github external
@TILE_API.route('/rgb//preview.png', methods=['GET'])
@convert_exceptions
def get_rgb_preview(keys: str = '') -> Any:
    """Return the requested RGB dataset preview as a PNG image.
    ---
    get:
        summary: /rgb (preview)
        description: Combine three datasets to RGB image, and return preview as PNG
        parameters:
            - in: path
              schema: RGBPreviewQuerySchema
            - in: query
              schema: RGBOptionSchema
        responses:
            200:
                description:
                    PNG image of requested tile
github DHI-GRAS / terracotta / terracotta / server / rgb.py View on Github external
@TILE_API.route('/rgb///.png', methods=['GET'])
@TILE_API.route('/rgb////.png', methods=['GET'])
@convert_exceptions
def get_rgb(tile_z: int, tile_y: int, tile_x: int, keys: str = '') -> Any:
    """Return the requested RGB tile as a PNG image.
    ---
    get:
        summary: /rgb (tile)
        description: Combine three datasets to RGB image, and return tile as PNG
        parameters:
            - in: path
              schema: RGBQuerySchema
            - in: query
              schema: RGBOptionSchema
        responses:
            200:
                description:
github DHI-GRAS / terracotta / terracotta / server / compute.py View on Github external
@TILE_API.route('/compute////.png',
                methods=['GET'])
@convert_exceptions
def get_compute(tile_z: int, tile_y: int, tile_x: int, keys: str = '') -> Any:
    """Combine datasets into a single-band PNG image through a given mathematical expression
    ---
    get:
        summary: /compute (tile)
        description:
            Combine datasets into a single-band PNG image through a given mathematical expression
        parameters:
            - in: path
              schema: ComputeQuerySchema
            - in: query
              schema: ComputeOptionSchema
        responses:
            200:
github DHI-GRAS / terracotta / terracotta / server / compute.py View on Github external
@TILE_API.route('/compute///.png', methods=['GET'])
@TILE_API.route('/compute////.png',
                methods=['GET'])
@convert_exceptions
def get_compute(tile_z: int, tile_y: int, tile_x: int, keys: str = '') -> Any:
    """Combine datasets into a single-band PNG image through a given mathematical expression
    ---
    get:
        summary: /compute (tile)
        description:
            Combine datasets into a single-band PNG image through a given mathematical expression
        parameters:
            - in: path
              schema: ComputeQuerySchema
            - in: query
              schema: ComputeOptionSchema
        responses:
github DHI-GRAS / terracotta / terracotta / server / singleband.py View on Github external
@TILE_API.route('/singleband////.png',
                methods=['GET'])
@convert_exceptions
def get_singleband(tile_z: int, tile_y: int, tile_x: int, keys: str) -> Any:
    """Return single-band PNG image of requested tile
    ---
    get:
        summary: /singleband (tile)
        description: Return single-band PNG image of requested XYZ tile
        parameters:
            - in: path
              schema: SinglebandQuerySchema
            - in: query
              schema: SinglebandOptionSchema
        responses:
            200:
                description: