当前位置: 首页>>代码示例>>Python>>正文


Python test_cli_utilities.get_gdaltransform_path函数代码示例

本文整理汇总了Python中test_cli_utilities.get_gdaltransform_path函数的典型用法代码示例。如果您正苦于以下问题:Python get_gdaltransform_path函数的具体用法?Python get_gdaltransform_path怎么用?Python get_gdaltransform_path使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_gdaltransform_path函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_gdaltransform_8

def test_gdaltransform_8():
    if test_cli_utilities.get_gdaltransform_path() is None:
        pytest.skip()

    strin = '2 49 1\n'
    ret = gdaltest.runexternal(test_cli_utilities.get_gdaltransform_path() + ' -to "SRC_SRS=WGS84" -to "DST_SRS=WGS84"', strin)

    assert ret.find('2 49 1') != -1
开发者ID:AsgerPetersen,项目名称:gdal,代码行数:8,代码来源:test_gdaltransform.py

示例2: test_gdaltransform_1

def test_gdaltransform_1():
    if test_cli_utilities.get_gdaltransform_path() is None:
        pytest.skip()

    strin = '2 49 1\n' + '3 50 2\n'
    ret = gdaltest.runexternal(test_cli_utilities.get_gdaltransform_path() + ' -s_srs EPSG:4326 -t_srs EPSG:4326', strin)

    assert ret.find('2 49 1') != -1
    assert ret.find('3 50 2') != -1
开发者ID:AsgerPetersen,项目名称:gdal,代码行数:9,代码来源:test_gdaltransform.py

示例3: test_gdaltransform_9

def test_gdaltransform_9():
    if test_cli_utilities.get_gdaltransform_path() is None:
        pytest.skip()

    strin = '0 0 0\n'
    ret = gdaltest.runexternal(test_cli_utilities.get_gdaltransform_path() + ' ../gcore/data/byte.tif -output_xy', strin)

    text_split = ret.split(' ')
    assert len(text_split) == 2, ret
开发者ID:AsgerPetersen,项目名称:gdal,代码行数:9,代码来源:test_gdaltransform.py

示例4: test_gdaltransform_4

def test_gdaltransform_4():
    if test_cli_utilities.get_gdaltransform_path() is None:
        pytest.skip()

    strin = '0 0\n' + '20 0\n' + '20 20\n' + '0 20\n'
    ret = gdaltest.runexternal(test_cli_utilities.get_gdaltransform_path() + ' -order 1 -gcp 0 0  440720.000 3751320.000 -gcp 20 0 441920.000 3751320.000 -gcp 20 20 441920.000 3750120.000 0 -gcp 0 20 440720.000 3750120.000', strin)

    assert ret.find('440720 3751320') != -1
    assert ret.find('441920 3751320') != -1
    assert ret.find('441920 3750120') != -1
    assert ret.find('440720 3750120') != -1
开发者ID:AsgerPetersen,项目名称:gdal,代码行数:11,代码来源:test_gdaltransform.py

示例5: test_gdaltransform_ct_4D

def test_gdaltransform_ct_4D():
    if test_cli_utilities.get_gdaltransform_path() is None:
        pytest.skip()

    ret = gdaltest.runexternal(test_cli_utilities.get_gdaltransform_path() + ' -ct "+proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=cart +step +proj=helmert +convention=position_vector +x=0.0127 +dx=-0.0029 +rx=-0.00039 +drx=-0.00011 +y=0.0065 +dy=-0.0002 +ry=0.00080 +dry=-0.00019 +z=-0.0209 +dz=-0.0006 +rz=-0.00114 +drz=0.00007 +s=0.00195 +ds=0.00001 +t_epoch=1988.0 +step +proj=cart +inv +step +proj=unitconvert +xy_in=rad +xy_out=deg" -coord 2 49 0 2000')

    values = [float(x) for x in ret.split(' ')]
    assert len(values) == 3, ret
    assert abs(values[0] - 2.0000005420366) < 1e-10, ret
    assert abs(values[1] - 49.0000003766711) < 1e-10, ret
    assert abs(values[2] - -0.0222802283242345) < 1e-8, ret
开发者ID:AsgerPetersen,项目名称:gdal,代码行数:11,代码来源:test_gdaltransform.py

示例6: test_gdaltransform_8

