Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
CMakeLists.txt Remove dependency on (win)getopt completely. Feb 7, 2018
README.md Add missing example to examples/README.md. Jan 13, 2017
osmium_amenity_list.cpp Use flex_mem index in amenity_list and area_test examples. Aug 15, 2017
osmium_area_test.cpp Remove dependency on (win)getopt from area_test and convert examples. Feb 7, 2018
osmium_change_tags.cpp Refactor to avoid misc-suspicious-string-compare clang-tidy warning. Dec 18, 2017
osmium_convert.cpp Resolve some clang-tidy reports. Jul 9, 2018
osmium_count.cpp Name unused parameters in comments. Dec 18, 2017
osmium_create_pois.cpp Use the right syntax to override clang-tidy settings in the code. Feb 26, 2018
osmium_debug.cpp Add some braces for code readability (clang-tidy). Jun 9, 2017
osmium_dump_internal.cpp Disable clang-tidy warning in place we can't do anything about. Mar 20, 2018
osmium_filter_discussions.cpp Update some URLs. Use https where possible. Mar 7, 2018
osmium_index_lookup.cpp Disable some clang-tidy warnings. Mar 20, 2018
osmium_location_cache_create.cpp Disable clang-tidy warning in place we can't do anything about. Mar 20, 2018
osmium_location_cache_use.cpp Example code now sets files to binary mode on Windows. Aug 24, 2017
osmium_pub_names.cpp Remove executable bit from .cpp files. Sep 15, 2016
osmium_read.cpp Add comments to and cleanup up examples. Sep 9, 2016
osmium_read_with_progress.cpp Make util namespace inline. Mar 21, 2018
osmium_road_length.cpp Use flex_mem index in amenity_list and area_test examples. Aug 15, 2017
osmium_tiles.cpp Use Location setters taking a string in osmium_tiles example. Mar 21, 2018

README.md

Osmium example programs

The programs in this directory are intended as examples for developers. They contain extensive comments explaining what's going on. Note that the examples only cover a small part of what Osmium can do, you should also read the manuals and API documentation.

All programs can be run without arguments and they will tell you how to use them.

Very simple examples

  • osmium_read
  • osmium_count
  • osmium_debug
  • osmium_tiles

Still reasonably simple examples

  • osmium_amenity_list
  • osmium_read_with_progress
  • osmium_filter_discussions
  • osmium_convert
  • osmium_pub_names
  • osmium_road_length

More advanced examples

  • osmium_area_test
  • osmium_create_pois

Even more advanced examples

  • osmium_change_tags
  • osmium_location_cache_create
  • osmium_location_cache_use
  • osmium_dump_internal
  • osmium_index_lookup

License

The code in these example files is released into the Public Domain. Feel free to copy the code and build on it.