1.地图经纬度倒置
basemap bluemarble plot the opposite longitudinal section
basemap plot the opposite longitudinal section
Python 列表排序方法reverse、sort、sorted详解
1、数组倒序:
原始元素的倒序排列
arr = [1,2,3,4,3,4]
(1)print arr[::-1] ---->[4, 3, 4, 3, 2, 1]
(2)arr.reverse()
print arr ---->[4, 3, 4, 3, 2, 1]
(3)reversed(arr) #返回一个倒序可遍历对象,需序遍历出
arr = [1,2,3,4,3,4]
reversed_arr = []
for i in reversed(arr):
reversed_arr.append(i)
print reversed_arr ---->[4, 3, 4, 3, 2, 1]
2、字符串倒序:
(1)利用字符串截取
param = 'hello'
print param[::-1] ---->'olleh'
(2)利用reversed()返回倒可迭代对象(字符串实现)
param = 'hello'
rev_str = ''
for i in reversed(param):
rev_str += i
print rev_str ---->'olleh'
(3)利用reversed()返回倒可迭代对象(数组实现)
rev_arr = []
for i in reversed(param):
rev_arr.append(i)
print ''.join(rev_arr)
另:
元素排序后的倒序排列:
1、sorted(...)生成新的已排列数组
sorted(iterable, cmp=None, key=None, reverse=False) --> new sorted list
2、arr.sort(...)直接操作arr,arr内元素进行正序排列
元素内的排序
param = 'hello' #返回元素内的排序
rev_str = ''.join(sorted(param)) #sorted(param)返回倒序排列的数组['e', 'h', 'l', 'l', 'o']
print rev_str ---->'ehllo'
---------------------
作者:语默静喧
来源:CSDN
原文:https://blog.csdn.net/wanghuafengc/article/details/17914345
版权声明:本文为博主原创文章,转载请附上博文链接!
Plot MODIS granule RGB image (orthographic projection) using python and basemap
basemap: 1.2.0-py36h50ae964_0 conda-forge --> 1.1.0-py36h50ae964_7 conda-forge
export PROJ_LIB=/public/home/hysplit/software/anaconda3/share/proj
坐标转换
http://geologyandpython.com/maps.html
import pyproj
# Define the two projections.p1=pyproj.Proj(proj='latlong',datum='WGS84')p2=pyproj.Proj(init='epsg:4230')# Call the tranform method and store the tranformed variableslng2,lat2=pyproj.transform(p1,p2,lng,lat)
Basemap (Matlibplot) not plotting GPS WGS84 coordinates accurately
Spatial Reference System EPSG 3857 (WGS84 Web Mercator).
Using epsg to set the projection
projections Basemap and pyproj