.TH "OSMCOASTLINE" "1" "2.4.0" "" "" .SH NAME .PP osmcoastline - extract coastline from OpenStreetMap data .SH SYNOPSIS .PP \f[B]osmcoastline\f[R] [\f[I]OPTIONS\f[R]] --output-database=\f[I]OUTPUT-DB\f[R] \f[I]INPUT-FILE\f[R] .SH DESCRIPTION .PP \f[B]osmcoastline\f[R] extracts the coastline data from the \f[I]INPUT-FILE\f[R], usually a planet file (or the output of the \f[B]osmcoastline_filter\f[R] program, see below) and assembles all the pieces into polygons for use in map renderers etc. .PP The output is written to the Spatialite database \f[I]OUTPUT-DB\f[R]. Depending on the options it will contain the coastlines in different formats. See the description of the options below and the README.md for details. .SH OPTIONS .TP -h, --help Display usage information. .TP -b, --bbox-overlap=OVERLAP Polygons that are too large are split into two halves (recursively if need be). Where the polygons touch the OVERLAP is added, because two polygons just touching often lead to rendering problems. The value is given in the units used for the projection (for WGS84 (EPSG: 4326) this is in degrees, for Mercator (EPSG: 3857) this is in meters). If this is set too small you might get rendering artefacts where polygons touch. The larger you set this the larger the output polygons will be. The best values depend on the map scale or zoom level you are preparing the data for. Disable the overlap by setting it to 0. Default is 0.0001 for WGS84 and 10 for Mercator. .TP -c, --close-distance=DISTANCE \f[B]osmcoastline\f[R] assembles ways tagged \f[C]natural=coastline\f[R] into rings. Sometimes there is a gap in the coastline in the OSM data. \f[B]osmcoastline\f[R] will close this gap if it is smaller than DISTANCE. Use 0 to disable this feature. .TP -d, --debug Enable debugging output. .TP -f, --overwrite Overwrite output file if it already exists. .TP -g, --gdal-driver=DRIVER Allows user to select any GDAL driver. Only \[lq]SQLite\[rq], \[lq]GPKG\[rq] and \[lq]ESRI Shapefile\[rq] GDAL drivers have been tested. The default is \[lq]SQLite\[rq]. .TP -i, --no-index Do not create spatial indexes in output db. The default is to create those indexes. This makes the database larger, but data access is faster. .TP -l, --output-lines Output coastlines as lines to database file. .TP -m, --max-points=NUM Set this to 0 to prevent splitting of large polygons and linestrings. If set to any other positive integer \f[B]osmcoastline\f[R] will try to split polygons/linestrings to not have more than this many points. Depending on the overlap defined with \f[B]-b\f[R] and the shape of the polygons it is sometimes not possible to get the polygons small enough. \f[B]osmcoastline\f[R] will warn you on STDERR if this is the case. Default is 1000. .TP -o, --output-database=FILE Spatialite database file for output. This option must be set. .TP -p, --output-polygons=land|water|both|none Which polygons to write out (default: land). .TP -r, --output-rings Output rings to database file. This is used for debugging. .TP -s, --srs=EPSGCODE Set spatial reference system/projection. Use 4326 for WGS84 or 3857 for \[lq]Web Mercator\[rq]. 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. .TP -S, --write-segments=FILENAME 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 \f[B]osmcoastline_segments\f[R] program only. The file includes all segments actually in the OSM data and only those. Gaps are (possibly) closed in a later stage of running \f[B]osmcoastline\f[R], but those closing segments will not be included. .TP -v, --verbose Gives you detailed information on what \f[B]osmcoastline\f[R] is doing, including timing. .TP -V, --version Display program version and license information. .SH NOTES .PP To speed up processing you might want to run the \f[B]osmcoastline_filter\f[R] program first. See its man page for details. .SH DIAGNOSTICS .PP \f[B]osmcoastline\f[R] exits with exit code .TP 0 if everything was okay .TP 1 if there were warnings while processing the coastline .TP 2 if there were errors while processing the coastline .TP 3 if there was a fatal error when running the program .TP 4 if there was a problem with the command line arguments. .SH EXAMPLES .PP Run \f[B]osmcoastline\f[R] on a planet file using default options: .IP .nf \f[C] osmcoastline -o coastline.db planet.osm.pbf \f[R] .fi .PP Running \f[B]osmcoastline_filter\f[R] first: .IP .nf \f[C] osmcoastline_filter -o coastline.osm.pbf planet.osm.pbf osmcoastline -o coastline.db coastline.osm.pbf \f[R] .fi .SH SEE ALSO .IP \[bu] 2 \f[C]README.md\f[R] .IP \[bu] 2 \f[B]osmcoastline_filter\f[R](1), \f[B]osmcoastline_readmeta\f[R](1), \f[B]osmcoastline_segments\f[R](1), \f[B]osmcoastline_ways\f[R](1) .IP \[bu] 2 Project page (https://osmcode.org/osmcoastline/) .IP \[bu] 2 OSMCoastline in OSM wiki (https://wiki.openstreetmap.org/wiki/OSMCoastline) .SH COPYRIGHT .PP Copyright (C) 2012\-2021 Jochen Topf . License GPLv3+: GNU GPL version 3 or later . 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 https://osmcode.org/contact.html .SH AUTHORS Jochen Topf .