예제 #1
0
def test_process_satellite_with_forced_coordinate_system(mock_call):
    state = State()
    state.set_window(0, 7, 2, 1)
    state.set_satellite_system('EPSG:9876')

    status = SatelliteStatus(0, ['test.tif', 'test2.tif'], state)
    building.process_satellite_with_gdal(status)
    outpath = path.join(building.FINALIZED_DIR,
                        building.INTERMEDIATE_SATELLITE_FORMAT.format(0))
    expected_command = 'gdalwarp -s_srs EPSG:9876 -tr 10 10 -te_srs EPSG:4326 -t_srs EPSG:3857 -r bilinear -te 0 1 2 7 test.tif test2.tif {}'.format(
        outpath)
    mock_call.assert_called_once_with(expected_command, status, False)
    assert status.current_files == [outpath]
예제 #2
0
def test_has_satellite_system():
    state = State()
    assert not state.has_satellite_system()
    state.set_satellite_system('EPSG:12345')
    assert state.has_satellite_system()