As you can see, the tagging is a bit of mix. There’s some inconsistencies (e.g., around the operator tags) and some fundamental errors (e.g. landuse=military). I think it’d be nice if there were a consistent tagging scheme for NASA field stations.
Most NASA field stations are research / development sites, though Kennedy is a launch site/mission control. Armstrong is a research centre but also an aerodrome.
My suggestion for a tagging scheme is as below:
name full name of the station as listed in the name column above (do not include “NASA”) alt_name commonly referred to name (e.g. NASA Goddard) (can check Wikipedia for this) short_name if appropriate, the acronym version (e.g. NASA GSFC) (again can check Wikipedia) amenityresearch_institute OR aerowayspaceport or aerodrome (depending upon field station type) accessprivate operatorNational Aeronautics and Space Administration operator:shortNASA operator:wikidataQ23548 operator:typegovernment governmentaerospace website, wikipedia, and wikidata as appropriate
The exception to the operator tagging is JPL. JPL’s operator is California Institute of Technology rather than NASA (though is owned and “sponsored” by NASA).
For landuse, I’m not sure what’s best. Certainly landuse=military is wrong and should not be used. I don’t think commercial is correct either. Some of the field stations are perhaps industrial whereas some are probably not (e.g. GSFC being more research focussed).
I came across this post as I’m trying to get the coordinates for a list of all rocket launch sites globally. I’ve tried nodes as follows but nothing comes back.
Kennedy Space Center, Florida is one of the sites on my list and it’s also in the post above.
node[“aeroway”=“spaceport”][“name”=“Kennedy Space Center, Florida”];
node[“aeroway”=“aerodrome”][“name”=“Kennedy Space Center, Florida”];
node[“amenity”=“research_institute”][“Kennedy Space Center, Florida”];
Note on Overpass Turbo the following does work when the map box is set to an area that includes KSC:
[out:json][timeout:25];
// gather results
nwr"aeroway"=“spaceport”;
// print results
out geom;
I’ve tried substituting node with nwr but the result is the same.
I’m trying to move from googlemaps to OSM and I just need an approximate coordinate, not the geographical boundaries.
Thanks for switching to OSM! It seems like the main issue is that you’re using the = sign in overpass, which looks for an exact match for the given tag. But the item you’re looking for isn’t named “Kennedy Space Center, Florida” verbatim in OSM, it’s “John F. Kennedy Space Center”: Relation: John F. Kennedy Space Center (8013130) | OpenStreetMap. So overpass isn’t returning a match. You can get one using the overpass ‘contains’ operator ~ instead of =. For example, nwr["aeroway"="spaceport"]["name"~"Kennedy Space Center"]; will return the complex (it’s in OSM as a relation, so just node won’t work).
For an approximate coordinate rather than the boundaries, you can use out center instead of out geom. Here’s an Overpass Turbo query that retrieves a point for KSC: overpass turbo. Hope that helps!
# Overpass QL query to find aerospace launch sites
overpass_query = f"""
[out:json];
(
// Find all nodes with aerospace:launch tag
nwr["aeroway"="aerodrome"]["name"~"{location}"];
);
out center;
"""
# Make the request to the Overpass API
response = requests.post(overpass_url, data=overpass_query)
# Check if the request was successful
if response.status_code == 200:
data = response.json()
print(f"{data}")
# Extract and print the coordinates of launch sites
if data['elements']:
for element in data['elements']:
lat = element.get('lat')
lon = element.get('lon')
print(f"Launch Site: Latitude = {lat}, Longitude = {lon}")
else:
print("No launch sites found.")
else:
print(f"Error: Unable to fetch data (Status code: {response.status_code})")
# Call the function
get_aerospace_launch_site(“Kennedy Space Center”)
output:
{‘version’: 0.6, ‘generator’: ‘Overpass API 0.7.62.4 2390de5a’, ‘osm3s’: {‘timestamp_osm_base’: ‘2025-01-22T16:31:14Z’, ‘copyright’: ‘The data included in this document is from www.openstreetmap.org. The data is made available under ODbL.’}, ‘elements’: }
No launch sites found.
If I use:
nwr[“aeroway”=“spaceport”][“name”~“{location}”];
nwr[“aeroway”=“aerodrome”][“name”~“{location}”];
nwr[“amenity”=“research_institute”][“{location}”];
Sorry, I’m not super-familiar with this python module and how it interacts with overpass. Maybe this documentation is helpful? API Reference — Python Overpass API 0.6 documentation It looks like there’s a method to extract centers from json area elements, so perhaps you could export the geometries and use that rather than exporting the centers. Assuming this is even the right package!
I’d suggest looking at the json data output by the query @willkmis suggested in Overpass Turbo. You can see this by switching from Map to Data at the top right after running the query.
Note that “lat” and “lon” are not at the top level of the element data structure - they are within the “center” element. So your simple element.get() probably won’t work.
If you have further questions about Overpass syntax or using Overpass outputs, it might be better to start a new thread, as it is clear how the object is tagged so that’s not really the issue. Experts in Overpass might not notice your question in this thread.
Hi Alan
Thanks for the pointer. I’ve now got this working after also changing the request to get rather than a post (which then returned the data) and then parsing the json structure to get “center” and then get the lat and lon.
It’s taking a while to run though - probably 30+ seconds as I didn’t include the timeout. I’ll make a fresh post for advice on that back and link to this post for context.