Commit 5bde67e5 authored by Bas Couwenberg's avatar Bas Couwenberg

Merge tag 'debian/2.2.3-1' into stretch-backports

parents d347ab43 649f6f27
......@@ -13,6 +13,21 @@ This project adheres to [Semantic Versioning](https://semver.org/).
### Fixed
## [2.2.3] - 2018-02-06
### Fixed
- Compile with `NDEBUG` in `RelWithDebInfo` mode.
- Better error reporting on some exceptions.
## [2.2.2] - 2018-02-03
### Fixed
- Make `--output-lines` work even if `--output-polygons` is set to `none`.
## [2.2.1] - 2018-12-07
### Added
......@@ -133,7 +148,10 @@ This project adheres to [Semantic Versioning](https://semver.org/).
- Added man pages
[unreleased]: https://github.com/osmcode/osmium-tool/compare/v2.2.0...HEAD
[unreleased]: https://github.com/osmcode/osmium-tool/compare/v2.2.3...HEAD
[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
[2.2.0]: https://github.com/osmcode/osmium-tool/compare/v2.1.4...v2.2.0
[2.1.4]: https://github.com/osmcode/osmium-tool/compare/v2.1.3...v2.1.4
[2.1.3]: https://github.com/osmcode/osmium-tool/compare/v2.1.2...v2.1.3
......
......@@ -20,7 +20,7 @@ project(osmcoastline)
set(OSMCOASTLINE_VERSION_MAJOR 2)
set(OSMCOASTLINE_VERSION_MINOR 2)
set(OSMCOASTLINE_VERSION_PATCH 1)
set(OSMCOASTLINE_VERSION_PATCH 3)
set(OSMCOASTLINE_VERSION
${OSMCOASTLINE_VERSION_MAJOR}.${OSMCOASTLINE_VERSION_MINOR}.${OSMCOASTLINE_VERSION_PATCH})
......@@ -75,9 +75,11 @@ endif()
#
#-----------------------------------------------------------------------------
if(MSVC)
set(USUAL_COMPILE_OPTIONS "/Ox")
set(DEV_COMPILE_OPTIONS "/Ox")
set(RWD_COMPILE_OPTIONS "/Ox /DNDEBUG")
else()
set(USUAL_COMPILE_OPTIONS "-O3 -g")
set(DEV_COMPILE_OPTIONS "-O3 -g")
set(RWD_COMPILE_OPTIONS "-O3 -g -DNDEBUG")
endif()
if(WIN32)
......@@ -85,7 +87,7 @@ if(WIN32)
-DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0600)
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)
......@@ -97,7 +99,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)
......
......@@ -263,16 +263,16 @@ coastline that can remain open. The coastline starts somewhere around 180°
East, 77° South and ends around 180° West and 77° South. OSMCoastline will find
those open ends and connect them by adding several "nodes" forming a proper
polygon. Depending on the output projection (EPSG:4326 or EPSG:3857) this
polygon will either go to the South Pole or to the 85.0511° line.
polygon will either extend to the South Pole or to the 85.0511° line.
## Filtering
The program `osmcoastline_filter` can be used to filter from an OSM planet file
all nodes and ways needed for building the coastlines and writing them out in
OSM format. This file will be a lot smaller (less than 1%) than the original
planet file, but it contains everything needed to assemble the coastline
polygons.
all nodes and ways needed for building the coastlines and write them out in
OSM format. The resulting file will be a lot smaller (less than 1%) than the
original planet file, but it contains everything needed to assemble the
coastline polygons.
If you are playing around or want to run `osmcoastline` several times with
different parameters, run `osmcoastline_filter` once first and use its output
......
OSMCoastline TODO
=================
* write out statistics to meta table
* make fixing of direction optional?
* only when there are no warnings?
* determine best defaults for bbox overlap, max-points and close distance
* Magic number 100 in split_bbox?
osmcoastline (2.2.3-1) unstable; urgency=medium
* New upstream release.
* Add -DCMAKE_BUILD_TYPE=RelWithDebInfo CMake option.
* Drop unused lintian overrides.
-- Bas Couwenberg <sebastic@debian.org> Wed, 06 Feb 2019 16:34:36 +0100
osmcoastline (2.2.2-1) unstable; urgency=medium
* New upstream release.
* Bump Standards-Version to 4.3.0, no changes.
* Update copyright years for Jochen Topf.
* Add lintian override for file-references-package-build-path.
-- Bas Couwenberg <sebastic@debian.org> Sun, 03 Feb 2019 19:30:14 +0100
osmcoastline (2.2.1-1~bpo9+1) stretch-backports; urgency=medium
* Rebuild for stretch-backports.
......
......@@ -16,7 +16,7 @@ Build-Depends: debhelper (>= 9),
spatialite-bin,
sqlite3,
zlib1g-dev
Standards-Version: 4.2.1
Standards-Version: 4.3.0
Vcs-Browser: https://salsa.debian.org/debian-gis-team/osmcoastline
Vcs-Git: https://salsa.debian.org/debian-gis-team/osmcoastline.git -b stretch-backports
Homepage: https://osmcode.org/osmcoastline/
......
......@@ -4,7 +4,7 @@ Upstream-Contact: Osmium Developers (https://osmcode.org/contact)
Source: https://github.com/osmcode/osmcoastline
Files: *
Copyright: 2012-2018, Jochen Topf <jochen@topf.org>
Copyright: 2012-2019, Jochen Topf <jochen@topf.org>
License: GPL-3+
Files: debian/*
......
# Build uses -D_FORTIFY_SOURCE=2, but hardening-check reports:
# Fortify Source functions: no, only unprotected functions found!
osmcoastline: hardening-no-fortify-functions *
......@@ -10,7 +10,7 @@ export DEB_BUILD_MAINT_OPTIONS=hardening=+all
--parallel
override_dh_auto_configure:
dh_auto_configure -- -DCMAKE_VERBOSE_MAKEFILE=1
dh_auto_configure -- -DCMAKE_VERBOSE_MAKEFILE=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo
override_dh_auto_test:
dh_auto_test
......
......@@ -15,7 +15,7 @@ $endfor$
$if(author)$
.SH COPYRIGHT
.PP
Copyright (C) 2012\-2018 Jochen Topf <jochen@topf.org>.
Copyright (C) 2012\-2019 Jochen Topf <jochen@topf.org>.
License GPLv3+: GNU GPL version 3 or later
<https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
......
......@@ -14,7 +14,7 @@ fi
if [ "x$1" = "x--version" -o "x$1" = "x-V" ]; then
echo "osmcoastline_readmeta version $OSMCOASTLINE_VERSION"
echo "Copyright (C) 2012-2018 Jochen Topf <jochen@topf.org>"
echo "Copyright (C) 2012-2019 Jochen Topf <jochen@topf.org>"
echo "License: GNU GENERAL PUBLIC LICENSE Version 3 <https://gnu.org/licenses/gpl.html>."
echo "This is free software: you are free to change and redistribute it."
echo "There is NO WARRANTY, to the extent permitted by law.";
......
/*
Copyright 2012-2018 Jochen Topf <jochen@topf.org>.
Copyright 2012-2019 Jochen Topf <jochen@topf.org>.
This file is part of OSMCoastline.
......
......@@ -3,7 +3,7 @@
/*
Copyright 2012-2018 Jochen Topf <jochen@topf.org>.
Copyright 2012-2019 Jochen Topf <jochen@topf.org>.
This file is part of OSMCoastline.
......
/*
Copyright 2012-2018 Jochen Topf <jochen@topf.org>.
Copyright 2012-2019 Jochen Topf <jochen@topf.org>.
This file is part of OSMCoastline.
......
......@@ -3,7 +3,7 @@
/*
Copyright 2012-2018 Jochen Topf <jochen@topf.org>.
Copyright 2012-2019 Jochen Topf <jochen@topf.org>.
This file is part of OSMCoastline.
......
/*
Copyright 2012-2018 Jochen Topf <jochen@topf.org>.
Copyright 2012-2019 Jochen Topf <jochen@topf.org>.
This file is part of OSMCoastline.
......
......@@ -3,7 +3,7 @@
/*
Copyright 2012-2018 Jochen Topf <jochen@topf.org>.
Copyright 2012-2019 Jochen Topf <jochen@topf.org>.
This file is part of OSMCoastline.
......
/*
Copyright 2012-2018 Jochen Topf <jochen@topf.org>.
Copyright 2012-2019 Jochen Topf <jochen@topf.org>.
This file is part of OSMCoastline.
......
/*
Copyright 2012-2018 Jochen Topf <jochen@topf.org>.
Copyright 2012-2019 Jochen Topf <jochen@topf.org>.
This file is part of OSMCoastline.
......@@ -122,7 +122,7 @@ Options::Options(int argc, char* argv[]) {
break;
case 'V':
std::cout << "osmcoastline " << get_osmcoastline_long_version() << " / " << get_libosmium_version() << '\n'
<< "Copyright (C) 2012-2018 Jochen Topf <jochen@topf.org>\n"
<< "Copyright (C) 2012-2019 Jochen Topf <jochen@topf.org>\n"
<< "License: GNU GENERAL PUBLIC LICENSE Version 3 <https://gnu.org/licenses/gpl.html>.\n"
<< "This is free software: you are free to change and redistribute it.\n"
<< "There is NO WARRANTY, to the extent permitted by law.\n";
......
......@@ -3,7 +3,7 @@
/*
Copyright 2012-2018 Jochen Topf <jochen@topf.org>.
Copyright 2012-2019 Jochen Topf <jochen@topf.org>.
This file is part of OSMCoastline.
......
/*
Copyright 2012-2018 Jochen Topf <jochen@topf.org>.
Copyright 2012-2019 Jochen Topf <jochen@topf.org>.
This file is part of OSMCoastline.
......@@ -153,6 +153,15 @@ std::string memory_usage() {
/* ================================================== */
std::unique_ptr<OutputDatabase> open_output_database(const std::string& name, const bool create_index) try {
return std::unique_ptr<OutputDatabase>{new OutputDatabase{name, srs, create_index}};
} catch (const std::exception& e) {
std::cerr << e.what() << '\n';
std::exit(return_code_fatal);
}
/* ================================================== */
int main(int argc, char *argv[]) {
Stats stats{};
unsigned int warnings = 0;
......@@ -201,7 +210,8 @@ int main(int argc, char *argv[]) {
} else {
vout << "Will NOT create geometry index (because you told me to using --no-index/-i).\n";
}
OutputDatabase output_database{options.output_database, srs, options.create_index};
auto output_database = open_output_database(options.output_database, options.create_index);
// The collection of all coastline rings we will be filling and then
// operating on.
......@@ -253,7 +263,7 @@ int main(int argc, char *argv[]) {
for (const auto& node : buffer.select<osmium::Node>()) {
if (node.tags().has_tag("natural", "coastline")) {
try {
output_database.add_error_point(factory.create_point(node), "tagged_node", node.id());
output_database->add_error_point(factory.create_point(node), "tagged_node", node.id());
} catch (const osmium::geometry_error&) {
std::cerr << "Ignoring illegal geometry for node " << node.id() << ".\n";
}
......@@ -267,7 +277,7 @@ int main(int argc, char *argv[]) {
}
reader2.close();
} catch (const std::exception& e) {
vout << e.what() << '\n';
std::cerr << e.what() << '\n';
std::exit(return_code_fatal);
}
......@@ -282,10 +292,10 @@ int main(int argc, char *argv[]) {
vout << memory_usage();
output_database.set_options(options);
output_database->set_options(options);
vout << "Check line segments for intersections and overlaps...\n";
warnings += coastline_rings.check_for_intersections(output_database, segments_fd);
warnings += coastline_rings.check_for_intersections(*output_database, segments_fd);
if (segments_fd != -1) {
::close(segments_fd);
......@@ -301,7 +311,7 @@ int main(int argc, char *argv[]) {
if (options.close_rings) {
vout << "Close broken rings... (Use --close-distance/-c 0 if you do not want this.)\n";
vout << " Closing if distance between nodes smaller than " << options.close_distance << ". (Set this with --close-distance/-c.)\n";
coastline_rings.close_rings(output_database, options.debug, options.close_distance);
coastline_rings.close_rings(*output_database, options.debug, options.close_distance);
stats.rings_fixed = coastline_rings.num_fixed_rings();
errors += coastline_rings.num_fixed_rings();
vout << " Closed " << coastline_rings.num_fixed_rings() << " rings. This left "
......@@ -313,16 +323,16 @@ int main(int argc, char *argv[]) {
if (options.output_rings) {
vout << "Writing out rings... (Because you gave the --output-rings/-r option.)\n";
warnings += coastline_rings.output_rings(output_database);
warnings += coastline_rings.output_rings(*output_database);
} else {
vout << "Not writing out rings. (Use option --output-rings/-r if you want the rings.)\n";
}
if (options.output_polygons != output_polygon_type::none) {
if (options.output_polygons != output_polygon_type::none || options.output_lines) {
try {
vout << "Create polygons...\n";
CoastlinePolygons coastline_polygons{create_polygons(coastline_rings, output_database, &warnings, &errors), \
output_database, \
CoastlinePolygons coastline_polygons{create_polygons(coastline_rings, *output_database, &warnings, &errors), \
*output_database, \
options.bbox_overlap, \
options.max_points_in_polygon};
......@@ -345,48 +355,50 @@ int main(int argc, char *argv[]) {
vout << "Not writing coastlines as lines (Use --output-lines/-l if you want this).\n";
}
if (options.epsg == 4326) {
vout << "Checking for questionable input data...\n";
const unsigned int questionable = coastline_rings.output_questionable(coastline_polygons, output_database);
warnings += questionable;
vout << " Found " << questionable << " rings in input data.\n";
} else {
vout << "Not performing check for questionable input data, because it only works in EPSG:4326...\n";
}
if (options.output_polygons != output_polygon_type::none) {
if (options.epsg == 4326) {
vout << "Checking for questionable input data...\n";
const unsigned int questionable = coastline_rings.output_questionable(coastline_polygons, *output_database);
warnings += questionable;
vout << " Found " << questionable << " rings in input data.\n";
} else {
vout << "Not performing check for questionable input data, because it only works in EPSG:4326...\n";
}
if (options.split_large_polygons) {
vout << "Split polygons with more than " << options.max_points_in_polygon << " points... (Use --max-points/-m to change this. Set to 0 not to split at all.)\n";
vout << " Using overlap of " << options.bbox_overlap << " (Set this with --bbox-overlap/-b).\n";
coastline_polygons.split();
stats.land_polygons_after_split = coastline_polygons.num_polygons();
}
if (options.split_large_polygons) {
vout << "Split polygons with more than " << options.max_points_in_polygon << " points... (Use --max-points/-m to change this. Set to 0 not to split at all.)\n";
vout << " Using overlap of " << options.bbox_overlap << " (Set this with --bbox-overlap/-b).\n";
coastline_polygons.split();
stats.land_polygons_after_split = coastline_polygons.num_polygons();
}
vout << "Checking and making polygons valid...\n";
warnings += coastline_polygons.check_polygons();
vout << "Checking and making polygons valid...\n";
warnings += coastline_polygons.check_polygons();
if (options.output_polygons == output_polygon_type::land ||
options.output_polygons == output_polygon_type::both) {
vout << "Writing out land polygons...\n";
coastline_polygons.output_land_polygons(options.output_polygons == output_polygon_type::both);
}
if (options.output_polygons == output_polygon_type::water ||
options.output_polygons == output_polygon_type::both) {
vout << "Writing out water polygons...\n";
coastline_polygons.output_water_polygons();
if (options.output_polygons == output_polygon_type::land ||
options.output_polygons == output_polygon_type::both) {
vout << "Writing out land polygons...\n";
coastline_polygons.output_land_polygons(options.output_polygons == output_polygon_type::both);
}
if (options.output_polygons == output_polygon_type::water ||
options.output_polygons == output_polygon_type::both) {
vout << "Writing out water polygons...\n";
coastline_polygons.output_water_polygons();
}
}
} catch (const std::runtime_error& e) {
vout << e.what() << '\n';
++errors;
}
} else {
vout << "Not creating polygons (Because you set the --no-polygons/-p option).\n";
vout << "Not creating polygons (Because you used the --output-polygons=none option).\n";
}
vout << memory_usage();
vout << "Committing database transactions...\n";
output_database.set_meta(vout.runtime(), osmium::MemoryUsage{}.peak(), stats);
output_database.commit();
output_database->set_meta(vout.runtime(), osmium::MemoryUsage{}.peak(), stats);
output_database->commit();
vout << "All done.\n";
vout << memory_usage();
......
/*
Copyright 2012-2018 Jochen Topf <jochen@topf.org>.
Copyright 2012-2019 Jochen Topf <jochen@topf.org>.
This file is part of OSMCoastline.
......@@ -86,7 +86,7 @@ int main(int argc, char* argv[]) {
break;
case 'V':
std::cout << "osmcoastline_filter " << get_osmcoastline_long_version() << " / " << get_libosmium_version() << '\n'
<< "Copyright (C) 2012-2018 Jochen Topf <jochen@topf.org>\n"
<< "Copyright (C) 2012-2019 Jochen Topf <jochen@topf.org>\n"
<< "License: GNU GENERAL PUBLIC LICENSE Version 3 <https://gnu.org/licenses/gpl.html>.\n"
<< "This is free software: you are free to change and redistribute it.\n"
<< "There is NO WARRANTY, to the extent permitted by law.\n";
......
/*
Copyright 2012-2018 Jochen Topf <jochen@topf.org>.
Copyright 2012-2019 Jochen Topf <jochen@topf.org>.
This file is part of OSMCoastline.
......@@ -147,7 +147,7 @@ int main(int argc, char *argv[]) {
}
case 'V':
std::cout << "osmcoastline_segments " << get_osmcoastline_long_version() << " / " << get_libosmium_version() << '\n'
<< "Copyright (C) 2012-2018 Jochen Topf <jochen@topf.org>\n"
<< "Copyright (C) 2012-2019 Jochen Topf <jochen@topf.org>\n"
<< "License: GNU GENERAL PUBLIC LICENSE Version 3 <https://gnu.org/licenses/gpl.html>.\n"
<< "This is free software: you are free to change and redistribute it.\n"
<< "There is NO WARRANTY, to the extent permitted by law.\n";
......
/*
Copyright 2012-2018 Jochen Topf <jochen@topf.org>.
Copyright 2012-2019 Jochen Topf <jochen@topf.org>.
This file is part of OSMCoastline.
......@@ -114,7 +114,7 @@ int main(int argc, char* argv[]) {
if (!std::strcmp(argv[1], "--version") || !std::strcmp(argv[1], "-V")) {
std::cout << "osmcoastline_ways " << get_osmcoastline_long_version() << " / " << get_libosmium_version() << '\n'
<< "Copyright (C) 2012-2018 Jochen Topf <jochen@topf.org>\n"
<< "Copyright (C) 2012-2019 Jochen Topf <jochen@topf.org>\n"
<< "License: GNU GENERAL PUBLIC LICENSE Version 3 <https://gnu.org/licenses/gpl.html>.\n"
<< "This is free software: you are free to change and redistribute it.\n"
<< "There is NO WARRANTY, to the extent permitted by law.\n";
......
/*
Copyright 2012-2018 Jochen Topf <jochen@topf.org>.
Copyright 2012-2019 Jochen Topf <jochen@topf.org>.
This file is part of OSMCoastline.
......
......@@ -3,7 +3,7 @@
/*
Copyright 2012-2018 Jochen Topf <jochen@topf.org>.
Copyright 2012-2019 Jochen Topf <jochen@topf.org>.
This file is part of OSMCoastline.
......
......@@ -3,7 +3,7 @@
/*
Copyright 2012-2018 Jochen Topf <jochen@topf.org>.
Copyright 2012-2019 Jochen Topf <jochen@topf.org>.
This file is part of OSMCoastline.
......
/*
Copyright 2012-2018 Jochen Topf <jochen@topf.org>.
Copyright 2012-2019 Jochen Topf <jochen@topf.org>.
This file is part of OSMCoastline.
......
......@@ -3,7 +3,7 @@
/*
Copyright 2012-2018 Jochen Topf <jochen@topf.org>.
Copyright 2012-2019 Jochen Topf <jochen@topf.org>.
This file is part of OSMCoastline.
......
......@@ -3,7 +3,7 @@
/*
Copyright 2012-2018 Jochen Topf <jochen@topf.org>.
Copyright 2012-2019 Jochen Topf <jochen@topf.org>.
This file is part of OSMCoastline.
......
......@@ -3,7 +3,7 @@
/*
Copyright 2012-2018 Jochen Topf <jochen@topf.org>.
Copyright 2012-2019 Jochen Topf <jochen@topf.org>.
This file is part of OSMCoastline.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment