hi. I am looking to create telegram bot to send information about changesets is for Iran. how can I do it ? which API is available to do this ?
With the current changeset bbox it is a big chance that you are will be overlapped with huge area changeset, so the answer:
- Reliable way to get changesets for particular country is absent
Iâve used a local instance of ChangesetMD** to search for changesets overlapping (or within) a particular area. However, as noted above, just because the bounding box overlaps a country doesnât mean that there are edits in that country in that changeset.
** not written by me; just slightly adapted from a fork of a fork of the original.
I use OSMCha.org to get an RSS feed of changesets in my home state, which is nowhere near the size of Iran. This doesnât exactly answer your question about interfacing with Telegram.
I also use ChangesetMD as @SomeoneElse mentioned but that requires setting up a PostgreSQL database to receive regular changeset updates.
In both methods, large changeset areas can give false positives as mentioned by others.
An optimization ideaďź
- Get all nodes related to the changeset
- Check if the latitude and longitude of some nodes fall within the specific country
The standard reply to suggestions of this ilk is âthat sounds like a good idea - why donât you do that?â.
Most âextra bits around osm.orgâ (and quite a few bits at osm.org itself) started off as external projects and âbecame part of the projectâ because they were proved to work and people found them useful.
If you have a go yourself**, youâll see what API calls are available, and when you deploy it youâll encounter some of the challenges and have to figure out how best to deal with them (for example, if a way has changed but no nodes - do people want to know about that? What about relatons?). On the way to creating something Iâm sure youâll have lots of questions, and youâll be able to ask those here.
** the Garmin map creation process that I used to use a few years ago did originally have some element of this, but I never found a way of doing the extra API calls efficiently with the tools that I had available at the time. There are definitely avenues to explore if someoneâs keen, though.
The last âthingâ for that this was true was the OSMBugs integration back in ⌠2013 (and I could argue that even that was a bad idea).
I donât want to start a drawn out discussion here on why that is so (there are good reasons), just pointing out that realistically being a popular external service is worth exactly nothing in that respect.
Perhaps you misread what I said. Are you really saying that no âextra bits around osm.orgâ (new websites, services, capabilities) have been created since 2013?
I would still maintain that the best way to try and find out the issues with implementing something is to actually try and do it yourself. At first glance, the âoptimization ideaâ above hasnât had that happen to it, and would certainly benefit from doing to.
No, just that nothing has been âintegratedâ that started as a third party service/feature for a long time.
Just in case anyone is interested, I have no expectation that this will be implemented in the API in the near future, or ever, but I would like to share my ideas for unlocking the potential of changesets with the community.
Hereâs a post in Ukrainian, and I hope online translation tools will help you grasp the essence of my proposals.