本文整理汇总了Python中test_cli_utilities.get_test_ogrsf_path函数的典型用法代码示例。如果您正苦于以下问题:Python get_test_ogrsf_path函数的具体用法?Python get_test_ogrsf_path怎么用?Python get_test_ogrsf_path使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_test_ogrsf_path函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: ogr_dgnv8_3
def ogr_dgnv8_3():
if gdaltest.dgnv8_drv is None:
return 'skip'
import test_cli_utilities
if test_cli_utilities.get_test_ogrsf_path() is None:
return 'skip'
ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro data/test_dgnv8.dgn')
if ret.find('INFO') == -1 or ret.find('ERROR') != -1:
gdaltest.post_reason('fail')
print(ret)
return 'fail'
shutil.copy('data/test_dgnv8.dgn', 'tmp/test_dgnv8.dgn')
ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' tmp/test_dgnv8.dgn')
os.unlink('tmp/test_dgnv8.dgn')
if ret.find('INFO') == -1 or ret.find('ERROR') != -1:
gdaltest.post_reason('fail')
print(ret)
return 'fail'
return 'success'
开发者ID:ksshannon,项目名称:gdal,代码行数:26,代码来源:ogr_dgnv8.py
示例2: ogr_gpkg_test_ogrsf
def ogr_gpkg_test_ogrsf():
if gdaltest.gpkg_dr is None:
return 'skip'
# Do integrity check first
sql_lyr = gdaltest.gpkg_ds.ExecuteSQL("PRAGMA integrity_check")
feat = sql_lyr.GetNextFeature()
if feat.GetField(0) != 'ok':
gdaltest.post_reason('integrity check failed')
return 'fail'
gdaltest.gpkg_ds.ReleaseResultSet(sql_lyr)
import test_cli_utilities
if test_cli_utilities.get_test_ogrsf_path() is None:
return 'skip'
gdaltest.gpkg_ds = None
#sys.exit(0)
ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' tmp/gpkg_test.gpkg --config OGR_SQLITE_SYNCHRONOUS OFF')
if ret.find('INFO') == -1 or ret.find('ERROR') != -1:
gdaltest.post_reason('fail')
print(ret)
return 'fail'
ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' tmp/gpkg_test.gpkg -sql "select * from tbl_linestring_renamed" --config OGR_SQLITE_SYNCHRONOUS OFF')
if ret.find('INFO') == -1 or ret.find('ERROR') != -1:
gdaltest.post_reason('fail')
print(ret)
return 'fail'
return 'success'
开发者ID:samalone,项目名称:gdal-ios,代码行数:34,代码来源:ogr_gpkg.py
示例3: ogr_fgdb_3
def ogr_fgdb_3():
if ogrtest.fgdb_drv is None:
return 'skip'
import test_cli_utilities
if test_cli_utilities.get_ogr2ogr_path() is None:
return 'skip'
if test_cli_utilities.get_test_ogrsf_path() is None:
return 'skip'
try:
shutil.rmtree("tmp/poly.gdb")
except:
pass
gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f filegdb tmp/poly.gdb data/poly.shp -nlt MULTIPOLYGON -a_srs None')
ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' tmp/poly.gdb')
#print ret
if ret.find('INFO') == -1 or ret.find('ERROR') != -1:
print(ret)
return 'fail'
return 'success'
开发者ID:Joe-xXx,项目名称:gdal,代码行数:25,代码来源:ogr_fgdb.py
示例4: test_ogr_ngw_test_ogrsf
def test_ogr_ngw_test_ogrsf():
if gdaltest.ngw_drv is None or gdal.GetConfigOption('SKIP_SLOW') is not None:
pytest.skip()
if check_availability(gdaltest.ngw_test_server) == False:
gdaltest.ngw_drv = None
pytest.skip()
if gdaltest.skip_on_travis():
pytest.skip()
if gdaltest.ngw_ds is None:
pytest.skip()
url = 'NGW:' + gdaltest.ngw_test_server + '/resource/' + gdaltest.group_id
import test_cli_utilities
if test_cli_utilities.get_test_ogrsf_path() is None:
pytest.skip()
ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' ' + url)
assert ret.find('INFO') != -1 and ret.find('ERROR') == -1
ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' ' + url + ' -oo PAGE_SIZE=100')
assert ret.find('INFO') != -1 and ret.find('ERROR') == -1
ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' ' + url + ' -oo BATCH_SIZE=5')
assert ret.find('INFO') != -1 and ret.find('ERROR') == -1
ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' ' + url + ' -oo BATCH_SIZE=5 -oo PAGE_SIZE=100')
assert ret.find('INFO') != -1 and ret.find('ERROR') == -1
开发者ID:AsgerPetersen,项目名称:gdal,代码行数:31,代码来源:ogr_ngw.py
示例5: ogr_fgdb_3
def ogr_fgdb_3():
if ogrtest.fgdb_drv is None:
return 'skip'
import test_cli_utilities
if test_cli_utilities.get_ogr2ogr_path() is None:
return 'skip'
try:
shutil.rmtree("tmp/poly.gdb")
except:
pass
gdaltest.runexternal(test_cli_utilities.get_ogr2ogr_path() + ' -f filegdb tmp/poly.gdb data/poly.shp -nlt MULTIPOLYGON -a_srs None')
ds = ogr.Open('tmp/poly.gdb')
if ds is None or ds.GetLayerCount() == 0:
gdaltest.post_reason('ogr2ogr failed')
return 'fail'
ds = None
if test_cli_utilities.get_test_ogrsf_path() is None:
return 'skip'
ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' tmp/poly.gdb')
#print ret
if ret.find('INFO') == -1 or ret.find('ERROR') != -1:
print(ret)
return 'fail'
return 'success'
开发者ID:afarnham,项目名称:gdal,代码行数:32,代码来源:ogr_fgdb.py
示例6: ogr_pcidsk_3
def ogr_pcidsk_3():
import test_cli_utilities
if test_cli_utilities.get_test_ogrsf_path() is None:
return 'skip'
if ogr.GetDriverByName('PCIDSK') is None:
return 'skip'
ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' tmp/ogr_pcidsk_1.pix')
ret_str = 'success'
if ret.find("ERROR: The feature was not deleted") != -1:
# Expected fail for now
print("ERROR: The feature was not deleted")
ret = ret.replace("ERROR: The feature was not deleted", "ARGHH: The feature was not deleted")
ret_str = 'expected_fail'
if ret.find('ERROR') == ret.find('ERROR ret code = 1'):
ret = ret.replace("ERROR ret code = 1", "")
if ret.find('INFO') == -1 or ret.find('ERROR') != -1:
print(ret)
ret_str = 'fail'
return ret_str
开发者ID:Mavrx-inc,项目名称:gdal,代码行数:25,代码来源:ogr_pcidsk.py
示例7: test_ogr_basic_10
def test_ogr_basic_10():
import test_cli_utilities
if test_cli_utilities.get_test_ogrsf_path() is None:
pytest.skip()
ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -all_drivers')
assert ret.find('INFO') != -1 and ret.find('ERROR') == -1
开发者ID:AsgerPetersen,项目名称:gdal,代码行数:9,代码来源:ogr_basic_test.py
示例8: test_ogr_rec_1
def test_ogr_rec_1():
import test_cli_utilities
if test_cli_utilities.get_test_ogrsf_path() is None:
pytest.skip()
ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro data/test.rec')
assert ret.find('INFO') != -1 and ret.find('ERROR') == -1
开发者ID:AsgerPetersen,项目名称:gdal,代码行数:9,代码来源:ogr_rec.py
示例9: test_ogr_pds4_read_table_character_test_ogrsf
def test_ogr_pds4_read_table_character_test_ogrsf():
import test_cli_utilities
if test_cli_utilities.get_test_ogrsf_path() is None:
pytest.skip()
ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() +
' -ro data/pds4/ele_evt_12hr_orbit_2011-2012_truncated.xml')
assert 'INFO' in ret and 'ERROR' not in ret
开发者ID:AsgerPetersen,项目名称:gdal,代码行数:9,代码来源:ogr_pds4.py
示例10: test_ogr_mongodb_3
def test_ogr_mongodb_3():
if ogrtest.mongodb_drv is None:
pytest.skip()
import test_cli_utilities
if test_cli_utilities.get_test_ogrsf_path() is None:
pytest.skip()
ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro ' + ogrtest.mongodb_test_uri)
assert ret.find('INFO') != -1 and ret.find('ERROR') == -1
开发者ID:AsgerPetersen,项目名称:gdal,代码行数:10,代码来源:ogr_mongodb.py
示例11: test_ogr_pgeo_7
def test_ogr_pgeo_7():
if ogrtest.pgeo_ds is None:
pytest.skip()
import test_cli_utilities
if test_cli_utilities.get_test_ogrsf_path() is None:
pytest.skip()
ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' "tmp/cache/Autodesk Test.mdb" -sql "SELECT * FROM SDPipes"')
assert ret.find('INFO') != -1 and ret.find('ERROR') == -1
开发者ID:AsgerPetersen,项目名称:gdal,代码行数:11,代码来源:ogr_pgeo.py
示例12: test_ogr_odbc_2
def test_ogr_odbc_2():
if ogrtest.odbc_drv is None:
pytest.skip()
import test_cli_utilities
if test_cli_utilities.get_test_ogrsf_path() is None:
pytest.skip()
ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' tmp/odbc.mdb')
assert ret.find('INFO') != -1 and ret.find('ERROR') == -1
开发者ID:AsgerPetersen,项目名称:gdal,代码行数:11,代码来源:ogr_odbc.py
示例13: test_ogr_jml_3
def test_ogr_jml_3():
if not gdaltest.jml_read_support:
pytest.skip()
import test_cli_utilities
if test_cli_utilities.get_test_ogrsf_path() is None:
pytest.skip()
ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro data/test.jml')
assert ret.find('INFO') != -1 and ret.find('ERROR') == -1
开发者ID:AsgerPetersen,项目名称:gdal,代码行数:12,代码来源:ogr_jml.py
示例14: test_ogr_kml_test_ogrsf
def test_ogr_kml_test_ogrsf():
if not ogrtest.have_read_kml:
pytest.skip()
import test_cli_utilities
if test_cli_utilities.get_test_ogrsf_path() is None:
pytest.skip()
ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' --config OGR_SKIP LIBKML -ro data/samples.kml')
assert not (ret.find("using driver `KML'") == -1 or ret.find('INFO') == -1 or ret.find('ERROR') != -1)
开发者ID:AsgerPetersen,项目名称:gdal,代码行数:12,代码来源:ogr_kml.py
示例15: test_ogr_mysql_24
def test_ogr_mysql_24():
if gdaltest.mysql_ds is None:
pytest.skip()
import test_cli_utilities
if test_cli_utilities.get_test_ogrsf_path() is None:
pytest.skip()
ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + " '" + gdaltest.mysql_connection_string + "' tpoly")
assert ret.find('INFO') != -1 and ret.find('ERROR') == -1
开发者ID:AsgerPetersen,项目名称:gdal,代码行数:12,代码来源:ogr_mysql.py
示例16: test_ogr_mssqlspatial_test_ogrsf
def test_ogr_mssqlspatial_test_ogrsf():
if gdaltest.mssqlspatial_ds is None:
pytest.skip()
import test_cli_utilities
if test_cli_utilities.get_test_ogrsf_path() is None:
pytest.skip()
ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + " -ro '" + gdaltest.mssqlspatial_dsname + "' tpoly")
assert ret.find('INFO') != -1 and ret.find('ERROR') == -1
开发者ID:AsgerPetersen,项目名称:gdal,代码行数:12,代码来源:ogr_mssqlspatial.py
示例17: test_ogr_xlsx_4
def test_ogr_xlsx_4():
drv = ogr.GetDriverByName('XLSX')
if drv is None:
pytest.skip()
import test_cli_utilities
if test_cli_utilities.get_test_ogrsf_path() is None:
pytest.skip()
ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro data/test.xlsx')
assert ret.find('INFO') != -1 and ret.find('ERROR') == -1
开发者ID:AsgerPetersen,项目名称:gdal,代码行数:13,代码来源:ogr_xlsx.py
示例18: ogr_openfilegdb_2
def ogr_openfilegdb_2():
import test_cli_utilities
if test_cli_utilities.get_test_ogrsf_path() is None:
return 'skip'
ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro data/testopenfilegdb.gdb.zip')
if ret.find('INFO') == -1 or ret.find('ERROR') != -1:
print(ret)
return 'fail'
return 'success'
开发者ID:samalone,项目名称:gdal-ios,代码行数:13,代码来源:ogr_openfilegdb.py
示例19: ogr_s57_8
def ogr_s57_8():
import test_cli_utilities
if test_cli_utilities.get_test_ogrsf_path() is None:
return 'skip'
ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro data/1B5X02NE.000')
if ret.find('INFO') == -1 or ret.find('ERROR') != -1:
print(ret)
return 'fail'
return 'success'
开发者ID:geo-data,项目名称:go-gdal,代码行数:13,代码来源:ogr_s57.py
示例20: ogr_vdv_6
def ogr_vdv_6():
import test_cli_utilities
if test_cli_utilities.get_test_ogrsf_path() is None:
return 'skip'
ret = gdaltest.runexternal(test_cli_utilities.get_test_ogrsf_path() + ' -ro tmp/test_x10')
if ret.find('INFO') == -1 or ret.find('ERROR') != -1:
print(ret)
return 'fail'
return 'success'
开发者ID:koordinates,项目名称:gdal,代码行数:13,代码来源:ogr_vdv.py
注:本文中的test_cli_utilities.get_test_ogrsf_path函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论