python下载和拼接瓦片数据JSON版

效果

在这里插入图片描述

脚本入口

getAndCombine_json.py

import numpy as np
import cv2
import math
import os
from urllib.request import urlretrieve
import time
from queue import Queue
import  threading
import glob
from osgeo import osr
from osgeo import gdal
import pathlib
import shutil
from settings_downloadMap import *

os.environ['PROJ_LIB'] = r'C:\ProgramData\Anaconda3\envs\pytorch\Lib\site-packages\osgeo\data\proj'
os.environ['GDAL_DATA'] = r'C:\ProgramData\Anaconda3\envs\pytorch\Lib\site-packages\osgeo\data'

DType2GDAL = {"uint8": gdal.GDT_Byte,
              "uint16": gdal.GDT_UInt16,
              "int16": gdal.GDT_Int16,
              "uint32": gdal.GDT_UInt32,
              "int32": gdal.GDT_Int32,
              "float32": gdal.GDT_Float32,
 

你可能感兴趣的:(Python君,python,json,开发语言)