enter image description here我需要用python下载卫星图像。我在GitHub中找到了一个代码,但我不明白这行是什么。请告诉我到底是什么。 访问https://github.com/kscottz/PythonFromSpace/blob/master/TheBasics.ipynb
import sys
import os
import json
import scipy
import urllib
import datetime
import urllib3
import rasterio
import subprocess
import numpy as np
import pandas as pd
import seaborn as sns
from osgeo import gdal
from planet import api
from planet.api import filters
from traitlets import link
import rasterio.tools.mask as rio_mask
from shapely.geometry import mapping, shape
from IPython.display import display, Image, HTML
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
urllib3.disable_warnings()
from ipyleaflet import (
Map,
Marker,
TileLayer, ImageOverlay,
Polyline, Polygon, Rectangle, Circle, CircleMarker,
GeoJSON,
DrawControl
)
%matplotlib inline
# will pick up api_key via environment variable PL_API_KEY
# but can be specified using `api_key` named argument
api_keys = json.load(open("apikeys.json",'r'))
client = api.ClientV1(api_key=api_keys["PLANET_API_KEY"])
# Make a slippy map to get GeoJSON
api_keys = json.load(open("apikeys.json",'r')) client = api.ClientV1(api_key=api_keys["PLANET_API_KEY"])
这两行是什么意思。我应该上传什么文件apikeys.json文件你知道吗
您应该按照此链接获取API密钥。 https://support.planet.com/hc/en-us/articles/212318178-What-is-my-API-key-
你知道吗apikeys.json文件是JSON格式/内容如下的JSON文件:
你知道吗json.load文件(…)API将此json文件作为字典加载
相关问题 更多 >
编程相关推荐