如何在土地上建立一系列的GPS坐标?
我正在编写Python算法,该算法优化了无线电干涉仪的望远镜位置,为此,我需要一系列的GPS坐标来选择。目前,我一直在使用一个涵盖感兴趣区域的大网格(请参阅图像)。
然而,问题是我想避免在水/海洋上的位置,只有在土地上有一个均匀间隔的坐标网格。关于我如何实现这一目标的任何想法?我知道这里有类似内容的数据:
https://freegisdata.rtwilson.com/ https://www.ngdc.noaa.noaa.gov/mgg/mgg/shorelines/ghhss.noa.gov/mgg/shoreline/gshhss.ghhss-hhs。 html
我下面的代码工作正常,并且在全球上产生网格很好。我只是在寻找上述目标的建议:
import matplotlib.pyplot as plt
import numpy as np
import random as rand
from mpl_toolkits.basemap import Basemap
upper_lat = 70
lower_lat = -70
upper_lon = 140
lower_lon = -140
size = 100
#initializing which gps coordinates to start at
La = lower_lat
Lo = lower_lon
#array to store coordinate
sites_gps = np.zeros((size*size,2))
f=0
for j in range(0,size):
Lo=lower_lon
for k in range(0,size):
sites_gps[f] = La, Lo
Lo+=(upper_lon+abs(lower_lon))/size
f+=1
La+=(upper_lat+abs(lower_lat))/(size)
I am writing a python algorithm, which optimizes telescope positions for a radio interferometers, and for this i need an array of gps coordinates for possible positions to choose from. For now I have been using a big grid covering the an area of interest (see image).
However, the problem is that I would like to avoid the positions over water/oceans and only have a grid of evenly spaced coordinates over land. Any ideas of how I can achieve this? I know there is data for similar stuff here:
https://freegisdata.rtwilson.com/
https://www.ngdc.noaa.gov/mgg/shorelines/gshhs.html
The code I have below works fine and produces a grid over the globe just fine. I am just looking for advice on the above mentioned goal:
import matplotlib.pyplot as plt
import numpy as np
import random as rand
from mpl_toolkits.basemap import Basemap
upper_lat = 70
lower_lat = -70
upper_lon = 140
lower_lon = -140
size = 100
#initializing which gps coordinates to start at
La = lower_lat
Lo = lower_lon
#array to store coordinate
sites_gps = np.zeros((size*size,2))
f=0
for j in range(0,size):
Lo=lower_lon
for k in range(0,size):
sites_gps[f] = La, Lo
Lo+=(upper_lon+abs(lower_lon))/size
f+=1
La+=(upper_lat+abs(lower_lat))/(size)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论