Forrest logo
back to the osmium tool

osmium:tldr:40b40

osmium: Extract a geographic region by the given [b]ounding box.
$ osmium extract -b ${min_longitude},${min_latitude},${max_longitude},${max_latitude} ${path-to-input-pbf} -o ${path-to-output-pbf}
try on your machine

This command is using the "osmium" tool to extract a specific bounding box from an input PBF (Protocolbuffer Binary Format) file and save it as a new output PBF file.

Let's break down the command:

  • osmium extract: This is the main command to extract data using the osmium tool.

  • -b ${min_longitude},${min_latitude},${max_longitude},${max_latitude}: This option specifies the bounding box coordinates for the extraction. Replace ${min_longitude} with the minimum longitude value, ${min_latitude} with the minimum latitude value, ${max_longitude} with the maximum longitude value, and ${max_latitude} with the maximum latitude value. This defines the rectangular region you want to extract data from.

  • ${path-to-input-pbf}: This is the path to the input PBF file. Replace ${path-to-input-pbf} with the actual file path.

  • -o ${path-to-output-pbf}: This option specifies the output file where the extracted data will be saved. Replace ${path-to-output-pbf} with the desired path and name for the output PBF file.

In summary, this command extracts a specific geographic region (bounding box) from an input PBF file and saves it as a new PBF file.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the osmium tool