【问题标题】:Using cartopy to project geostationary data points onto a regular grid使用 cartopy 将地球同步数据点投影到规则网格上
【发布时间】:2021-12-30 17:51:05
【问题描述】:

我正在尝试使用 Cartopy 将 GOES 卫星图像数据投影到美国的常规网格上。我在结尾时从 GOES 到 grid 的翻译有问题 this colab workbook。我正在这样做:

geos.transform_point(us_bbox[0][0] + x, us_bbox[0][1] + y, ccrs.PlateCarree()) / sat_h

从最后的图像中可以看出,它没有投影到网格上,并且以某种方式被扭曲了。

编辑:这里有更多来自the colab workbook的代码:

grid_width = 500
grid_height = 500
grid = np.zeros((grid_width, grid_height))

for x in range(0, grid_width):
  for y in range(0, grid_height):
    location_geos = geos.transform_point(us_bbox[0][0] + x, us_bbox[0][1] + y, ccrs.PlateCarree()) / sat_h
    if not np.any(np.isnan(location_geos)):
      grid[(x, y)] = C['BCM'].sel(y=location_geos[1],x=location_geos[0],method='nearest').values

任何帮助将不胜感激。

【问题讨论】:

  • 请发布相关代码。不鼓励使用网络链接或图片。
  • 感觉代码太多了,但我已经编辑添加了更多。

标签: python gis cartopy satellite-image


【解决方案1】:

可能是一个非常愚蠢的问题,因为我不知道有问题的库,但在行中

location_geos = geos.transform_point(us_bbox[0][0] + x, us_bbox[0][1] + y, ccrs.PlateCarree()) / sat_h

您是否将纬度/经度(us_bbox 值)添加到整数(x, y)?如果是这样,您最终绘制的图像的纬度/经度范围为 500 度,实际上,这可能对图像有意义。

【讨论】:

  • 就是这样,非常感谢!有时你只需要另一双眼睛。
猜你喜欢
  • 1970-01-01
  • 2017-06-19
  • 1970-01-01
  • 2017-03-08
  • 2019-04-11
  • 2017-07-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多