{"id":15058879,"url":"https://github.com/teknosint/osmosint","last_synced_at":"2026-01-02T21:03:04.371Z","repository":{"id":242347810,"uuid":"809020194","full_name":"Teknosint/Osmosint","owner":"Teknosint","description":"Open-Source analysis tool to help you make advanced queries and find anything anywhere on earth through OSM data and Overpass","archived":false,"fork":false,"pushed_at":"2024-06-03T08:31:18.000Z","size":118,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-14T10:14:45.158Z","etag":null,"topics":["geoint","openstreetmap","openstreetmap-data","osint","overpass","overpy"],"latest_commit_sha":null,"homepage":"https://github.com/Teknosint/Osmosint","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Teknosint.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-01T13:06:39.000Z","updated_at":"2025-02-03T14:26:57.000Z","dependencies_parsed_at":"2024-06-02T12:42:38.150Z","dependency_job_id":"7ea6dc29-e408-4ca3-883c-4e0b903cac62","html_url":"https://github.com/Teknosint/Osmosint","commit_stats":null,"previous_names":["teknosint/osmosint"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Teknosint%2FOsmosint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Teknosint%2FOsmosint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Teknosint%2FOsmosint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Teknosint%2FOsmosint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Teknosint","download_url":"https://codeload.github.com/Teknosint/Osmosint/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243558477,"owners_count":20310574,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["geoint","openstreetmap","openstreetmap-data","osint","overpass","overpy"],"created_at":"2024-09-24T22:32:11.396Z","updated_at":"2026-01-02T21:03:04.318Z","avatar_url":"https://github.com/Teknosint.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Osmosint\n## Description\nOsmosint is an open-source analysis tool designed to help you find anything, anywhere on earth. Through queries to [OpenStreetMap](https://www.openstreetmap.org) (OSM) data, performed with the [Overpy](https://pypi.org/project/overpy/) library, it allows you to get the exact coordinates of any elements, anywhere on earth.\n\nExamples of what you can do with Osmosint in less than 1 minute:\n- Get the exact coordinates of all pharmacies in London\n- Get the exact coordinates of any bench within a 10m radius of a bakery in Berlin\n- Get the Google Maps url of all bakeries in Paris.\n- Create a file with the Google Maps url of all the bookshops within a 50m radius of a restaurant in New York City.\n\nI'm sure you can imagine countless [examples](https://github.com/Teknosint/Osmosint?tab=readme-ov-file#osmosint-walkthrough) where this would help you during an open-source research. The only limit is your imagination (and existing OSM tags)!\n## Table of Contents\n- [Installation](https://github.com/Teknosint/Osmosint?tab=readme-ov-file#installation)\n- [Usage](https://github.com/Teknosint/Osmosint?tab=readme-ov-file#usage)\n\t- [Basic usage](https://github.com/Teknosint/Osmosint?tab=readme-ov-file#basic-usage)\n\t- [Commands functionality](https://github.com/Teknosint/Osmosint?tab=readme-ov-file#commands-functionality)\n\t\t- [Locate](https://github.com/Teknosint/Osmosint?tab=readme-ov-file#locate)\n\t\t- [Radius](https://github.com/Teknosint/Osmosint?tab=readme-ov-file#radius)\n\t\t- [Convert](https://github.com/Teknosint/Osmosint?tab=readme-ov-file#convert)\n\t- [Choose output format for locate and radius](https://github.com/Teknosint/Osmosint?tab=readme-ov-file#output-format-for-locate-and-radius)\n- [Surface-level presentation of OSM (important to understand Osmosint)](https://github.com/Teknosint/Osmosint?tab=readme-ov-file#surface-level-presentation-of-osm-important-to-understand-osmosint)\n- [Examples](https://github.com/Teknosint/Osmosint?tab=readme-ov-file#examples)\n\t- [Osmosint Walkthrough](https://github.com/Teknosint/Osmosint?tab=readme-ov-file#osmosint-walkthrough)\n\t- [Troubleshooting an absence of results](https://github.com/Teknosint/Osmosint?tab=readme-ov-file#troubleshooting-an-absence-of-results)\n- [License](https://github.com/Teknosint/Osmosint?tab=readme-ov-file#license)\n## Installation\nFollow the instructions below to install Osmosint on your system (works for both Linux and Windows).\n1. **Clone the repository**\n\nOpen a terminal or Command Prompt and run:\n```bash\ngit clone https://github.com/teknosint/osmosint.git\ncd osmosint\n```\n\n2. **Set-up a virtual environment (optional)**\n\nSetting up a virtual environment can be useful to prevent version conflicts between packages.\n- **For Windows**\n```bash\npython -m venv venv\nvenv\\Scripts\\activate\n```\n- **For Linux**\n```bash\npython3 -m venv venv\nsource venv/bin/activate\n```\n\n3. **Install the dependencies**\n```bash\npip install -r requirements.txt\n```\n## Usage\n### Basic usage\n**Windows**\n```\nosmosint.py -h\n```\n**Unix/Linux**\n```\n./osmosint.py -h\n```\n### Commands functionality\n##### Locate\nTo locate the instances of a single element within a given location (for example, to get the coordinates of all bakeries in Vienna), you can use:\n```\n./osmosint.py locate -h\n```\n\n##### Radius\nTo locate the instances of a single tag within a given radius of another tag (for example, to get the coordinates of all the bakeries within a 10m radius of a pharmacy in Vienna) , you can use:\n```\n./osmosint.py radius -h\n```\n\n##### Convert\nTo change the format of a coordinate (either from dms to decimal, or from decimal to dms), you can use:\n```\n./osmosint.py convert -h\n```\n### Output format for *locate* and *radius*\n\n| Parameter | Effect                                          |\n| --------- | ----------------------------------------------- |\n| -dec      | Output coordinates in decimal format            |\n| -dms      | Output coordinates in DMS format                |\n| -url      | Output results in Google Maps URL format        |\n| -w txt    | Write results in a txt file instead of printing |\n| -w csv    | Write results in a csv file instead of printing |\n\n**Default output format**: coordinates in decimal format printed in the terminal. Printing is the rule, file-writing is the exception.\n\nWhen choosing to output **DMS-formatted coordinates in a csv file**, it is a bit harder to handle because of special characters '°', ,' \" ' inherent to the coordinates. Therefore, the coordinates are written with a '\\\\' character in front of every double quote to ensure no error in the importing of data. To then have readable coordinates, you can replace all \\\\ with nothing (ctrl + h).\n\nSee [Examples](https://github.com/Teknosint/Osmosint?tab=readme-ov-file#examples) to get a better idea of how to choose the output format.\n\n## Surface-level presentation of OSM (important to understand Osmosint)\nSome of you might skip this part but I truly recommend you don't. This part won't go into deep details about the functionning of OverpassQL and OpenStreetMap, it is just a basic rundown to ensure that you know how to make the best use of the program.\n\nFor the program to send a correct query and get the answers you are looking for, you will need to input some data. Overpass asks for the data to take a particular format. Below are the things you will have to input.\n### Location\nTo input a location, the program will ask you this question\n\n![Question Location](https://github.com/Teknosint/Osmosint/assets/168837526/e37b6b48-8ec8-4dc6-8645-0faac68c90a6)\n\n*Figure 1 - When Osmosint asks you to input a location*\n\nThose are the two types of location that Overpass handles. Here is a quick explanation of each of them.\n1. **Geographical Area**\nThe Geographical Area is the most straightforward way to input a location. Essentially, if you want the query to look in London, enter 'London'.\n\nOSM data is, however, not like google maps. If you enter \"Paris\", looking for the French capital, it might fetch the data from Paris in Texas. It might also fetch the data from Greater Paris, and not limit to the strict boundaries of the city of Paris, France. \n\nHere are some methods to ensure that the data you enter is the closest to the location you are looking for:\n- https://taginfo.openstreetmap.org/keys/name#values --\u003e List of all the possible values of the 'name' attribute for OSM. Before trying a value, you can make sure that it is included in the database. This can especially be useful when looking for a city that has special characters in its name.\n- https://osmnames.org/ (recommended)--\u003e Open-source project that gathers all OSM place names on a nice, easily-accessible website. When you enter a location on osmnames, check out the square on the bottom-right corner, and look for the \"name\" variable. If the square that you see appear on the screen matches the location where you want the query to be, you can enter the value of \"name\" in the Osmosint.\n\n2. **Bounding Box** \nBounding Boxes (bbox) are less straightforward, but significantly more precise than Geographical Areas. \n\nA bbox is a square on the map. Each corner of the square represents a coordinate. Instead of having OSM draw a bbox based on the location you entered, you can specify the coordinates so that the query only looks within the bbox that you defined. Here is an example of a bbox, taken from https://osmnames.org/ (where you can see how imprecise Geographical Areas are; here is the area that would be queried if you entered \"London\"):\n\n![Screenshot_Osmnames](https://github.com/Teknosint/Osmosint/assets/168837526/63973ae1-e1bb-4f43-91f0-103cf31b2b53)\n\n*Figure 2 - Screenshot of the query 'London' on https://osmnames.org/. The red \"A\" and \"B\" were added to illustrate the corners of the bbox.*\n\n**Bbox guidelines**\n- When entering the bbox, you only need to enter the coordinates from the bottom-left (A) and top-right corners (B). \n- You can enter the coordinates under any format (48.875799 or 48°51'20.8\"N), as long as you provide them following this structure: latitude, longitude.\n- To get the coordinates, the easier option is to use Google Maps and click on the map to get the coordinates of a specific place. Any alternative that works as well can also be used.\n\n### Tags\nTags are names given to the elements you are looking for. Again, OSM data is not as straightforward as GoogleMaps. If you enter \"bakery\", you will not get all bakeries. Tags follow a specific format (key=value). \n\n- **Format key=value**\nThis section is an extract from the OSM wiki. Consult [here](https://wiki.openstreetmap.org/wiki/Tags) for more information.\n\nTags follow the format key=value. The key describes a topic, category or feature (example: amenity, healthcare, shop). The value provides detail for the topic (example: bakery, pharmacy, name of a specific street).\n\nHere are examples of basic tags to help understand the way they work:\n- shop=bakery --\u003e Find all bakeries\n- healthcare=pharmacy --\u003e Find all pharmacies\n- incline=steps --\u003e Find all steps\n\nYou need to pay attention to the fact that values can have several keys. For example, some pharmacies might be found using 'healthcare=pharmacy'. But you can also get pharmacies using 'amenity=pharmacy'.\n\n- **Where to find tags?**\nThe best way to find tags is to look at the [taginfo website](https://taginfo.openstreetmap.org/tags), which lists all existing tags within OSM. There, you can search for tags on the upper-right searchbar.\n\n- **The program**\nOSM data is categorised under three types: nodes, ways, relations. This program only fetches nodes results. Ways and relations are harder to handle considering that they are made up of several nodes (so several coordinates).\n\nOnce you find adequate tag (or tags) for a query, you will need to enter them in Osmosint using the key=value format. Example: natural=tree.\n\n## Examples\n```\n./osmosint.py locate -dec -url\n```\nLaunch the locate functionality of the program, and print the results in decimal format and as Google Maps url in the terminal.\n\n```\n./osmosint.py radius --dms_coords -w txt\n```\nLaunch the radius functionality of the program, and print the results in DMS format in a .txt file.\n### Osmosint Walkthrough\nIn this scenario, the user wants to find all benches within a 10m radius of a bakery in Barcelona, and wants the output to be in Google Maps URL format.\n\nPrior to launching the program, the user checks [TagInfo](https://taginfo.openstreetmap.org/tags) and finds the corresponding tags for bakeries (shop=bakery) and benches (amenity=bench). Then the user checks [Osmnames](https://osmnames.org/) to decide on the location to use. He finds that Barcelona's bbox matches his needs, so he decides to use \"Barcelona\".\n\nWith every piece of information ready, the user can launch Osmosint.\n\n![Screenshot_program use](https://github.com/Teknosint/Osmosint/assets/168837526/749da1e3-e3a3-4d51-ad5e-0519e15815ce)\n\n*Figure 3 - Osmosint walkthrough of the query 'osmosint.py radius -url'*\n\n1. **Command**: `./osmosint.py radius -url`. Meaning I want to perform a [Radius](https://github.com/Teknosint/Osmosint?tab=readme-ov-file#radius) search and have the results output in Google Maps URL format.\n2. **User Input**: Osmosint consecutively asks the user for the choices in location type, location name, first tag, second tag, and radius. If the user had chosen \"2. Bounding Box\", the program would have asked for the coordinates of the [bbox](https://github.com/Teknosint/Osmosint?tab=readme-ov-file#surface-level-presentation-of-osm-important-to-understand-osmosint). \n3. Output: Osmosint outputs the results in Google Maps URL format.\n\nThe user can now click on each google maps link and see whether the bench matches the one he was looking for!\n## Troubleshooting an absence of results\nIf you get a message from Osmosint saying that there was no response to your query, it means that the query fetched 0 instances from the specified tag within the location. Here are the steps to follow:\n- Check the syntax of the tag(s) you entered. Make sure that they closely match what you see on https://taginfo.openstreetmap.org/tags\n- On taginfo, also check that the key/value combination do exist. For example, pharmacies exist under amenity=pharmacy but not under shop=pharmacy.\n- If you entered a Geographical area as location, check on https://osmnames.org/ that it exists, that the syntax is correct, and that the covered area corresponds to the location where you want to do your query.\n- If you entered a bbox, double-check that the coordinates you entered are correct. The API only accepts coordinates in decimal format (12.123123). You can enter the coordinates in dms format (48°51'20.8\"N), which are then converted by the program. If you want, you can try to convert the coordinates using the *convert* command of Osmosint to check that the decimal version matches what you intended to enter. If they do correspond to your bbox, you can try the *locate* or *radius* commands again with the new coordinates.\n- If you are doing a radius check, try increasing the radius to check whether the problem comes from a radius that is too narrow. For example, if you tried to get all the pharmacies within a 1m radius of a bakery, it is likely that you won't get a response. However, if you tried all the pharmacies within a 100m radius in Paris and did not get anything, there is likely a problem with how you entered your parameters.\n## License\nThis project is licensed under the MIT License. See the [LICENSE](LISENSE) file for details.\n\n### Acknowledgements\nThis project uses the [OverPy library](https://pypi.org/project/overpy/), which is licensed under the MIT License. \n\nData used by this project is retrieved from the Overpass API, which operates under the Open Database License (ODbL) by OpenStreetMap. Please see the [OSM legal FAQ](https://wiki.osmfoundation.org/wiki/Licence) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteknosint%2Fosmosint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteknosint%2Fosmosint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteknosint%2Fosmosint/lists"}