Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (4)
New upstream version 2.2.4
· 042d0cc0
Bas Couwenberg
authored
Feb 27, 2019
042d0cc0
Merge tag 'upstream/2.2.4'
· a981624f
Bas Couwenberg
authored
Feb 27, 2019
Upstream version 2.2.4
a981624f
New upstream release.
· d62ae99e
Bas Couwenberg
authored
Feb 27, 2019
d62ae99e
Set distribution to unstable.
· 434efa28
Bas Couwenberg
authored
Feb 27, 2019
434efa28
Show whitespace changes
Inline
Side-by-side
.gitignore
View file @
434efa28
build
*.swp
.ycm_extra_conf.pyc
CHANGELOG.md
View file @
434efa28
...
...
@@ -13,7 +13,19 @@ This project adheres to [Semantic Versioning](https://semver.org/).
### Fixed
## [2.2.3] - 2018-02-06
## [2.2.4] - 2019-02-27
### Changed
-
Also look for newer clang-tidy versions in CMake config.
### Fixed
-
Put Antarctic closure to exactly +/- 180 degree longitude.
-
Add try/catch around most of main so we don't end with exception.
## [2.2.3] - 2019-02-06
### Fixed
...
...
@@ -21,7 +33,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
-
Better error reporting on some exceptions.
## [2.2.2] - 201
8
-02-03
## [2.2.2] - 201
9
-02-03
### Fixed
...
...
@@ -148,7 +160,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
-
Added man pages
[
unreleased
]:
https://github.com/osmcode/osmium-tool/compare/v2.2.3...HEAD
[
unreleased
]:
https://github.com/osmcode/osmium-tool/compare/v2.2.4...HEAD
[
2.2.4
]:
https://github.com/osmcode/osmium-tool/compare/v2.2.3...v2.2.4
[
2.2.3
]:
https://github.com/osmcode/osmium-tool/compare/v2.2.2...v2.2.3
[
2.2.2
]:
https://github.com/osmcode/osmium-tool/compare/v2.2.1...v2.2.2
[
2.2.1
]:
https://github.com/osmcode/osmium-tool/compare/v2.2.0...v2.2.1
...
...
CMakeLists.txt
View file @
434efa28
...
...
@@ -20,7 +20,7 @@ project(osmcoastline)
set
(
OSMCOASTLINE_VERSION_MAJOR 2
)
set
(
OSMCOASTLINE_VERSION_MINOR 2
)
set
(
OSMCOASTLINE_VERSION_PATCH
3
)
set
(
OSMCOASTLINE_VERSION_PATCH
4
)
set
(
OSMCOASTLINE_VERSION
${
OSMCOASTLINE_VERSION_MAJOR
}
.
${
OSMCOASTLINE_VERSION_MINOR
}
.
${
OSMCOASTLINE_VERSION_PATCH
}
)
...
...
@@ -138,7 +138,7 @@ set(CMAKE_BUILD_TYPE ${build_type}
#
#-----------------------------------------------------------------------------
message
(
STATUS
"Looking for clang-tidy"
)
find_program
(
CLANG_TIDY NAMES clang-tidy 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
}
"
)
...
...
debian/changelog
View file @
434efa28
osmcoastline (2.2.4-1) unstable; urgency=medium
* New upstream release.
-- Bas Couwenberg <sebastic@debian.org> Wed, 27 Feb 2019 17:56:26 +0100
osmcoastline (2.2.3-1) unstable; urgency=medium
* New upstream release.
...
...
src/coastline_ring.cpp
View file @
434efa28
...
...
@@ -98,7 +98,7 @@ void CoastlineRing::close_antarctica_ring(int epsg) {
const
double
min
=
epsg
==
4326
?
-
90.0
:
-
85.0511288
;
for
(
int
lat
=
-
78
;
lat
>
int
(
min
);
--
lat
)
{
m_way_node_list
.
emplace_back
(
0
,
osmium
::
Location
{
-
1
79.99999
,
double
(
lat
)});
m_way_node_list
.
emplace_back
(
0
,
osmium
::
Location
{
-
1
80.0
,
double
(
lat
)});
}
for
(
int
lon
=
-
180
;
lon
<
180
;
++
lon
)
{
...
...
@@ -106,11 +106,11 @@ void CoastlineRing::close_antarctica_ring(int epsg) {
}
if
(
epsg
==
3857
)
{
m_way_node_list
.
emplace_back
(
0
,
osmium
::
Location
{
1
79.99999
,
min
});
m_way_node_list
.
emplace_back
(
0
,
osmium
::
Location
{
1
80.0
,
min
});
}
for
(
auto
lat
=
static_cast
<
int
>
(
min
);
lat
<
-
78
;
++
lat
)
{
m_way_node_list
.
emplace_back
(
0
,
osmium
::
Location
{
1
79.99999
,
double
(
lat
)});
m_way_node_list
.
emplace_back
(
0
,
osmium
::
Location
{
1
80.0
,
double
(
lat
)});
}
m_way_node_list
.
push_back
(
m_way_node_list
.
front
());
...
...
src/osmcoastline_filter.cpp
View file @
434efa28
...
...
@@ -96,11 +96,6 @@ int main(int argc, char* argv[]) {
}
}
// The vout object is an output stream we can write to instead of
// std::cerr. Nothing is written if we are not in verbose mode.
// The running time will be prepended to output lines.
osmium
::
util
::
VerboseOutput
vout
{
verbose
};
if
(
output_filename
.
empty
())
{
std
::
cerr
<<
"Missing -o/--output=OSMFILE option
\n
"
;
std
::
exit
(
return_code_cmdline
);
...
...
@@ -111,6 +106,12 @@ int main(int argc, char* argv[]) {
std
::
exit
(
return_code_cmdline
);
}
try
{
// The vout object is an output stream we can write to instead of
// std::cerr. Nothing is written if we are not in verbose mode.
// The running time will be prepended to output lines.
osmium
::
util
::
VerboseOutput
vout
{
verbose
};
osmium
::
io
::
Header
header
;
header
.
set
(
"generator"
,
std
::
string
{
"osmcoastline_filter/"
}
+
get_osmcoastline_version
());
header
.
add_box
(
osmium
::
Box
{
-
180.0
,
-
90.0
,
180.0
,
90.0
});
...
...
@@ -119,7 +120,6 @@ int main(int argc, char* argv[]) {
vout
<<
"Started osmcoastline_filter "
<<
get_osmcoastline_long_version
()
<<
" / "
<<
get_libosmium_version
()
<<
'\n'
;
try
{
osmium
::
io
::
Writer
writer
{
output_filename
,
header
};
auto
output_it
=
osmium
::
io
::
make_output_iterator
(
writer
);
...
...
@@ -169,10 +169,6 @@ int main(int argc, char* argv[]) {
}
writer
.
close
();
}
catch
(
const
osmium
::
io_error
&
e
)
{
std
::
cerr
<<
"io error: "
<<
e
.
what
()
<<
"'
\n
"
;
std
::
exit
(
return_code_fatal
);
}
vout
<<
"All done.
\n
"
;
osmium
::
MemoryUsage
mem
;
...
...
@@ -180,5 +176,9 @@ int main(int argc, char* argv[]) {
vout
<<
"Memory used: current: "
<<
mem
.
current
()
<<
" MBytes
\n
"
<<
" peak: "
<<
mem
.
peak
()
<<
" MBytes
\n
"
;
}
}
catch
(
const
std
::
exception
&
e
)
{
std
::
cerr
<<
e
.
what
()
<<
'\n'
;
std
::
exit
(
return_code_fatal
);
}
}
src/osmcoastline_segments.cpp
View file @
434efa28
...
...
@@ -162,10 +162,10 @@ int main(int argc, char *argv[]) {
std
::
exit
(
return_code_cmdline
);
}
try
{
segvec
removed_segments
;
segvec
added_segments
;
try
{
InputFile
file1
{
argv
[
optind
]};
InputFile
file2
{
argv
[
optind
+
1
]};
...
...
@@ -174,10 +174,6 @@ int main(int argc, char *argv[]) {
std
::
set_difference
(
m1
.
cbegin
(),
m1
.
cend
(),
m2
.
cbegin
(),
m2
.
cend
(),
std
::
back_inserter
(
removed_segments
));
std
::
set_difference
(
m2
.
cbegin
(),
m2
.
cend
(),
m1
.
cbegin
(),
m1
.
cend
(),
std
::
back_inserter
(
added_segments
));
}
catch
(
const
std
::
runtime_error
&
e
)
{
std
::
cerr
<<
e
.
what
()
<<
"
\n
"
;
std
::
exit
(
return_code_fatal
);
}
if
(
dump
)
{
std
::
cout
<<
"Removed:
\n
"
;
...
...
@@ -194,5 +190,9 @@ int main(int argc, char *argv[]) {
}
return
(
removed_segments
.
empty
()
&&
added_segments
.
empty
())
?
0
:
1
;
}
catch
(
const
std
::
exception
&
e
)
{
std
::
cerr
<<
e
.
what
()
<<
'\n'
;
std
::
exit
(
return_code_fatal
);
}
}
src/osmcoastline_ways.cpp
View file @
434efa28
...
...
@@ -129,6 +129,7 @@ int main(int argc, char* argv[]) {
CPLSetConfigOption
(
"OGR_SQLITE_SYNCHRONOUS"
,
"OFF"
);
try
{
const
std
::
string
input_osm_filename
{
argv
[
1
]};
std
::
string
output_db_filename
{
"coastline-ways.db"
};
...
...
@@ -151,5 +152,9 @@ int main(int argc, char* argv[]) {
reader2
.
close
();
std
::
cerr
<<
"Sum of way lengths: "
<<
std
::
fixed
<<
(
coastline_ways_handler
.
sum_length
()
/
1000
)
<<
"km
\n
"
;
}
catch
(
const
std
::
exception
&
e
)
{
std
::
cerr
<<
e
.
what
()
<<
'\n'
;
std
::
exit
(
return_code_fatal
);
}
}