一、Python
1、修改Python脚本文件
if __name__==‘__main__‘:
#sys.argv = [‘F:\\000_Terrain\\T7-gdal2srtmtiles-demo.py‘, ‘--cesium‘, ‘--resume‘, ‘-z‘, ‘0-8‘, ‘-p‘, ‘geodetic‘, ‘F:\\50_GIS\\4000_Data\\world_raster\\Day.tif‘, ‘F:\000_Terrain\\terrain_tiles‘]
sys.argv = [‘F:\\000_Terrain\\T7-gdal2srtmtiles-demo.py‘, ‘--cesium‘, ‘--resume‘, ‘-z‘, ‘0-8‘, ‘-p‘, ‘geodetic‘, ‘F:\\50_GIS\\4000_Data\\china500_WGS1984.tif‘, ‘F:\\000_Terrain\\terrain_tiles5‘,‘--s_srs‘,‘EPSG:4326‘]
print(sys.argv)
argv = gdal.GeneralCmdLineProcessor( sys.argv )
if argv:
gdal2tiles = GDAL2Tiles( argv[1:] )
gdal2tiles.process()
2、命令行执行如下
#cd C:\Python27\2711
#python F:\000_Terrain\T7-gdal2srtmtiles-demo.py
时间: 2024-12-14 07:45:20