Ejemplo n.º 1
0
def test_bounds_valid(landsat_get_mtl):
    """
    Should work as expected (get and parse metadata)
    """

    landsat_get_mtl.return_value = LANDSAT_METADATA

    meta = landsat8.bounds(LANDSAT_SCENE_C1)
    assert meta.get('sceneid') == 'LC08_L1TP_016037_20170813_20170814_01_RT'
    assert len(meta.get('bounds')) == 4
Ejemplo n.º 2
0
def test_bounds_valid(landsat_get_mtl):
    """
    Should work as expected (get and parse metadata)
    """

    landsat_get_mtl.return_value = LANDSAT_METADATA

    meta = landsat8.bounds(LANDSAT_SCENE_C1)
    assert meta.get("sceneid") == LANDSAT_SCENE_C1
    assert len(meta.get("bounds")) == 4
Ejemplo n.º 3
0
def landsat_bounds(scene):
    """
    Handle bounds requests
    """
    info = landsat8.bounds(scene)
    return ('OK', 'application/json', json.dumps(info))
Ejemplo n.º 4
0
def bounds(scene):
    info = landsat8.bounds(scene)
    return ('OK', 'application/json', json.dumps(info))
Ejemplo n.º 5
0
def bounds(scene: str) -> Tuple[str, str, str]:
    """Handle bounds requests."""
    return ("OK", "application/json", json.dumps(landsat8.bounds(scene)))
Ejemplo n.º 6
0
def bounds(scene):
    """Handle bounds requests."""
    info = landsat8.bounds(scene)
    return ("OK", "application/json", json.dumps(info))