Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (5)
New upstream version 2.15.1
· 8ffcda19
Bas Couwenberg
authored
Feb 26, 2019
8ffcda19
Merge tag 'upstream/2.15.1'
· 7991ac13
Bas Couwenberg
authored
Feb 26, 2019
Upstream version 2.15.1
7991ac13
New upstream release.
· 6bc1ec60
Bas Couwenberg
authored
Feb 26, 2019
6bc1ec60
Update copyright years for Jochen Topf.
· 425b78bf
Bas Couwenberg
authored
Feb 26, 2019
425b78bf
Set distribution to unstable.
· b313be45
Bas Couwenberg
authored
Feb 26, 2019
b313be45
Show whitespace changes
Inline
Side-by-side
.clang-tidy
View file @
b313be45
---
Checks: '*,-android-cloexec-*,-cert-dcl21-cpp,-cert-err58-cpp,-clang-analyzer-optin.cplusplus.VirtualCall,-cppcoreguidelines-owning-memory,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-const-cast,-cppcoreguidelines-pro-type-reinterpret-cast,-cppcoreguidelines-pro-type-static-cast-downcast,-cppcoreguidelines-pro-type-vararg,-fuchsia-*,-google-runtime-references,-hicpp-invalid-access-moved,-hicpp-no-array-decay,-hicpp-no-assembler,-hicpp-vararg,-misc-macro-parentheses,-misc-unused-parameters,-modernize-make-unique,-modernize-raw-string-literal,-readability-avoid-const-params-in-decls,-readability-implicit-bool-cast,-readability-implicit-bool-conversion'
Checks: '*,-android-cloexec-*,-
bugprone-macro-parentheses,-
cert-dcl21-cpp,-cert-err58-cpp,-clang-analyzer-optin.cplusplus.VirtualCall,-cppcoreguidelines-owning-memory,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-const-cast,-cppcoreguidelines-pro-type-reinterpret-cast,-cppcoreguidelines-pro-type-static-cast-downcast,-cppcoreguidelines-pro-type-vararg,-fuchsia-*,-google-runtime-references,-hicpp-invalid-access-moved,-hicpp-no-array-decay,-hicpp-no-assembler,-hicpp-vararg,-misc-macro-parentheses,-misc-unused-parameters,-modernize-make-unique,-modernize-raw-string-literal,-readability-avoid-const-params-in-decls,-readability-implicit-bool-cast,-readability-implicit-bool-conversion'
#
# For a list of check options, see:
# https://clang.llvm.org/extra/clang-tidy/checks/list.html
...
...
@@ -9,6 +9,10 @@ Checks: '*,-android-cloexec-*,-cert-dcl21-cpp,-cert-err58-cpp,-clang-analyzer-op
# android-cloexec-*
# O_CLOEXEC isn't available on Windows making this non-portable.
#
# bugprone-macro-parentheses
# False positive in the only place where it reports something and
# disabling locally doesn't work.
#
# cert-dcl21-cpp
# It is unclear whether this is still a good recommendation in modern C++.
#
...
...
@@ -64,8 +68,7 @@ Checks: '*,-android-cloexec-*,-cert-dcl21-cpp,-cert-err58-cpp,-clang-analyzer-op
# Too strict, sometimes calling vararg functions is necessary.
#
# misc-macro-parentheses
# False positive in the only place where it reports something and
# disabling locally doesn't work.
# Old name for bugprone-macro-parentheses.
#
# misc-unused-parameters
# Can't be fixed, because then Doxygen will complain. (In file
...
...
CHANGELOG.md
View file @
b313be45
...
...
@@ -13,6 +13,27 @@ This project adheres to [Semantic Versioning](https://semver.org/).
### Fixed
## [2.15.1] - 2019-02-26
### Added
*
More tests.
*
CMake config: also find clang-tidy-7.
### Changed
*
Example and benchmark programs now don't crash with exceptions any more
but report them properly.
### Fixed
*
Compile with NDEBUG in RelWithDebInfo mode.
*
Correctly throw exception in
`multimap::dump_as_list()`
.
*
Integer truncation on 32 bit systems in
`MemoryUsage`
.
*
Exception specification on some functions.
*
Forwarding references that might have hidden copy/move constructors.
## [2.15.0] - 2018-12-07
### Added
...
...
@@ -897,7 +918,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
Doxygen (up to version 1.8.8). This version contains a workaround to fix
this.
[
unreleased
]:
https://github.com/osmcode/libosmium/compare/v2.15.0...HEAD
[
unreleased
]:
https://github.com/osmcode/libosmium/compare/v2.15.1...HEAD
[
2.15.1
]:
https://github.com/osmcode/libosmium/compare/v2.15.0...v2.15.1
[
2.15.0
]:
https://github.com/osmcode/libosmium/compare/v2.14.2...v2.15.0
[
2.14.2
]:
https://github.com/osmcode/libosmium/compare/v2.14.1...v2.14.2
[
2.14.1
]:
https://github.com/osmcode/libosmium/compare/v2.14.0...v2.14.1
...
...
CMakeLists.txt
View file @
b313be45
...
...
@@ -40,7 +40,7 @@ project(libosmium)
set
(
LIBOSMIUM_VERSION_MAJOR 2
)
set
(
LIBOSMIUM_VERSION_MINOR 15
)
set
(
LIBOSMIUM_VERSION_PATCH
0
)
set
(
LIBOSMIUM_VERSION_PATCH
1
)
set
(
LIBOSMIUM_VERSION
"
${
LIBOSMIUM_VERSION_MAJOR
}
.
${
LIBOSMIUM_VERSION_MINOR
}
.
${
LIBOSMIUM_VERSION_PATCH
}
"
)
...
...
@@ -206,11 +206,13 @@ endif()
#
#-----------------------------------------------------------------------------
if
(
MSVC
)
set
(
USUAL_COMPILE_OPTIONS
"/Ox"
)
set
(
DEV_COMPILE_OPTIONS
"/Ox"
)
set
(
RWD_COMPILE_OPTIONS
"/Ox /DNDEBUG"
)
# do not show warnings caused by missing .pdb files for libraries
set
(
USUAL_LINK_OPTIONS
"/debug /ignore:4099"
)
else
()
set
(
USUAL_COMPILE_OPTIONS
"-O3 -g"
)
set
(
DEV_COMPILE_OPTIONS
"-O3 -g"
)
set
(
RWD_COMPILE_OPTIONS
"-O3 -g -DNDEBUG"
)
set
(
USUAL_LINK_OPTIONS
""
)
endif
()
...
...
@@ -218,7 +220,7 @@ if(WIN32)
add_definitions
(
-DWIN32 -D_WIN32 -DMSWIN32 -DBGDWIN32
)
endif
()
set
(
CMAKE_CXX_FLAGS_DEV
"
${
USUAL
_COMPILE_OPTIONS
}
"
set
(
CMAKE_CXX_FLAGS_DEV
"
${
DEV
_COMPILE_OPTIONS
}
"
CACHE STRING
"Flags used by the compiler during developer builds."
FORCE
)
...
...
@@ -230,7 +232,7 @@ mark_as_advanced(
CMAKE_EXE_LINKER_FLAGS_DEV
)
set
(
CMAKE_CXX_FLAGS_RELWITHDEBINFO
"
${
USUAL
_COMPILE_OPTIONS
}
"
set
(
CMAKE_CXX_FLAGS_RELWITHDEBINFO
"
${
RWD
_COMPILE_OPTIONS
}
"
CACHE STRING
"Flags used by the compiler during RELWITHDEBINFO builds."
FORCE
)
...
...
@@ -422,7 +424,7 @@ endif()
#
#-----------------------------------------------------------------------------
message
(
STATUS
"Looking for clang-tidy"
)
find_program
(
CLANG_TIDY NAMES clang-tidy clang-tidy-7.0 clang-tidy-6.0 clang-tidy-5.0
)
find_program
(
CLANG_TIDY NAMES clang-tidy
clang-tidy-7
clang-tidy-7.0 clang-tidy-6.0 clang-tidy-5.0
)
if
(
CLANG_TIDY
)
message
(
STATUS
"Looking for clang-tidy - found
${
CLANG_TIDY
}
"
)
...
...
README.md
View file @
b313be45
...
...
@@ -7,7 +7,7 @@ A fast and flexible C++ library for working with OpenStreetMap data.
Libosmium works on Linux, Mac OSX and Windows.
[

](https://travis-ci.org/osmcode/libosmium)
[

](https://ci.appveyor.com/project/
Mapbox
/libosmium)
[

](https://ci.appveyor.com/project/
lonvia
/libosmium
/branch/master
)
[

](https://codecov.io/gh/osmcode/libosmium)
[

](https://repology.org/metapackage/libosmium)
...
...
appveyor.yml
View file @
b313be45
...
...
@@ -14,8 +14,6 @@ clone_depth: 1
environment
:
matrix
:
-
config
:
MSYS2
autocrlf
:
true
-
config
:
Debug
autocrlf
:
true
-
config
:
Release
...
...
@@ -24,6 +22,8 @@ environment:
autocrlf
:
false
-
config
:
Release
autocrlf
:
false
-
config
:
MSYS2
autocrlf
:
true
#-----------------------------------------------------------------------------
...
...
benchmarks/osmium_benchmark_count.cpp
View file @
b313be45
...
...
@@ -39,6 +39,7 @@ int main(int argc, char* argv[]) {
std
::
exit
(
1
);
}
try
{
const
std
::
string
input_filename
{
argv
[
1
]};
osmium
::
io
::
Reader
reader
{
input_filename
};
...
...
@@ -50,5 +51,9 @@ int main(int argc, char* argv[]) {
std
::
cout
<<
"Nodes: "
<<
handler
.
nodes
<<
'\n'
;
std
::
cout
<<
"Ways: "
<<
handler
.
ways
<<
'\n'
;
std
::
cout
<<
"Relations: "
<<
handler
.
relations
<<
'\n'
;
}
catch
(
const
std
::
exception
&
e
)
{
std
::
cerr
<<
e
.
what
()
<<
'\n'
;
std
::
exit
(
1
);
}
}
benchmarks/osmium_benchmark_count_tag.cpp
View file @
b313be45
...
...
@@ -42,6 +42,7 @@ int main(int argc, char* argv[]) {
std
::
exit
(
1
);
}
try
{
const
std
::
string
input_filename
{
argv
[
1
]};
osmium
::
io
::
Reader
reader
{
input_filename
};
...
...
@@ -51,5 +52,9 @@ int main(int argc, char* argv[]) {
reader
.
close
();
std
::
cout
<<
"r_all="
<<
handler
.
all
<<
" r_counter="
<<
handler
.
counter
<<
'\n'
;
}
catch
(
const
std
::
exception
&
e
)
{
std
::
cerr
<<
e
.
what
()
<<
'\n'
;
std
::
exit
(
1
);
}
}
benchmarks/osmium_benchmark_index_map.cpp
View file @
b313be45
...
...
@@ -24,6 +24,7 @@ int main(int argc, char* argv[]) {
std
::
exit
(
1
);
}
try
{
const
std
::
string
input_filename
{
argv
[
1
]};
const
std
::
string
location_store
{
argv
[
2
]};
...
...
@@ -36,5 +37,9 @@ int main(int argc, char* argv[]) {
osmium
::
apply
(
reader
,
location_handler
);
reader
.
close
();
}
catch
(
const
std
::
exception
&
e
)
{
std
::
cerr
<<
e
.
what
()
<<
'\n'
;
std
::
exit
(
1
);
}
}
benchmarks/osmium_benchmark_mercator.cpp
View file @
b313be45
...
...
@@ -31,6 +31,7 @@ int main(int argc, char* argv[]) {
std
::
exit
(
1
);
}
try
{
const
std
::
string
input_filename
{
argv
[
1
]};
osmium
::
io
::
Reader
reader
{
input_filename
};
...
...
@@ -38,5 +39,9 @@ int main(int argc, char* argv[]) {
GeomHandler
handler
;
osmium
::
apply
(
reader
,
handler
);
reader
.
close
();
}
catch
(
const
std
::
exception
&
e
)
{
std
::
cerr
<<
e
.
what
()
<<
'\n'
;
std
::
exit
(
1
);
}
}
benchmarks/osmium_benchmark_static_vs_dynamic_index.cpp
View file @
b313be45
...
...
@@ -44,6 +44,7 @@ int main(int argc, char* argv[]) {
std
::
exit
(
1
);
}
try
{
const
std
::
string
input_filename
{
argv
[
1
]};
osmium
::
memory
::
Buffer
buffer
{
osmium
::
io
::
read_file
(
input_filename
)};
...
...
@@ -140,5 +141,9 @@ int main(int argc, char* argv[]) {
std
::
cout
<<
" min="
<<
diff_min
<<
"ms ("
<<
percent_min
<<
"%)"
;
std
::
cout
<<
" avg="
<<
diff_avg
<<
"ms ("
<<
percent_avg
<<
"%)"
;
std
::
cout
<<
" max="
<<
diff_max
<<
"ms ("
<<
percent_max
<<
"%)
\n
"
;
}
catch
(
const
std
::
exception
&
e
)
{
std
::
cerr
<<
e
.
what
()
<<
'\n'
;
std
::
exit
(
1
);
}
}
benchmarks/osmium_benchmark_write_pbf.cpp
View file @
b313be45
...
...
@@ -17,6 +17,7 @@ int main(int argc, char* argv[]) {
std
::
exit
(
1
);
}
try
{
std
::
string
input_filename
{
argv
[
1
]};
std
::
string
output_filename
{
argv
[
2
]};
...
...
@@ -31,5 +32,9 @@ int main(int argc, char* argv[]) {
writer
.
close
();
reader
.
close
();
}
catch
(
const
std
::
exception
&
e
)
{
std
::
cerr
<<
e
.
what
()
<<
'\n'
;
std
::
exit
(
1
);
}
}
debian/changelog
View file @
b313be45
libosmium (2.15.
0-2) UNRELEASED
; urgency=medium
libosmium (2.15.
1-1) unstable
; urgency=medium
* New upstream release.
* Bump Standards-Version to 4.3.0, no changes.
* Update copyright years for Jochen Topf.
-- Bas Couwenberg <sebastic@debian.org> Tue, 2
5 Dec 2018 22:31:31
+0100
-- Bas Couwenberg <sebastic@debian.org> Tue, 2
6 Feb 2019 17:12:59
+0100
libosmium (2.15.0-1) unstable; urgency=medium
...
...
debian/copyright
View file @
b313be45
...
...
@@ -4,7 +4,7 @@ Upstream-Contact: Osmium Developers (https://osmcode.org/contact)
Source: https://github.com/osmcode/libosmium
Files: *
Copyright: 2013-201
8
, Jochen Topf <jochen@topf.org>
Copyright: 2013-201
9
, Jochen Topf <jochen@topf.org>
2012, Two Blue Cubes Ltd.
License: BSL-1.0
...
...
@@ -29,7 +29,7 @@ License: public-domain
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Files: debian/*
Copyright:
©
2015, Bas Couwenberg <sebastic@debian.org>
Copyright: 2015, Bas Couwenberg <sebastic@debian.org>
License: GPL-2+
License: BSL-1.0
...
...
examples/osmium_amenity_list.cpp
View file @
b313be45
...
...
@@ -113,6 +113,7 @@ int main(int argc, char* argv[]) {
std
::
exit
(
1
);
}
try
{
// The input file
const
osmium
::
io
::
File
input_file
{
argv
[
1
]};
...
...
@@ -167,5 +168,10 @@ int main(int argc, char* argv[]) {
reader
.
close
();
std
::
cerr
<<
"Pass 2 done
\n
"
;
}
catch
(
const
std
::
exception
&
e
)
{
// All exceptions used by the Osmium library derive from std::exception.
std
::
cerr
<<
e
.
what
()
<<
'\n'
;
std
::
exit
(
1
);
}
}
examples/osmium_area_test.cpp
View file @
b313be45
...
...
@@ -107,6 +107,7 @@ int main(int argc, char* argv[]) {
print_usage
(
argv
[
0
]);
}
try
{
// Initialize an empty DynamicHandler. Later it will be associated
// with one of the handlers. You can think of the DynamicHandler as
// a kind of "variant handler" or a "pointer handler" pointing to the
...
...
@@ -194,5 +195,10 @@ int main(int argc, char* argv[]) {
}
std
::
cerr
<<
"
\n
"
;
}
}
catch
(
const
std
::
exception
&
e
)
{
// All exceptions used by the Osmium library derive from std::exception.
std
::
cerr
<<
e
.
what
()
<<
'\n'
;
std
::
exit
(
1
);
}
}
examples/osmium_change_tags.cpp
View file @
b313be45
...
...
@@ -196,7 +196,7 @@ int main(int argc, char* argv[]) {
reader
.
close
();
}
catch
(
const
std
::
exception
&
e
)
{
// All exceptions used by the Osmium library derive from std::exception.
std
::
cerr
<<
e
.
what
()
<<
"
\n
"
;
std
::
cerr
<<
e
.
what
()
<<
'
\n
'
;
std
::
exit
(
1
);
}
}
...
...
examples/osmium_convert.cpp
View file @
b313be45
...
...
@@ -147,7 +147,7 @@ int main(int argc, char* argv[]) {
reader
.
close
();
}
catch
(
const
std
::
exception
&
e
)
{
// All exceptions used by the Osmium library derive from std::exception.
std
::
cerr
<<
e
.
what
()
<<
"
\n
"
;
std
::
cerr
<<
e
.
what
()
<<
'
\n
'
;
std
::
exit
(
1
);
}
}
...
...
examples/osmium_count.cpp
View file @
b313be45
...
...
@@ -66,6 +66,7 @@ int main(int argc, char* argv[]) {
std
::
exit
(
1
);
}
try
{
// The Reader is initialized here with an osmium::io::File, but could
// also be directly initialized with a file name.
osmium
::
io
::
File
input_file
{
argv
[
1
]};
...
...
@@ -91,5 +92,10 @@ int main(int argc, char* argv[]) {
osmium
::
MemoryUsage
memory
;
std
::
cout
<<
"
\n
Memory used: "
<<
memory
.
peak
()
<<
" MBytes
\n
"
;
}
catch
(
const
std
::
exception
&
e
)
{
// All exceptions used by the Osmium library derive from std::exception.
std
::
cerr
<<
e
.
what
()
<<
'\n'
;
std
::
exit
(
1
);
}
}
examples/osmium_create_pois.cpp
View file @
b313be45
...
...
@@ -93,7 +93,7 @@ int main(int argc, char* argv[]) {
writer
.
close
();
}
catch
(
const
std
::
exception
&
e
)
{
// All exceptions used by the Osmium library derive from std::exception.
std
::
cerr
<<
e
.
what
()
<<
"
\n
"
;
std
::
cerr
<<
e
.
what
()
<<
'
\n
'
;
std
::
exit
(
1
);
}
}
...
...
examples/osmium_debug.cpp
View file @
b313be45
...
...
@@ -37,6 +37,7 @@ int main(int argc, char* argv[]) {
std
::
exit
(
1
);
}
try
{
// Default is all entity types: nodes, ways, relations, and changesets
osmium
::
osm_entity_bits
::
type
read_types
=
osmium
::
osm_entity_bits
::
all
;
...
...
@@ -80,5 +81,10 @@ int main(int argc, char* argv[]) {
// You do not have to close the Reader explicitly, but because the
// destructor can't throw, you will not see any errors otherwise.
reader
.
close
();
}
catch
(
const
std
::
exception
&
e
)
{
// All exceptions used by the Osmium library derive from std::exception.
std
::
cerr
<<
e
.
what
()
<<
'\n'
;
std
::
exit
(
1
);
}
}
Prev
1
2
3
4
5
…
12
Next