Skip to content
Commits on Source (6)
---
Checks: '*,-android-cloexec-*,-cert-err58-cpp,-cert-err60-cpp,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-static-cast-downcast,-cppcoreguidelines-pro-type-vararg,-fuchsia-*,-google-runtime-references,-hicpp-no-array-decay,-hicpp-vararg,-modernize-make-unique,-readability-implicit-bool-cast,-readability-implicit-bool-conversion'
#
# For a list of check options, see:
# http://clang.llvm.org/extra/clang-tidy/checks/list.html
#
# Disabled checks:
#
# android-cloexec-*
# O_CLOEXEC isn't available on Windows making this non-portable.
#
# cert-err58-cpp
# Rather unlikely that this is a problem.
#
# cert-err60-cpp
# Reports exceptions from standard library as broken.
#
# cppcoreguidelines-pro-bounds-array-to-pointer-decay
# Limited use and many false positives including for all asserts.
#
# cppcoreguidelines-pro-bounds-pointer-arithmetic
# Difficult to get by without it...
#
# cppcoreguidelines-pro-type-static-cast-downcast
# This is needed and totally okay if we are sure about the types.
#
# cppcoreguidelines-pro-type-vararg
# We need some of these functions at least and for some functions it isn't
# even clear that those are vararg functions.
#
# fuchsia-*
# Much too strict.
#
# google-runtime-references
# This is just a matter of preference.
#
# hicpp-no-array-decay
# Alias for cppcoreguidelines-pro-bounds-array-to-pointer-decay.
#
# hicpp-vararg
# Too strict, sometimes calling vararg functions is necessary.
#
# modernize-make-unique
# This is a C++11 program and C++ doesn't have std::make_unique.
#
# readability-implicit-bool-cast
# Old name for readability-implicit-bool-conversion.
#
# readability-implicit-bool-conversion
# I don't think this makes the code more readable.
#
WarningsAsErrors: '*'
...
......@@ -8,45 +8,80 @@ language: generic
sudo: false
dist: trusty
#-----------------------------------------------------------------------------
matrix:
include:
# 1/ Linux Clang Builds
- os: linux
compiler: linux-clang38-release
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['clang-3.8', 'pandoc', 'libgdal1-dev', 'libgeos-dev', 'sqlite3']
env: CXX='clang++-3.8' BUILD_TYPE='Release'
- os: linux
compiler: linux-clang38-dev
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['clang-3.8', 'pandoc', 'libgdal1-dev', 'libgeos-dev', 'sqlite3']
env: CXX='clang++-3.8' BUILD_TYPE='Dev'
- os: linux
compiler: linux-clang36-release
compiler: linux-clang39-release
addons:
apt:
sources: ['llvm-toolchain-precise-3.6', 'ubuntu-toolchain-r-test', 'boost-latest']
packages: ['clang-3.6', 'libboost1.55-all-dev', 'pandoc', 'libgdal1-dev', 'libgeos-dev', 'sqlite3']
env: COMPILER='clang++-3.6' BUILD_TYPE='Release'
sources: ['ubuntu-toolchain-r-test']
packages: ['clang-3.9', 'pandoc', 'libgdal1-dev', 'libgeos-dev', 'sqlite3']
env: CXX='clang++-3.9' BUILD_TYPE='Release'
- os: linux
compiler: linux-clang37-dev
compiler: linux-clang39-dev
addons:
apt:
sources: ['llvm-toolchain-precise-3.6', 'ubuntu-toolchain-r-test', 'boost-latest']
packages: ['clang-3.6', 'libboost1.55-all-dev', 'pandoc', 'libgdal1-dev', 'libgeos-dev', 'sqlite3']
env: COMPILER='clang++-3.6' BUILD_TYPE='Dev'
sources: ['ubuntu-toolchain-r-test']
packages: ['clang-3.9', 'pandoc', 'libgdal1-dev', 'libgeos-dev', 'sqlite3']
env: CXX='clang++-3.9' BUILD_TYPE='Dev'
- os: linux
compiler: linux-clang38-release
compiler: linux-clang40-release
addons:
apt:
sources: ['llvm-toolchain-precise-3.8', 'ubuntu-toolchain-r-test', 'boost-latest']
packages: ['clang-3.8', 'libboost1.55-all-dev', 'pandoc', 'libgdal1-dev', 'libgeos-dev', 'sqlite3']
env: COMPILER='clang++-3.8' BUILD_TYPE='Release'
sources: ['llvm-toolchain-trusty-4.0', 'ubuntu-toolchain-r-test']
packages: ['clang-4.0', 'pandoc', 'libgdal1-dev', 'libgeos-dev', 'sqlite3']
env: CXX='clang++-4.0' BUILD_TYPE='Release'
- os: linux
compiler: linux-clang38-dev
compiler: linux-clang40-dev
addons:
apt:
sources: ['llvm-toolchain-trusty-4.0', 'ubuntu-toolchain-r-test']
packages: ['clang-4.0', 'pandoc', 'libgdal1-dev', 'libgeos-dev', 'sqlite3']
env: CXX='clang++-4.0' BUILD_TYPE='Dev'
- os: linux
compiler: linux-clang50-release
addons:
apt:
sources: ['llvm-toolchain-precise-3.8', 'ubuntu-toolchain-r-test', 'boost-latest']
packages: ['clang-3.8', 'libboost1.55-all-dev', 'pandoc', 'libgdal1-dev', 'libgeos-dev', 'sqlite3']
env: COMPILER='clang++-3.8' BUILD_TYPE='Dev'
sources: ['llvm-toolchain-trusty-5.0', 'ubuntu-toolchain-r-test']
packages: ['clang-5.0', 'pandoc', 'libgdal1-dev', 'libgeos-dev', 'sqlite3']
env: CXX='clang++-5.0' BUILD_TYPE='Release'
- os: linux
compiler: linux-clang50-dev
addons:
apt:
sources: ['llvm-toolchain-trusty-5.0', 'ubuntu-toolchain-r-test']
packages: ['clang-5.0', 'pandoc', 'libgdal1-dev', 'libgeos-dev', 'sqlite3', 'clang-tidy-5.0']
env: CXX='clang++-5.0' BUILD_TYPE='Dev' CLANG_TIDY=clang-tidy-5.0
# 2/ Linux GCC Builds
......@@ -54,91 +89,121 @@ matrix:
compiler: linux-gcc48-release
addons:
apt:
sources: ['ubuntu-toolchain-r-test', 'boost-latest']
packages: ['g++-4.8', 'libboost1.55-all-dev', 'pandoc', 'libgdal1-dev', 'libgeos-dev', 'sqlite3']
env: COMPILER='g++-4.8' COMPILER_FLAGS='-Wno-return-type' BUILD_TYPE='Release'
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-4.8', 'pandoc', 'libgdal1-dev', 'libgeos-dev', 'sqlite3']
env: CXX='g++-4.8' CXXFLAGS='-Wno-return-type' BUILD_TYPE='Release'
- os: linux
compiler: linux-gcc48-dev
addons:
apt:
sources: ['ubuntu-toolchain-r-test', 'boost-latest']
packages: ['g++-4.8', 'libboost1.55-all-dev', 'pandoc', 'libgdal1-dev', 'libgeos-dev', 'sqlite3']
env: COMPILER='g++-4.8' COMPILER_FLAGS='-Wno-return-type' BUILD_TYPE='Dev'
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-4.8', 'pandoc', 'libgdal1-dev', 'libgeos-dev', 'sqlite3']
env: CXX='g++-4.8' CXXFLAGS='-Wno-return-type' BUILD_TYPE='Dev'
- os: linux
compiler: linux-gcc49-release
addons:
apt:
sources: ['ubuntu-toolchain-r-test', 'boost-latest']
packages: ['g++-4.9', 'libboost1.55-all-dev', 'pandoc', 'libgdal1-dev', 'libgeos-dev', 'sqlite3']
env: COMPILER='g++-4.9' BUILD_TYPE='Release'
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-4.9', 'pandoc', 'libgdal1-dev', 'libgeos-dev', 'sqlite3']
env: CXX='g++-4.9' BUILD_TYPE='Release'
- os: linux
compiler: linux-gcc49-dev
addons:
apt:
sources: ['ubuntu-toolchain-r-test', 'boost-latest']
packages: ['g++-4.9', 'libboost1.55-all-dev', 'pandoc', 'libgdal1-dev', 'libgeos-dev', 'sqlite3']
env: COMPILER='g++-4.9' BUILD_TYPE='Dev'
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-4.9', 'pandoc', 'libgdal1-dev', 'libgeos-dev', 'sqlite3']
env: CXX='g++-4.9' BUILD_TYPE='Dev'
- os: linux
compiler: linux-gcc5-release
addons:
apt:
sources: ['ubuntu-toolchain-r-test', 'boost-latest']
packages: ['g++-5', 'libboost1.55-all-dev', 'pandoc', 'libgdal1-dev', 'libgeos-dev', 'sqlite3']
env: COMPILER='g++-5' BUILD_TYPE='Release'
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-5', 'pandoc', 'libgdal1-dev', 'libgeos-dev', 'sqlite3']
env: CXX='g++-5' BUILD_TYPE='Release'
- os: linux
compiler: linux-gcc5-dev
addons:
apt:
sources: ['ubuntu-toolchain-r-test', 'boost-latest']
packages: ['g++-5', 'libboost1.55-all-dev', 'pandoc', 'libgdal1-dev', 'libgeos-dev', 'sqlite3']
env: COMPILER='g++-5' BUILD_TYPE='Dev'
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-5', 'pandoc', 'libgdal1-dev', 'libgeos-dev', 'sqlite3']
env: CXX='g++-5' BUILD_TYPE='Dev'
- os: linux
compiler: linux-gcc6-release
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-6', 'pandoc', 'libgdal1-dev', 'libgeos-dev', 'sqlite3']
env: CXX='g++-6' BUILD_TYPE='Release'
- os: linux
compiler: linux-gcc6-dev
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-6', 'pandoc', 'libgdal1-dev', 'libgeos-dev', 'sqlite3']
env: CXX='g++-6' BUILD_TYPE='Dev'
# 3/ OSX Clang Builds
- os: osx
osx_image: xcode6.4
compiler: xcode64-clang-release
env: COMPILER='clang++' BUILD_TYPE='Release'
env: CXX='clang++' BUILD_TYPE='Release'
- os: osx
osx_image: xcode6.4
compiler: xcode64-clang-dev
env: COMPILER='clang++' BUILD_TYPE='Dev'
env: CXX='clang++' BUILD_TYPE='Dev'
- os: osx
osx_image: xcode7
compiler: xcode7-clang-release
env: COMPILER='clang++' BUILD_TYPE='Release'
env: CXX='clang++' BUILD_TYPE='Release'
- os: osx
osx_image: xcode7
compiler: xcode7-clang-dev
env: COMPILER='clang++' BUILD_TYPE='Dev'
env: CXX='clang++' BUILD_TYPE='Dev'
- os: osx
osx_image: xcode8.3
compiler: xcode8-clang-release
env: CXX='clang++' BUILD_TYPE='Release'
- os: osx
osx_image: xcode8.3
compiler: xcode8-clang-dev
env: CXX='clang++' BUILD_TYPE='Dev'
#-----------------------------------------------------------------------------
install:
- git clone --quiet --depth 1 https://github.com/osmcode/libosmium.git ../libosmium
- git clone --quiet --depth 1 https://github.com/mapbox/protozero.git ../protozero
- |
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
brew install cmake boost || true
brew install cmake || true
fi
- cmake --version
before_script:
- cd ${TRAVIS_BUILD_DIR}
- mkdir build && cd build
- CXX=${COMPILER} CXXFLAGS=${COMPILER_FLAGS} cmake -LA .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE}
- cmake -LA .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCLANG_TIDY=$(which ${CLANG_TIDY})
script:
- make VERBOSE=1 && ctest --output-on-failure
- if [ -n "${CLANG_TIDY}" ]; then make clang-tidy; fi
#-----------------------------------------------------------------------------
......@@ -2,7 +2,7 @@
# Change Log
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
This project adheres to [Semantic Versioning](https://semver.org/).
## [unreleased] -
......@@ -13,6 +13,35 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Fixed
## [2.2.0] - 2018-09-05
### Added
- Add spatialite scripts for creating grids for splitting.
- CMake config adds `clang-tidy` target.
### Changed
- Use `OGC_FID` instead of `ID` as id column in SQL scripts, that's how OGR
expects it.
- Update to newer Protozero and Libosmium.
- Various small code-cleanup changes.
- Output extended version information on `--verbose` and `--version`.
- Derive exception used from `std::runtime_error`.
- Update to newest gdalcpp.
### Fixed
- Initialize stats with 0.
- `osmcoastline_ways`: Delete the copy and move constructor/assignment because
we have a special destructor.
- Add `-pthread` compiler and linker options.
- Fix undefined behavior that resulted in more or less coastlines reported
as "questionable".
- Lower right corner of Antarctica was being cut off in EPSG:3857.
- Very narrow water polygons were output near the anti-meridian in Antarctica.
## [2.1.4] - 2016-09-16
### Changed
......@@ -88,7 +117,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Added man pages
[unreleased]: https://github.com/osmcode/osmium-tool/compare/v2.1.4...HEAD
[unreleased]: https://github.com/osmcode/osmium-tool/compare/v2.2.0...HEAD
[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
[2.1.2]: https://github.com/osmcode/osmium-tool/compare/v2.1.1...v2.1.2
......
......@@ -19,14 +19,12 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
project(osmcoastline)
set(OSMCOASTLINE_VERSION_MAJOR 2)
set(OSMCOASTLINE_VERSION_MINOR 1)
set(OSMCOASTLINE_VERSION_PATCH 4)
set(OSMCOASTLINE_VERSION_MINOR 2)
set(OSMCOASTLINE_VERSION_PATCH 0)
set(OSMCOASTLINE_VERSION
${OSMCOASTLINE_VERSION_MAJOR}.${OSMCOASTLINE_VERSION_MINOR}.${OSMCOASTLINE_VERSION_PATCH})
add_definitions(-DOSMCOASTLINE_VERSION="${OSMCOASTLINE_VERSION}")
set(AUTHOR "Jochen Topf <jochen@topf.org>")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
......@@ -40,7 +38,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
include_directories(include)
find_package(Osmium COMPONENTS io gdal)
find_package(Osmium 2.13.1 COMPONENTS io gdal)
include_directories(SYSTEM ${OSMIUM_INCLUDE_DIRS})
if(MSVC)
......@@ -132,6 +130,30 @@ set(CMAKE_BUILD_TYPE ${build_type}
FORCE)
#-----------------------------------------------------------------------------
#
# Optional "clang-tidy" target
#
#-----------------------------------------------------------------------------
message(STATUS "Looking for clang-tidy")
find_program(CLANG_TIDY NAMES clang-tidy clang-tidy-6.0 clang-tidy-5.0)
if(CLANG_TIDY)
message(STATUS "Looking for clang-tidy - found ${CLANG_TIDY}")
file(GLOB _all_code src/*.cpp)
add_custom_target(clang-tidy
${CLANG_TIDY}
-p ${CMAKE_BINARY_DIR}
${_all_code}
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/src"
)
else()
message(STATUS "Looking for clang-tidy - not found")
message(STATUS " Build target 'clang-tidy' will not be available.")
endif()
#-----------------------------------------------------------------------------
#
# Optional "cppcheck" target that checks C++ code
......@@ -165,10 +187,10 @@ endif(CPPCHECK)
#-----------------------------------------------------------------------------
#
# Optional "iwyu" target to check headers
# http://include-what-you-use.org/
# https://include-what-you-use.org/
#
#-----------------------------------------------------------------------------
find_program(IWYU_TOOL iwyu_tool.py)
find_program(IWYU_TOOL NAMES iwyu_tool iwyu_tool.py)
if(IWYU_TOOL)
message(STATUS "Looking for iwyu_tool.py - found")
......@@ -236,6 +258,30 @@ else()
endif(PANDOC)
#-----------------------------------------------------------------------------
#
# Version
#
#-----------------------------------------------------------------------------
find_package(Git)
if(GIT_FOUND)
execute_process(COMMAND "${GIT_EXECUTABLE}" describe --tags --dirty=-changed
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
OUTPUT_VARIABLE VERSION_FROM_GIT
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
if(VERSION_FROM_GIT)
set(VERSION_FROM_GIT " (${VERSION_FROM_GIT})")
endif()
endif()
configure_file(
${PROJECT_SOURCE_DIR}/src/version.cpp.in
${PROJECT_BINARY_DIR}/src/version.cpp
)
#-----------------------------------------------------------------------------
find_library(GEOS_C_LIBRARIES NAMES geos_c)
......
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
......@@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
......@@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
<https://www.gnu.org/philosophy/why-not-lgpl.html>.
......@@ -4,40 +4,34 @@
OSMCoastline extracts the coastline data from an OSM planet file and assembles
all the pieces into polygons for use in map renderers etc.
http://wiki.openstreetmap.org/wiki/OSMCoastline
https://wiki.openstreetmap.org/wiki/OSMCoastline
https://github.com/osmcode/osmcoastline
[![Build Status](https://secure.travis-ci.org/osmcode/osmcoastline.svg)](http://travis-ci.org/osmcode/osmcoastline)
[![Build Status](https://secure.travis-ci.org/osmcode/osmcoastline.svg)](https://travis-ci.org/osmcode/osmcoastline)
## Prerequisites
### Libosmium
https://github.com/osmcode/libosmium
http://osmcode.org/libosmium
At least version 2.5.0 is needed.
https://osmcode.org/libosmium
At least version 2.13.1 is needed.
### Protozero
https://github.com/mapbox/protozero
Debian/Ubuntu: protozero
Also included in the libosmium repository.
### Utfcpp
http://utfcpp.sourceforge.net/
Debian/Ubuntu: libutfcpp-dev
Also included in the libosmium repository.
Debian/Ubuntu: libprotozero-dev
At least version 1.6.1 is needed.
### zlib (for PBF support)
http://www.zlib.net/
https://www.zlib.net/
Debian/Ubuntu: zlib1g-dev
### GDAL (for OGR support)
http://gdal.org/
https://gdal.org/
Debian/Ubuntu: libgdal1-dev
(Must be built with Spatialite and GEOS support which is true for
Debian/Ubuntu packages. You need GDAL 1.7.0 or greater, consider using
......@@ -46,17 +40,17 @@ https://github.com/osmcode/osmcoastline
### GEOS
http://trac.osgeo.org/geos/
https://trac.osgeo.org/geos/
Debian/Ubuntu: libgeos-dev
### Sqlite/Spatialite
http://www.gaia-gis.it/gaia-sins/
https://www.gaia-gis.it/fossil/libspatialite/index
Debian/Ubuntu: sqlite3
### Pandoc (optional, to build documentation)
http://johnmacfarlane.net/pandoc/
https://pandoc.org/
Debian/Ubuntu: pandoc
(If pandoc is found by CMake, the manpages will automatically be built.)
......@@ -139,7 +133,7 @@ might contain anything.
`--output-lines` has been given.
By default all output is in WGS84. You can use the option `--srs=3857` to
create output in "Google Mercator". (Other projections are currently not
create output in "Web Mercator". (Other projections are currently not
supported.)
OSMCoastline always creates only this one database. If you need shapefiles
......@@ -152,9 +146,10 @@ larger, but faster to use. You can use the option `--no-index` to suppress
this, for instance if you never use the data directly anyway but want to
transform it into something else.
Coastlines and polygons are never simplified, but contain the full detail.
See `simplify.sql` for a way to simplify polygons. See the `simplify_and_split`
directory for some more ways of doing this.
Coastlines and polygons are never simplified, but contain the full detail. See
the `simplify_and_split_spatialite` or the `simplify_and_split_postgis`
directories for scripts that help with simplifying and splitting geometries
using Spatialite or PostGIS, respectively.
The database tables `options` and `meta` contain the command line options
used to create the database and some metadata. You can use the script
......@@ -218,7 +213,7 @@ case. Default is 1000.
-s, --srs=EPSGCODE
Set spatial reference system/projection. Use 4326 for WGS84 or 3857 for "Google
Set spatial reference system/projection. Use 4326 for WGS84 or 3857 for "Web
Mercator". If you want to use the data for the usual tiled web maps, 3857 is
probably right. For other uses, especially if you want to re-project to some
other projection, 4326 is probably right. Other projections are currently not
......
......@@ -2,8 +2,8 @@
#
# FindOsmium.cmake
#
# Find the Libosmium headers and, optionally, several components needed for
# different Libosmium functions.
# Find the Libosmium headers and, optionally, several components needed
# for different Libosmium functions.
#
#----------------------------------------------------------------------
#
......@@ -18,9 +18,12 @@
#
# Then add the following in your CMakeLists.txt:
#
# find_package(Osmium REQUIRED COMPONENTS <XXX>)
# find_package(Osmium [version] REQUIRED COMPONENTS <XXX>)
# include_directories(SYSTEM ${OSMIUM_INCLUDE_DIRS})
#
# The version number is optional. If it is not set, any version of
# libosmium will do.
#
# For the <XXX> substitute a space separated list of one or more of the
# following components:
#
......@@ -51,10 +54,8 @@
#
#----------------------------------------------------------------------
# Look for the header file.
find_path(OSMIUM_INCLUDE_DIR osmium/osm.hpp
PATH_SUFFIXES include
PATHS
# This is the list of directories where we look for osmium includes.
set(_osmium_include_path
../libosmium
~/Library/Frameworks
/Library/Frameworks
......@@ -62,6 +63,22 @@ find_path(OSMIUM_INCLUDE_DIR osmium/osm.hpp
/opt
)
# Look for the header file.
find_path(OSMIUM_INCLUDE_DIR osmium/version.hpp
PATH_SUFFIXES include
PATHS ${_osmium_include_path}
)
# Check libosmium version number
if(Osmium_FIND_VERSION)
file(STRINGS "${OSMIUM_INCLUDE_DIR}/osmium/version.hpp" _libosmium_version_define REGEX "#define LIBOSMIUM_VERSION_STRING")
if("${_libosmium_version_define}" MATCHES "#define LIBOSMIUM_VERSION_STRING \"([0-9.]+)\"")
set(_libosmium_version "${CMAKE_MATCH_1}")
else()
set(_libosmium_version "unknown")
endif()
endif()
set(OSMIUM_INCLUDE_DIRS "${OSMIUM_INCLUDE_DIR}")
#----------------------------------------------------------------------
......@@ -94,18 +111,17 @@ endif()
if(Osmium_USE_PBF)
find_package(ZLIB)
find_package(Threads)
find_package(Protozero 1.6.3)
list(APPEND OSMIUM_EXTRA_FIND_VARS ZLIB_FOUND Threads_FOUND)
if(ZLIB_FOUND AND Threads_FOUND)
list(APPEND OSMIUM_EXTRA_FIND_VARS ZLIB_FOUND Threads_FOUND PROTOZERO_INCLUDE_DIR)
if(ZLIB_FOUND AND Threads_FOUND AND PROTOZERO_FOUND)
list(APPEND OSMIUM_PBF_LIBRARIES
${ZLIB_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
)
if(WIN32)
list(APPEND OSMIUM_PBF_LIBRARIES ws2_32)
endif()
list(APPEND OSMIUM_INCLUDE_DIRS
${ZLIB_INCLUDE_DIR}
${PROTOZERO_INCLUDE_DIR}
)
else()
message(WARNING "Osmium: Can not find some libraries for PBF input/output, please install them or configure the paths.")
......@@ -256,12 +272,28 @@ endif()
if(OSMIUM_EXTRA_FIND_VARS)
list(REMOVE_DUPLICATES OSMIUM_EXTRA_FIND_VARS)
endif()
# Handle the QUIETLY and REQUIRED arguments and set OSMIUM_FOUND to TRUE if
# all listed variables are TRUE.
# Handle the QUIETLY and REQUIRED arguments and the optional version check
# and set OSMIUM_FOUND to TRUE if all listed variables are TRUE.
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Osmium REQUIRED_VARS OSMIUM_INCLUDE_DIR ${OSMIUM_EXTRA_FIND_VARS})
find_package_handle_standard_args(Osmium
REQUIRED_VARS OSMIUM_INCLUDE_DIR ${OSMIUM_EXTRA_FIND_VARS}
VERSION_VAR _libosmium_version)
unset(OSMIUM_EXTRA_FIND_VARS)
#----------------------------------------------------------------------
#
# A function for setting the -pthread option in compilers/linkers
#
#----------------------------------------------------------------------
function(set_pthread_on_target _target)
if(NOT MSVC)
set_target_properties(${_target} PROPERTIES COMPILE_FLAGS "-pthread")
if(NOT APPLE)
set_target_properties(${_target} PROPERTIES LINK_FLAGS "-pthread")
endif()
endif()
endfunction()
#----------------------------------------------------------------------
#
# Add compiler flags
......@@ -285,10 +317,14 @@ if(MSVC)
# old compilers anyway.
add_definitions(-wd4351)
# Disable warning C4503: "decorated name length exceeded, name was truncated"
# there are more than 150 of generated names in libosmium longer than 4096 symbols supported in MSVC
add_definitions(-wd4503)
add_definitions(-DNOMINMAX -DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_WARNINGS)
endif()
if(APPLE)
if(APPLE AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
# following only available from cmake 2.8.12:
# add_compile_options(-stdlib=libc++)
# so using this instead:
......@@ -309,10 +345,10 @@ endif()
set(OSMIUM_DRACONIC_CLANG_OPTIONS "-Wdocumentation -Wunused-exception-parameter -Wmissing-declarations -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-unused-macros -Wno-exit-time-destructors -Wno-global-constructors -Wno-padded -Wno-switch-enum -Wno-missing-prototypes -Wno-weak-vtables -Wno-cast-align -Wno-float-equal")
if(Osmium_DEBUG)
message(STATUS "OSMIUM_XML_LIBRARIES=" ${OSMIUM_XML_LIBRARIES})
message(STATUS "OSMIUM_PBF_LIBRARIES=" ${OSMIUM_PBF_LIBRARIES})
message(STATUS "OSMIUM_IO_LIBRARIES=" ${OSMIUM_IO_LIBRARIES})
message(STATUS "OSMIUM_LIBRARIES=" ${OSMIUM_LIBRARIES})
message(STATUS "OSMIUM_INCLUDE_DIRS=" ${OSMIUM_INCLUDE_DIRS})
message(STATUS "OSMIUM_XML_LIBRARIES=${OSMIUM_XML_LIBRARIES}")
message(STATUS "OSMIUM_PBF_LIBRARIES=${OSMIUM_PBF_LIBRARIES}")
message(STATUS "OSMIUM_IO_LIBRARIES=${OSMIUM_IO_LIBRARIES}")
message(STATUS "OSMIUM_LIBRARIES=${OSMIUM_LIBRARIES}")
message(STATUS "OSMIUM_INCLUDE_DIRS=${OSMIUM_INCLUDE_DIRS}")
endif()
#----------------------------------------------------------------------
#
# FindProtozero.cmake
#
# Find the protozero headers.
#
#----------------------------------------------------------------------
#
# Usage:
#
# Copy this file somewhere into your project directory, where cmake can
# find it. Usually this will be a directory called "cmake" which you can
# add to the CMake module search path with the following line in your
# CMakeLists.txt:
#
# list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
#
# Then add the following in your CMakeLists.txt:
#
# find_package(Protozero [version] [REQUIRED])
# include_directories(SYSTEM ${PROTOZERO_INCLUDE_DIR})
#
# The version number is optional. If it is not set, any version of
# protozero will do.
#
# if(NOT PROTOZERO_FOUND)
# message(WARNING "Protozero not found!\n")
# endif()
#
#----------------------------------------------------------------------
#
# Variables:
#
# PROTOZERO_FOUND - True if Protozero was found.
# PROTOZERO_INCLUDE_DIR - Where to find include files.
#
#----------------------------------------------------------------------
# find include path
find_path(PROTOZERO_INCLUDE_DIR protozero/version.hpp
PATH_SUFFIXES include
PATHS ${CMAKE_SOURCE_DIR}/../protozero
)
# Check version number
if(Protozero_FIND_VERSION)
file(STRINGS "${PROTOZERO_INCLUDE_DIR}/protozero/version.hpp" _version_define REGEX "#define PROTOZERO_VERSION_STRING")
if("${_version_define}" MATCHES "#define PROTOZERO_VERSION_STRING \"([0-9.]+)\"")
set(_version "${CMAKE_MATCH_1}")
else()
set(_version "unknown")
endif()
endif()
#set(PROTOZERO_INCLUDE_DIRS "${PROTOZERO_INCLUDE_DIR}")
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Protozero
REQUIRED_VARS PROTOZERO_INCLUDE_DIR
VERSION_VAR _version)
#----------------------------------------------------------------------
osmcoastline (2.1.4-5) UNRELEASED; urgency=medium
osmcoastline (2.2.0-1) unstable; urgency=medium
* New upstream release.
* Bump Standards-Version to 4.2.1, no changes.
* Update watch file to limit matches to archive path.
* Require at least libosmium2-dev 2.13.1.
* Update copyright years for Jochen Topf.
-- Bas Couwenberg <sebastic@debian.org> Sun, 05 Aug 2018 20:38:36 +0200
-- Bas Couwenberg <sebastic@debian.org> Thu, 06 Sep 2018 08:48:51 +0200
osmcoastline (2.1.4-4) unstable; urgency=medium
......
......@@ -9,14 +9,14 @@ Build-Depends: debhelper (>= 9),
libexpat1-dev,
libgdal-dev,
libgeos++-dev,
libosmium2-dev (>= 2.5.4),
libosmium2-dev (>= 2.13.1),
libgdalcpp-dev,
libspatialite-dev,
pandoc,
sqlite3,
zlib1g-dev
Standards-Version: 4.2.1
Vcs-Browser: https://salsa.debian.org/debian-gis-team/osmcoastline/
Vcs-Browser: https://salsa.debian.org/debian-gis-team/osmcoastline
Vcs-Git: https://salsa.debian.org/debian-gis-team/osmcoastline.git
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-2016, Jochen Topf <jochen@topf.org>
Copyright: 2012-2018, Jochen Topf <jochen@topf.org>
License: GPL-3+
Files: debian/*
......
......@@ -5,11 +5,11 @@
C++11 wrapper classes for GDAL/OGR.
Version 1.1.1
Version 1.2.0
https://github.com/joto/gdalcpp
Copyright 2015 Jochen Topf <jochen@topf.org>
Copyright 2015-2018 Jochen Topf <jochen@topf.org>
Boost Software License - Version 1.0 - August 17th, 2003
......@@ -37,17 +37,19 @@ DEALINGS IN THE SOFTWARE.
*/
#include <gdal_priv.h>
#include <gdal_version.h>
#include <ogr_api.h>
#include <ogrsf_frmts.h>
#include <cstdint>
#include <algorithm>
#include <memory>
#include <stdexcept>
#include <string>
#include <utility>
#include <vector>
#include <gdal_priv.h>
#include <gdal_version.h>
#include <ogr_api.h>
#include <ogrsf_frmts.h>
namespace gdalcpp {
#if GDAL_VERSION_MAJOR >= 2
......@@ -85,23 +87,23 @@ namespace gdalcpp {
m_error(error) {
}
const std::string& driver() const {
const std::string& driver() const noexcept {
return m_driver;
}
const std::string& dataset() const {
const std::string& dataset() const noexcept {
return m_dataset;
}
const std::string& layer() const {
const std::string& layer() const noexcept {
return m_layer;
}
const std::string& field() const {
const std::string& field() const noexcept {
return m_field;
}
OGRErr error() const {
OGRErr error() const noexcept {
return m_error;
}
......@@ -110,15 +112,27 @@ namespace gdalcpp {
namespace detail {
struct init_wrapper {
init_wrapper() { OGRRegisterAll(); }
~init_wrapper() { OGRCleanupAll(); }
};
#if GDAL_VERSION_MAJOR >= 2
init_wrapper() noexcept {
GDALAllRegister();
}
#else
init_wrapper() noexcept {
OGRRegisterAll();
}
~init_wrapper() noexcept {
OGRCleanupAll();
}
#endif
}; // struct init_wrapper
struct init_library {
init_library() {
static init_wrapper iw;
}
};
}; // struct init_library
class Driver : private init_library {
......@@ -134,11 +148,13 @@ namespace gdalcpp {
m_driver(OGRSFDriverRegistrar::GetRegistrar()->GetDriverByName(driver_name.c_str())) {
#endif
if (!m_driver) {
throw gdal_error(std::string("unknown driver: '") + driver_name + "'", OGRERR_NONE, driver_name);
throw gdal_error{std::string{"unknown driver: '"} + driver_name + "'",
OGRERR_NONE,
driver_name};
}
}
gdal_driver_type& get() const {
gdal_driver_type& get() const noexcept {
return *m_driver;
}
......@@ -158,7 +174,7 @@ namespace gdalcpp {
m_ptrs[options.size()] = nullptr;
}
char** get() const {
char** get() const noexcept {
return const_cast<char**>(m_ptrs.get());
}
......@@ -174,33 +190,37 @@ namespace gdalcpp {
SRS() :
m_spatial_reference() {
auto result = m_spatial_reference.SetWellKnownGeogCS("WGS84");
const auto result = m_spatial_reference.SetWellKnownGeogCS("WGS84");
if (result != OGRERR_NONE) {
throw gdal_error(std::string("can not initialize spatial reference system WGS84"), result);
throw gdal_error{std::string{"can not initialize spatial reference system WGS84"},
result};
}
}
explicit SRS(int epsg) :
m_spatial_reference() {
auto result = m_spatial_reference.importFromEPSG(epsg);
const auto result = m_spatial_reference.importFromEPSG(epsg);
if (result != OGRERR_NONE) {
throw gdal_error(std::string("can not initialize spatial reference system for EPSG:") + std::to_string(epsg), result);
throw gdal_error{std::string{"can not initialize spatial reference system for EPSG:"} + std::to_string(epsg),
result};
}
}
explicit SRS(const char* name) :
m_spatial_reference() {
auto result = m_spatial_reference.importFromProj4(name);
const auto result = m_spatial_reference.importFromProj4(name);
if (result != OGRERR_NONE) {
throw gdal_error(std::string("can not initialize spatial reference system '") + name + "'", result);
throw gdal_error{std::string{"can not initialize spatial reference system '"} + name + "'",
result};
}
}
explicit SRS(const std::string& name) :
m_spatial_reference() {
auto result = m_spatial_reference.importFromProj4(name.c_str());
const auto result = m_spatial_reference.importFromProj4(name.c_str());
if (result != OGRERR_NONE) {
throw gdal_error(std::string("can not initialize spatial reference system '") + name + "'", result);
throw gdal_error{std::string{"can not initialize spatial reference system '"} + name + "'",
result};
}
}
......@@ -208,11 +228,11 @@ namespace gdalcpp {
m_spatial_reference(spatial_reference) {
}
OGRSpatialReference& get() {
OGRSpatialReference& get() noexcept {
return m_spatial_reference;
}
const OGRSpatialReference& get() const {
const OGRSpatialReference& get() const noexcept {
return m_spatial_reference;
}
......@@ -237,6 +257,8 @@ namespace gdalcpp {
detail::Options m_options;
SRS m_srs;
std::unique_ptr<gdal_dataset_type, gdal_dataset_deleter> m_dataset;
uint64_t m_edit_count = 0;
uint64_t m_max_edit_count = 0;
public:
......@@ -251,28 +273,40 @@ namespace gdalcpp {
m_dataset(detail::Driver(driver_name).get().CreateDataSource(dataset_name.c_str(), m_options.get())) {
#endif
if (!m_dataset) {
throw gdal_error(std::string("failed to create dataset '") + dataset_name + "'", OGRERR_NONE, driver_name, dataset_name);
throw gdal_error{std::string{"failed to create dataset '"} + dataset_name + "'",
OGRERR_NONE,
driver_name,
dataset_name};
}
}
const std::string& driver_name() const {
~Dataset() noexcept {
try {
if (m_edit_count > 0) {
commit_transaction();
}
} catch (...) {
}
}
const std::string& driver_name() const noexcept {
return m_driver_name;
}
const std::string& dataset_name() const {
const std::string& dataset_name() const noexcept {
return m_dataset_name;
}
gdal_dataset_type& get() const {
gdal_dataset_type& get() const noexcept {
return *m_dataset;
}
SRS& srs() {
SRS& srs() noexcept {
return m_srs;
}
void exec(const char* sql) {
auto result = m_dataset->ExecuteSQL(sql, nullptr, nullptr);
const auto result = m_dataset->ExecuteSQL(sql, nullptr, nullptr);
if (result) {
m_dataset->ReleaseResultSet(result);
}
......@@ -282,10 +316,14 @@ namespace gdalcpp {
exec(sql.c_str());
}
Dataset& start_transaction() {
#if GDAL_VERSION_MAJOR >= 2
m_dataset->StartTransaction();
#else
OGRLayer* layer = m_dataset->GetLayer(0);
if (layer) {
layer->StartTransaction();
}
#endif
return *this;
}
......@@ -293,7 +331,38 @@ namespace gdalcpp {
Dataset& commit_transaction() {
#if GDAL_VERSION_MAJOR >= 2
m_dataset->CommitTransaction();
#else
OGRLayer* layer = m_dataset->GetLayer(0);
if (layer) {
layer->CommitTransaction();
}
#endif
m_edit_count = 0;
return *this;
}
void prepare_edit() {
if (m_max_edit_count != 0 && m_edit_count == 0) {
start_transaction();
}
}
void finalize_edit() {
if (m_max_edit_count != 0 && ++m_edit_count > m_max_edit_count) {
commit_transaction();
}
}
Dataset& enable_auto_transactions(uint64_t edits = 100000) noexcept {
m_max_edit_count = edits;
return *this;
}
Dataset& disable_auto_transactions() {
if (m_max_edit_count != 0 && m_edit_count > 0) {
commit_transaction();
}
m_max_edit_count = 0;
return *this;
}
......@@ -312,20 +381,23 @@ namespace gdalcpp {
m_dataset(dataset),
m_layer(dataset.get().CreateLayer(layer_name.c_str(), &dataset.srs().get(), type, m_options.get())) {
if (!m_layer) {
throw gdal_error(std::string("failed to create layer '") + layer_name + "'", OGRERR_NONE,
dataset.driver_name(), dataset.dataset_name(), layer_name);
throw gdal_error{std::string{"failed to create layer '"} + layer_name + "'",
OGRERR_NONE,
dataset.driver_name(),
dataset.dataset_name(),
layer_name};
}
}
OGRLayer& get() {
OGRLayer& get() noexcept {
return *m_layer;
}
const OGRLayer& get() const {
const OGRLayer& get() const noexcept {
return *m_layer;
}
Dataset& dataset() const {
Dataset& dataset() const noexcept {
return m_dataset;
}
......@@ -339,18 +411,38 @@ namespace gdalcpp {
field.SetPrecision(precision);
if (m_layer->CreateField(&field) != OGRERR_NONE) {
throw gdal_error(std::string("failed to create field '") + field_name + "' in layer '" + name() + "'", OGRERR_NONE,
m_dataset.driver_name(), m_dataset.dataset_name(), name(), field_name);
throw gdal_error{std::string{"failed to create field '"} + field_name + "' in layer '" + name() + "'",
OGRERR_NONE,
m_dataset.driver_name(),
m_dataset.dataset_name(),
name(),
field_name};
}
return *this;
}
void create_feature(OGRFeature* feature) {
dataset().prepare_edit();
const auto result = m_layer->CreateFeature(feature);
if (result != OGRERR_NONE) {
throw gdal_error{std::string{"creating feature in layer '"} + name() + "' failed",
result,
dataset().driver_name(),
dataset().dataset_name()};
}
dataset().finalize_edit();
}
Layer& start_transaction() {
#if GDAL_VERSION_MAJOR < 2
OGRErr result = m_layer->StartTransaction();
const auto result = m_layer->StartTransaction();
if (result != OGRERR_NONE) {
throw gdal_error(std::string("starting transaction on layer '") + name() + "' failed", result, m_dataset.driver_name(), m_dataset.dataset_name(), name());
throw gdal_error{std::string{"starting transaction on layer '"} + name() + "' failed",
result,
m_dataset.driver_name(),
m_dataset.dataset_name(),
name()};
}
#endif
return *this;
......@@ -358,9 +450,13 @@ namespace gdalcpp {
Layer& commit_transaction() {
#if GDAL_VERSION_MAJOR < 2
OGRErr result = m_layer->CommitTransaction();
const auto result = m_layer->CommitTransaction();
if (result != OGRERR_NONE) {
throw gdal_error(std::string("committing transaction on layer '") + name() + "' failed", result, m_dataset.driver_name(), m_dataset.dataset_name(), name());
throw gdal_error{std::string{"committing transaction on layer '"} + name() + "' failed",
result,
m_dataset.driver_name(),
m_dataset.dataset_name(),
name()};
}
#endif
return *this;
......@@ -370,36 +466,47 @@ namespace gdalcpp {
class Feature {
struct ogr_feature_deleter {
void operator()(OGRFeature* feature) {
OGRFeature::DestroyFeature(feature);
}
}; // struct ogr_feature_deleter
Layer& m_layer;
OGRFeature m_feature;
std::unique_ptr<OGRFeature, ogr_feature_deleter> m_feature;
public:
Feature(Layer& layer, std::unique_ptr<OGRGeometry>&& geometry) :
m_layer(layer),
m_feature(m_layer.get().GetLayerDefn()) {
OGRErr result = m_feature.SetGeometryDirectly(geometry.release());
m_feature(OGRFeature::CreateFeature(m_layer.get().GetLayerDefn())) {
if (!m_feature) {
throw std::bad_alloc{};
}
const auto result = m_feature->SetGeometryDirectly(geometry.release());
if (result != OGRERR_NONE) {
throw gdal_error(std::string("setting feature geometry in layer '") + m_layer.name() + "' failed", result, m_layer.dataset().driver_name(), m_layer.dataset().dataset_name());
throw gdal_error{std::string{"setting feature geometry in layer '"} + m_layer.name() + "' failed",
result,
m_layer.dataset().driver_name(),
m_layer.dataset().dataset_name()};
}
}
void add_to_layer() {
OGRErr result = m_layer.get().CreateFeature(&m_feature);
if (result != OGRERR_NONE) {
throw gdal_error(std::string("creating feature in layer '") + m_layer.name() + "' failed", result, m_layer.dataset().driver_name(), m_layer.dataset().dataset_name());
}
m_layer.create_feature(m_feature.get());
}
template <class T>
template <typename T>
Feature& set_field(int n, T&& arg) {
m_feature.SetField(n, std::forward<T>(arg));
m_feature->SetField(n, std::forward<T>(arg));
return *this;
}
template <class T>
template <typename T>
Feature& set_field(const char* name, T&& arg) {
m_feature.SetField(name, std::forward<T>(arg));
m_feature->SetField(name, std::forward<T>(arg));
return *this;
}
......
......@@ -15,15 +15,15 @@ $endfor$
$if(author)$
.SH COPYRIGHT
.PP
Copyright (C) 2012\-2016 Jochen Topf <jochen@topf.org>.
Copyright (C) 2012\-2018 Jochen Topf <jochen@topf.org>.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>.
<https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
.SH CONTACT
.PP
If you have any questions or want to report a bug, please go to
http://osmcode.org/contact.html
https://osmcode.org/contact.html
.SH AUTHORS
$for(author)$$author$$sep$; $endfor$.
$endif$
# NAME
osmcoastline - extract coastline from OSM data
osmcoastline - extract coastline from OpenStreetMap data
# SYNOPSIS
......@@ -11,7 +11,7 @@ osmcoastline - extract coastline from OSM data
# DESCRIPTION
**osmcoastline** extracts the coastline data from the *INPUT-FILE*, ususally
**osmcoastline** extracts the coastline data from the *INPUT-FILE*, usually
a planet file (or the output of the **osmcoastline_filter** program, see below)
and assembles all the pieces into polygons for use in map renderers etc.
......@@ -74,13 +74,13 @@ description of the options below and the README.md for details.
-s, --srs=EPSGCODE
: Set spatial reference system/projection. Use 4326 for WGS84 or 3857 for
"Google Mercator". If you want to use the data for the usual tiled web
"Web Mercator". If you want to use the data for the usual tiled web
maps, 3857 is probably right. For other uses, especially if you want to
re-project to some other projection, 4326 is probably right. Other
projections are currently not supported. Default is 4326.
-S, --write-segments=FILENAME
: Write out all coastline segments to the given file. Segments are
: Write out all coastline segments to the specified file. Segments are
connections between two points. The segments are written in an internal
format intended for use with the **osmcoastline_segments** program
only. The file includes all segments actually in the OSM data and only
......@@ -134,5 +134,6 @@ Running **osmcoastline_filter** first:
* `README.md`
* **osmcoastline_filter**(1), **osmcoastline_readmeta**(1),
**osmcoastline_segments**(1), **osmcoastline_ways**(1)
* [OSMCoastline in OSM wiki](http://wiki.openstreetmap.org/wiki/OSMCoastline)
* [Project page](https://osmcode.org/osmcoastline/)
* [OSMCoastline in OSM wiki](https://wiki.openstreetmap.org/wiki/OSMCoastline)
# NAME
osmcoastline_filter - filter coastline data from OSM file
osmcoastline_filter - filter coastline data from OpenStreetMap file
# SYNOPSIS
......@@ -18,7 +18,8 @@ building the coastlines from an OSM planet. The data is written to the
output file in PBF format.
This output file will be a lot smaller (less than 1%) than the original planet
file, but it contains everything needed to assemble the coastline polygons.
file, but it contains everything needed to assemble the coastline and land
or water 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
......@@ -54,5 +55,6 @@ Run it as follows:
# SEE ALSO
* **osmcoastline**(1), **osmcoastline_ways**(1)
* [OSMCoastline in OSM wiki](http://wiki.openstreetmap.org/wiki/OSMCoastline)
* [Project page](https://osmcode.org/osmcoastline/)
* [OSMCoastline in OSM wiki](https://wiki.openstreetmap.org/wiki/OSMCoastline)
# NAME
osmcoastline_readmeta - display metadata from database create by osmcoastline
osmcoastline_readmeta - display metadata from database created by osmcoastline
# SYNOPSIS
......@@ -33,5 +33,6 @@ and more.
# SEE ALSO
* **osmcoastline**(1)
* [OSMCoastline in OSM wiki](http://wiki.openstreetmap.org/wiki/OSMCoastline)
* [Project page](https://osmcode.org/osmcoastline/)
* [OSMCoastline in OSM wiki](https://wiki.openstreetmap.org/wiki/OSMCoastline)
# NAME
osmcoastline_segments - analyze coastline changes from segment files
osmcoastline_segments - analyze OpenStreetMap coastline changes from segment files
# SYNOPSIS
......@@ -68,5 +68,6 @@ Create a shapefile with the differences:
* `README.md`
* **osmcoastline**(1)
* [OSMCoastline in OSM wiki](http://wiki.openstreetmap.org/wiki/OSMCoastline)
* [Project page](https://osmcode.org/osmcoastline/)
* [OSMCoastline in OSM wiki](https://wiki.openstreetmap.org/wiki/OSMCoastline)
# NAME
osmcoastline_ways - extract coastline ways from OSM data
osmcoastline_ways - extract coastline ways from OpenStreetMap data
# SYNOPSIS
......@@ -39,5 +39,6 @@ of their "name" and "source" tags.
# SEE ALSO
* **osmcoastline**(1), **osmcoastline_filter**(1)
* [OSMCoastline in OSM wiki](http://wiki.openstreetmap.org/wiki/OSMCoastline)
* [Project page](https://osmcode.org/osmcoastline/)
* [OSMCoastline in OSM wiki](https://wiki.openstreetmap.org/wiki/OSMCoastline)
......@@ -14,8 +14,8 @@ fi
if [ "x$1" = "x--version" -o "x$1" = "x-V" ]; then
echo "osmcoastline_readmeta version $OSMCOASTLINE_VERSION"
echo "Copyright (C) 2012-2016 Jochen Topf <jochen@topf.org>"
echo "License: GNU GENERAL PUBLIC LICENSE Version 3 <http://gnu.org/licenses/gpl.html>."
echo "Copyright (C) 2012-2018 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.";
exit 0
......