OSM2PGSQL(1)

πŸ“¦ version 2.3.1, in arch rolling, nixpkgs unstable, ubuntu stonking

✨ OSM2PGSQL(1) ✨

okay bestie, welcome to the osm2pgsql-expire manual page πŸ’– this is part of the osm2pgsql fam, and it's the little tool that looks at tiles like πŸ‘€


🌈 NAME 🌈

osm2pgsql-expire β€” Visualize expire output ✨


πŸŽ€ SYNOPSIS πŸŽ€

osm2pgsql-expire [OPTIONS] OSM-FILE (1) osm2pgsql-expire TILES-FILE (2)

πŸ’… DESCRIPTION πŸ’…

okay so real talk: this command is currently experimental πŸ™ˆ like, it works, but it's in its experimental era.

The expire command can be used for two things, and they're kinda iconic:

  1. To check what tiles some OSM data is in. If an OSM-FILE is specified osm2pgsql-expire will calculate the tiles covering the objects in that file. Note that the file must not be a change file but a regular OSM data file! Output is, by default, a tile file, but GeoJSON is also possible. Covering tiles are only calculated for tagged objects.
  2. Visualize tile list. If a TILE-FILE (presumably generated by osm2pgsql) is specified, a GeoJSON file is generated showing all mentioned tiles. In this mode all command line options are ignored. πŸ’€

Read the Expire chapter of the osm2pgsql manual (https://osm2pgsql.org/doc/manual.html#expire) for details on how to interpret the -m, --mode and --full-area-limit options. iykyk πŸ“–βœ¨


πŸ¦‹ GEOMETRY GENERATION πŸ¦‹

To calculate the tiles covering the specified OSM data in mode (1), a geometry has to be generated first for each object. This works as follow:

  • For nodes a point geometry will be generated. πŸ“
  • For closed ways a polygon geometry will be generated, for non-closed ways a linestring geometry. If a generated polygon is not valid, the program will fall back to a linestring. If neither a valid polygon nor a valid linestring can be generated the object is ignored. 🚫
  • For relations a geometry is generated based on the type tag. For types multipolygon and boundary, a multipolygon geometry is created, for types route and multilinestring a multilinestring geometry is created, for all other types a geometry collection is created. 🌸

Note that for (multi)polygons it depends on the command line options --mode and --full-area-limit whether the tiles calculation is based on the area or the boundary of the (multi)polygons. πŸ‘‘


πŸ’– OPTIONS πŸ’–

This program follows the usual GNU command line syntax, with long options starting with two dashes (--). Mandatory arguments to long options are mandatory for short options too. (yeah bestie, same energy for both, no shortcuts 🫢)

πŸ‘‘ MAIN OPTIONS πŸ‘‘

  • -b, --buffer=VALUE β€” Set buffer size around geometry relative to tile size. Example: Set to 0.1 for a buffer that’s 10% of the tile size. 🌈
  • -f, --format=FORMAT β€” Output format. Options are tiles (default) or geojson. The GeoJSON output uses the Web Mercator projection (EPSG:3857) which is supported by many programs although, strictly speaking, it is not allowed by the GeoJSON spec. 😭 (we're being a lil rebellious, what can we say)
  • --full-area-limit=VALUE β€” Set full area limit.
  • -m, --mode=MODE β€” Set expire mode. One of boundary_only, full_area (default), and hybrid. ✨
  • -z, --zoom=ZOOM β€” Zoom level on which to calculate tiles. πŸ”

πŸ™‹ HELP/VERSION OPTIONS πŸ™‹

  • -h, --help β€” Print help.
  • -V, --version β€” Print osm2pgsql version.

πŸ“ LOGGING OPTIONS πŸ“

  • --log-level=LEVEL β€” Set log level (debug, info (default), warn, or error).

🌟 SEE ALSO 🌟


and that's the whole thing bestie, you ate that πŸ“ this page is from version 2.3.1 and it's still floating around in the OSM2PGSQL(1) manual era β€” go forth and expire some tiles, mwah πŸ’…πŸ’œ

πŸ“¦ where this page comes from