- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试绘制一些以矩阵形式存在的数据,例如温度。这些数据是区域性的,所以我不需要全局 map 。
我有:
我想使用带有墨卡托投影的 cartopy 来绘制它。然而,墨卡托只允许我定义最小和最大纬度,但不能定义最小和最大经度。这最终给了我一大片土地。
Mercator(central_longitude=103.0,min_latitude=gridlat[0],max_latitude=gridlat[-1])
我将如何设置沿海 map 的最小和最大经度?最终,我只想绘制我的数据,并在其上覆盖国家/地区边界,就像使用 ncview 的外观一样。
最佳答案
在选择投影时,您通常不会设置 map 的范围,您可以稍后使用您创建的坐标区的 set_extent
方法进行设置。事实上,cartopy 中的默认行为是使范围适合绘制的数据,因此您想要的应该是使用普通墨卡托投影绘制绘图时发生的情况。以下是在地理坐标中显式设置范围的示例:
import cartopy.crs as ccrs
import matplotlib.pyplot as plt
# Create Mercator projection with dateline in the middle:
ax = plt.axes(projection=ccrs.Mercator(central_longitude=180))
# Draw coastlines so we know where we are:
ax.coastlines()
# Set the map extent, making sure to specify the correct coordinate system
# for geographical coordinates:
ax.set_extent([90, 270, -40, 40], crs=ccrs.PlateCarree())
plt.show()
关于python - 定义 cartopy 上墨卡托投影的纵向范围,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43647548/
我正在寻找有关为什么在这些网站上讨论了 2 种不同的墨卡托公式的解释。 我理解这是正确的墨卡托投影算法: http://en.wikipedia.org/wiki/Mercator_projectio
我正在使用 Alan McConchie's d3 中的基本墨卡托 map block 。我已经让它在本地工作,但我试图过滤 map 以排除某些国家(例如南极洲)。 我不想简单地从 json 文件中删
我想在我的应用程序中使用球面墨卡托算法将纬度/经度点投影到 2D 平面。 球形墨卡托也称为 Google 墨卡托、EPSG-900913 或 EPSG-3785。 有几个页面介绍了如何通过 OpenL
我的程序垂直拉伸(stretch)一个 Numpy 数组,代表一个 180 x 360 的 map 图像,因此它代表一个 Web Mercator map 图像。 我编写了一个函数(如下),它可以完成
我正在尝试将地理坐标系转换为 Esri Webmercator,但是当我进行转换时,生成的 x 和 y 的值为 0000003232112222… 和 00000012665321…。这很奇怪,因为坐
我是一名优秀的程序员,十分优秀!