diff --git a/geomagio/api/ws/Observatory.py b/geomagio/api/ws/Observatory.py index 93cbd08f19415014e47dd314f6275d468ed0ffac..34c5021d11c54b5fac66015d952dc31b02eea4bd 100644 --- a/geomagio/api/ws/Observatory.py +++ b/geomagio/api/ws/Observatory.py @@ -171,7 +171,7 @@ OBSERVATORIES = [ declination_base=209690, ), Observatory( - id="FRT", + id="FDT", elevation=69, latitude=38.205, longitude=282.627, diff --git a/geomagio/api/ws/elements.py b/geomagio/api/ws/elements.py index 11a6c95d7ccf7b5fb00b5e58ff9a83df6e0cb78d..a1379ad77df8ffbd7f8e3cdea0b40ee92ce88011 100644 --- a/geomagio/api/ws/elements.py +++ b/geomagio/api/ws/elements.py @@ -10,15 +10,18 @@ router = APIRouter() @router.get("/elements/") def get_elements() -> Dict: - return { - "type": "FeatureCollection", - "features": [ - { - "type": "Feature", - "id": e.id, - "properties": {"name": e.name, "units": e.units}, - "geometry": None, - } - for e in ELEMENTS - ], - } + features = [] + for e in ELEMENTS: + feature = { + "type": "Feature", + "id": e.id, + "properties": { + "name": e.name, + "units": e.units, + }, + "geometry": None, + } + if e.abbreviation: + feature["properties"]["abbreviation"] = e.abbreviation + features.append(feature) + return {"type": "FeatureCollection", "features": features}