def test_gdaltransform_8():
    if test_cli_utilities.get_gdaltransform_path() is None:
        return 'skip'

    strin = '2 49 1\n'
    ret = gdaltest.runexternal(test_cli_utilities.get_gdaltransform_path() + ' -to "SRC_SRS=WGS84" -to "DST_SRS=WGS84"', strin)

    if ret.find('2 49 1') == -1:
        print(ret)
        return 'fail'

    return 'success'
开发者ID:nextgis-borsch,项目名称:tests,代码行数:12,代码来源:test_gdaltransform.py

示例7: test_gdaltransform_7

def test_gdaltransform_7():
    if test_cli_utilities.get_gdaltransform_path() is None:
        pytest.skip()

    strin = '440720 3751320\n'
    ret = gdaltest.runexternal(test_cli_utilities.get_gdaltransform_path() + ' -t_srs EPSG:26711 ../gcore/data/byte.tif -i', strin)

    text_split = ret.split(' ')
    x = float(text_split[0])
    y = float(text_split[1])

    assert abs(x - 0) <= 1e-4 and abs(y - 0) <= 1e-4, ret
开发者ID:AsgerPetersen,项目名称:gdal,代码行数:12,代码来源:test_gdaltransform.py

示例8: test_gdaltransform_9

def test_gdaltransform_9():
    if test_cli_utilities.get_gdaltransform_path() is None:
        return 'skip'

    strin = '0 0 0\n'
    ret = gdaltest.runexternal(test_cli_utilities.get_gdaltransform_path() + ' ../gcore/data/byte.tif -output_xy', strin)

    text_split = ret.split(' ')
    if len(text_split) != 2:
        print(ret)
        return 'fail'

    return 'success'
开发者ID:nextgis-borsch,项目名称:tests,代码行数:13,代码来源:test_gdaltransform.py

示例9: test_gdaltransform_1

def test_gdaltransform_1():
    if test_cli_utilities.get_gdaltransform_path() is None:
        return 'skip'

    strin = '2 49 1\n' + '3 50 2\n'
    ret = gdaltest.runexternal(test_cli_utilities.get_gdaltransform_path() + ' -s_srs EPSG:4326 -t_srs EPSG:4326', strin)

    if ret.find('2 49 1') == -1:
        print(ret)
        return 'fail'
    if ret.find('3 50 2') == -1:
        print(ret)
        return 'fail'

    return 'success'
开发者ID:nextgis-borsch,项目名称:tests,代码行数:15,代码来源:test_gdaltransform.py

示例10: test_gdaltransform_7

def test_gdaltransform_7():
    if test_cli_utilities.get_gdaltransform_path() is None:
        return 'skip'

    strin = '440720 3751320\n'
    ret = gdaltest.runexternal(test_cli_utilities.get_gdaltransform_path() + ' -t_srs EPSG:26711 ../gcore/data/byte.tif -i', strin)

    text_split = ret.split(' ')
    x = float(text_split[0])
    y = float(text_split[1])

    if abs(x-0) > 1e-4 or abs(y-0) > 1e-4:
        print(ret)
        return 'fail'

    return 'success'
开发者ID:nextgis-borsch,项目名称:tests,代码行数:16,代码来源:test_gdaltransform.py

示例11: test_gdaltransform_3

def test_gdaltransform_3():
    if test_cli_utilities.get_gdaltransform_path() is None:
        return 'skip'

    strin = '0 0\n' + '20 0\n' + '20 20\n' + '0 20\n'
    ret = gdaltest.runexternal(test_cli_utilities.get_gdaltransform_path() + ' -tps -gcp 0 0  440720.000 3751320.000 -gcp 20 0 441920.000 3751320.000 -gcp 20 20 441920.000 3750120.000 0 -gcp 0 20 440720.000 3750120.000', strin)

    if ret.find('440720 3751320') == -1:
        print(ret)
        return 'fail'
    if ret.find('441920 3751320') == -1:
        print(ret)
        return 'fail'
    if ret.find('441920 3750120') == -1:
        print(ret)
        return 'fail'
    if ret.find('440720 3750120') == -1:
        print(ret)
        return 'fail'

    return 'success'
开发者ID:nextgis-borsch,项目名称:tests,代码行数:21,代码来源:test_gdaltransform.py


注:本文中的test_cli_utilities.get_gdaltransform_path函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。