Hello,
I’m looking for a way to replace Overpass API with my own cause my application will hit the 10k/day limit. I just need bicycle parking data (worldwide, it’s 250MB, to be updated daily or weekly). So I downloaded the data from Overpass API in XML, installed my Overpass instance and fed the database to it. Unfortunately I then found out that Overpass needs the entire OSM data, not just subset, so it won’t accept it.
I just wanted to replace the URL of the API without changing anything else on my app, so in case of need i would also be able to fetch from the public API with the same query.
So that is not possible apparently.
It would be too resource intensive (and a waste of them) for me to download the entire OSM worldwide data (78GB) to just extract that little subset.
Do you know any other way I’m missing here?
Otherwise I would just need to store the XML data into a PostGIS database and then change the query in my app (unfortunately)
Once you’ve downloaded the data that you want from a planet file and put it in a database, you can use OSM’s minutely diffs to update it. You won’t want to update your database with all of the data in these diffs, just the bicycle parking data, and probably the easiest way to filter that is with an osm2pgsql lua script.
Obviously the procedure above would involve you learning a bunch of new things, and it’ll be easiest to do it a small piece at a time. The database setup part of the pages in the switch2osm guides will be useful; you can run through those with a small data extract to get your database setup. You can decide (when you create your database) what fields you actually want. You’ll then want to create a lua script to only update the database with the information that you want, and can use that same script with minutely updates.
I’d suggest that you break the list of things that you need to do down into small pieces and do those one at a time - you’ll probably need to come back here to ask further questions as you go through the list.
I remember successfully running Overpass on a filtered dataset (that was only buildings and indoor building parts). I suspect that you may have made a mistake, and when trying to extract bicycle parking, you forgot to account for way/node relationships. Please tell us precisely how you did the downloading/filtering.
I think it’s because your filtered data was coming from the entire osm database.
I tried to use the XML output of Overpass API to use it as an input for my Overpass.