SOTA API - "References in this box"?

Hi folks. I have created an online tool for checking your progress activating local POTA parks (https://newparks.ianrenton.com/), and naturally one of the first requests was to add support for SOTA.

The POTA API offers an endpoint which is very useful for this use case, which is that given a lat/lon bounding box, it returns a list of all references inside it.

Does anyone know if the SOTA API has a similar endpoint?

If not, I can fall back to querying the list of all summits within an association or region, but if I need to do this, is there an API endpoint that returns association & region from lat/lon points?

My final fallback is of course to load everything, but I am hoping I can spare the SOTA API from that, or to use the CSV, which I would also like to avoid as the tool is client-side JS only, meaning each user would have to download their own.

Thanks!

1 Like

I’m not aware of an end point that returns summits from lat/long box. https://api-db2.sota.org.uk//api/summits/{summit_code} will return lat/long of a summit.

Are you aware of sotlas? It has similar features to what you describe, plus more, and you might want to inspect the code to see how HB9DQM and others have done it.

I did add all UK SOTA summits to OSM, and that accepts boundary boxes to query it. However, it needs the rest of the world to do the same if you want to make it universal.

I remembered there are a couple of other end points that may be of interest:

Region data, e.g. https://api2.sota.org.uk/api/regions/GM/ES

Association data, e.g.
https://api2.sota.org.uk/api/associations/GM/

Looking at them just now they do have bounding lat/long data in them. You could maintain a json of just this data to use with your web app and then know what regions to query from the API.

Why would you need an SOTA API for that?

You can just grab the summitlist.csv once a day and cache all the references with coordinates available. https://www.sotadata.org.uk/summitslist.csv
So you can provide your own source in the required format you need. But maybe I don’t get the point.

73 Joe

Thanks. I’m aware of Sotlas (great site!), I haven’t delved too much into their source code as navigating someone else’s code is never fun, but I think they are caching the summit data in the background rather than querying it live from the API.

Getting all the summits into OSM is great stuff - I think I remember talking to someone the other day about that! Probably not the right approach for this though, getting that job done for the whole world and keeping it updated is a mission!

Bounding boxes for the regions and associations sounds like a good idea though, I will play around with that.

1 Like

There is no backend code to do stuff once a day - the tool is client side JS only so anything that needs doing needs to be done by the client when the page loads or via a button press. That could be an option though, assuming the CSV isn’t too big.

I like GitHub actions to do daily processing of data when I don’t want to maintain a server. Then your customised JSON is just a GitHub url away.

1 Like

Yes, there is one because SMP requires it. No, I am not going to tell you then endpoint because I need to kill that server at some point this year. If you find it yourself you can use it with the understanding that it could die at any point.

1 Like

Haha, fair enough. I won’t try to use it if it’s getting deleted soon anyway, that’s just doubling my workload :slight_smile: