OpenStreetMap logo OpenStreetMap

I’ve been working on a project for a few months now, and keep getting stuck with time out errors from the Overpass API, which I think might be due to the fact that there are so many postboxes and post offices in the world. (Maybe?)

**Background on the project and ideal vision:

I’m helping the guy who runs postcrossing.com (a free website where people from all over can pull an address and send and receive postcards from each other) to build a map where people can easily find the postbox or post office closest to them in order to mail their postcards. This could be especially helpful if people are on holiday or not close to home and are not super aware of the postboxes and post offices in the area. This would be a map that is embedded in a website - there is no app yet for postcrossing.com and does not seem like there will be on in the near future.

I want the postboxes and post offices to be on different layers, so that I can style the icons individually.

The map should be easy to understand and ideally, would also offer the option to edit if need be (i.e add a postbox or post office that does not yet exist on the map, and be able to add opening hours for the post offices and collection times for the postboxes. There would also be the option to add a photo of the postbox or post office.

**Progress thus far:

I began this project using the Overpass API and putting that information into a uMap, which you can find here: http://u.osmfr.org/m/528331/

I set up the cache under remote data to be once a day, but I still get a red error message that says, “problem in the response,” and gets a 429 error in the console when I move about the map.

I first wrote an OSM Diary entry about this project here: @Nicolelaine/diary/396957

Someone suggested that I create a bounding box, following this French tutorial here: https://wiki.cartocite.fr/doku.php?id=umap:10_-_je_valorise_les_donnees_openstreetmap_avec_umap

I tried to do this, and I’m not sure if I did it incorrectly, or if this sort of suggestion just does not work for a worldwide map. I was still getting the same error messages as before.

Someone else suggested that I create a dynamic query (https://www.mappa-mercia.org/2014/09/creating-an-always-up-to-date-map.html) using Overpass, but I think that is what I’m already doing, as I have the dynamic option selected in the remote data section for each layer in uMap.

Another person suggested that I use MapComplete, which seemed like the perfect solution, as it allowed me to create a theme where one could upload photos of the postboxes and post offices, as well as add in postboxes and post offices that don’t already exist on the map, as well as add in the opening times for the post offices (there is not yet a special rendering for pickup times for postboxes.) This seemed to work great, but I continue to get time out errors as I move about the map. As this is intended to be used worldwide, it seems like MapComplete won’t work either. You can view the current theme here: https://mapcomplete.osm.be/?test=true&userlayout=https://gist.githubusercontent.com/RobinLinde/3353a12c1f721fdfb027429f61a7e887/raw/e3bc41972b4c28a3028b4ce243f83b9138920bae/post.json#welcome

**Suggestions that might work:

1.) Someone suggested that I try using git scraping to make this work, as described here: https://hackmd.io/OkwpRqQ7QXC3p8C0jfTUGQ?view

This seems to work, but I don’t know if it’s possible to put this in MapComplete. It seems like it might be possible in uMap though: https://github.com/nicolelaine/postboxes-history/commits/main

2.) It sounds like support to fetch data from (tiled) geojson, and one day (in a far, far future) such a thing might be possible. However, I’m not sure how this works or would help in my situation.

**My questions:

*Do you know any way that it’s possible to achieve what I’m going for without running into these time out errors?

*Is there any way to make what I’m hoping to achieve happen with the Overpass API or is this a lost cause, and I should start looking at how to do this locally with a real time database?

*Does anyone have experience with fetching data from (tiled) geojson? How could that work for this project?

Email icon Bluesky Icon Facebook Icon LinkedIn Icon Mastodon Icon Telegram Icon X Icon

Discussion

Log in to leave a comment