コード例 #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
コード例 #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
コード例 #3
0
def landsat_bounds(scene):
    """
    Handle bounds requests
    """
    info = landsat8.bounds(scene)
    return ('OK', 'application/json', json.dumps(info))
コード例 #4
0
def bounds(scene):
    info = landsat8.bounds(scene)
    return ('OK', 'application/json', json.dumps(info))
コード例 #5
0
def bounds(scene: str) -> Tuple[str, str, str]:
    """Handle bounds requests."""
    return ("OK", "application/json", json.dumps(landsat8.bounds(scene)))
コード例 #6
0
ファイル: landsat.py プロジェクト: freespys/remotepixel-tiler
def bounds(scene):
    """Handle bounds requests."""
    info = landsat8.bounds(scene)
    return ("OK", "application/json", json.dumps(info))