https://github.com/codesoap/osmf Skip to content Sign up * Why GitHub? + Features + Mobile + Actions + Codespaces + Packages + Security + Code review + Issues + Integrations + GitHub Sponsors + Customer stories * Team * Enterprise * Explore + Explore GitHub + Learn and contribute + Topics + Collections + Trending + Learning Lab + Open source guides + Connect with others + The ReadME Project + Events + Community forum + GitHub Education + GitHub Stars program * Marketplace * Pricing + Plans + Compare plans + Contact Sales + Education [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} codesoap / osmf Public * Notifications * Fork 2 * Star 76 * OpenStreetMap find - A simple command line tool to explore osm data MIT License 76 stars 2 forks Star Notifications * Code * Issues 1 * Pull requests 0 * Actions * Projects 0 * Wiki * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Wiki * Security * Insights This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 2 branches 3 tags Code Latest commit @codesoap codesoap Fix two typos in SETUP_DATABASE.md ... 63d7606 Feb 11, 2022 Fix two typos in SETUP_DATABASE.md 63d7606 Git stats * 31 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time LICENSE Add LICENSE Oct 1, 2020 README.md Link v2.0.0 in README Oct 19, 2020 SETUP_DATABASE.md Fix two typos in SETUP_DATABASE.md Feb 11, 2022 go.mod Initial commit Sep 26, 2020 go.sum Initial commit Sep 26, 2020 main.go Search for tags case-insensitively Oct 24, 2020 View code Installation Basic Usage More Examples Full Usage Info README.md A small tool for playing around with osm databases (those resulting from osm2pgsql). Read SETUP_DATABASE.md to learn how to set up the required database. Note that osm2pgsql by default does not put all available tags into the database and osmf only deals with this limited tag-set. Installation git clone git@github.com:codesoap/osmf.git cd osmf go install # The binary is now at ~/go/bin/osmf. If you don't want to install the go compiler, you can download binaries from the latest release page. Basic Usage $ # Find all entries within 50m of the center of Bremen, Germany: $ osmf 53.076 8.807 50 table: planet_osm_polygon distance_meters: 0 osm_id: -3133460 osm_link: https://www.openstreetmap.org/relation/3133460 boundary: political name: Bremen I ref: 54 way_area: 427011008.000000 table: planet_osm_polygon distance_meters: 0 osm_id: -4496501 osm_link: https://www.openstreetmap.org/relation/4496501 access: green_sticker_germany boundary: low_emission_zone name: Umweltzone Bremen way_area: 19706300.000000 ... $ # Use UNIX tools to compact the output: $ osmf 53.076 8.807 50 | awk '/^$/ /^(distance|osm_link|name)/' distance_meters: 0 osm_link: https://www.openstreetmap.org/relation/3133460 name: Bremen I distance_meters: 0 osm_link: https://www.openstreetmap.org/relation/4496501 name: Umweltzone Bremen ... $ # Find a bicycle shop near the center of Bremen: $ osmf 53.076 8.807 500 shop=bicycle | awk '/^(table|osm_id):/ {next} //' distance_meters: 244 osm_link: https://www.openstreetmap.org/node/834082330 addr:housenumber: 30-32 name: Velo-Sport operator: Velo-Sport Ihr Radsporthaus GmbH shop: bicycle More Examples # Find a natural forest of at least 1km2: osmf 53.076 8.807 3300 natural=wood 'way_area>1e+6' # Find a bakery: osmf 53.076 8.807 200 shop=bakery # Find nearby public transport stations: osmf 53.076 8.807 200 public_transport=stop_position # Find nearby hiking routes: osmf 53.076 8.807 500 route=hiking # Searching for multiple values of the same tag is also possible: osmf 53.076 8.807 3000 sport=climbing sport=swimming # Pro tip: Use "_" to search for any value: osmf 53.076 8.807 500 sport=_ # Learn about the population of the city and it's urban districts: osmf 53.076 8.807 10000 population=_ Full Usage Info osmf [way_area<] [way_area>] [=]... General tags: - access - addr:housename - addr:housenumber - addr:interpolation - admin_level - aerialway - aeroway - amenity - area - barrier - bicycle - brand - bridge - boundary - building - construction - covered - culvert - cutting - denomination - disused - embankment - foot - generator:source - harbour - highway - historic - horse - intermittent - junction - landuse - layer - leisure - lock - man_made - military - motorcar - name - natural - office - oneway - operator - place - population - power - power_source - public_transport - railway - ref - religion - route - service - shop - sport - surface - toll - tourism - tower:type - tunnel - water - waterway - wetland - width - wood Tags only for lines and polygons: - tracktype Tags only for for points: - capital - ele The tags are explained here. About OpenStreetMap find - A simple command line tool to explore osm data Topics cli osm osm2pgsql Resources Readme License MIT License Stars 76 stars Watchers 3 watching Forks 2 forks Releases 3 v2.0.0 Latest Oct 19, 2020 + 2 releases Packages 0 No packages published Languages * Go 100.0% * (c) 2022 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.