'How do I make an array of gps coordinates over land?
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)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
