Exemplo n.º 1
0
def test_process_heightfiles_with_forced_coordinate_system(mock_call):
    state = State()
    state.set_window(0, 7, 2, 1)
    state.set_height_system('EPSG:9876')
    status = HeightMapStatus(0, ['test.txt'], state)
    building.process_heightfiles_with_gdal(status)
    outpath = path.join(building.BUILD_DIR,
                        building.INTERMEDIATE_HEIGHT_FILENAME)
    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.txt {}'.format(
        outpath)
    mock_call.assert_called_once_with(expected_command, status, False)
    assert status.current_files == [outpath]
Exemplo n.º 2
0
def test_has_height_system():
    state = State()
    assert not state.has_height_system()
    state.set_height_system('EPSG:1234')
    assert state.has_height_system()