Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

采用自定义bounds划分栅格时,出现多余的栅格 #92

Open
mokeeqian opened this issue Nov 5, 2023 · 2 comments
Open

采用自定义bounds划分栅格时,出现多余的栅格 #92

mokeeqian opened this issue Nov 5, 2023 · 2 comments

Comments

@mokeeqian
Copy link

mokeeqian commented Nov 5, 2023

采用自定义bounds来划分栅格时,划分出来的格子,超过了设置的bounds(图中白色部分)

猜测可能是坐标系的原因?请问area_to_grid的默认坐标系是什么?

代码:

grid, params = tbd.area_to_grid(boundary, accuracy=3000, method='rect')

#栅格参数,方形栅格下method参数是rect,代表方形栅格
pprint.pprint(params)

#栅格几何图形
grid.head()

输出:

{'deltalat': 0.02697963123853744,
 'deltalon': 0.033639196976294326,
 'gridsize': 3000,
 'method': 'rect',
 'slat': 36.636559,
 'slon': 116.950786,
 'theta': 0}

1699172896887

@ni1o1
Copy link
Owner

ni1o1 commented Nov 6, 2023

格子数应该没问题,应该是你加载的底图小了。坐标系只要是经纬度坐标系即可

@mokeeqian
Copy link
Author

mokeeqian commented Nov 6, 2023

格子数应该没问题,应该是你加载的底图小了。坐标系只要是经纬度坐标系即可

我又重新设置了一下,这次底图要比bounds范围大,但是划分后,格子仍然超出了bounds:

划分结果:
image

网格详情:
image

就是这里的 LONCOL 和 LATCOL 出现了 -1,是正常的吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants