Clip PBF file by bbox
The code below uses the Toolbox SDK, which you can install with pip install toolbox-sdk.
Additional Python examples: using SDK, using Requests. If you prefer other programming language or need full API reference, check out Toolbox OpenAPI as well.
Docs
Downloads pbf file from web, and clips it by bbox string. You can obtain bbox string at https://boundingbox.klokantech.com (format CSV).
Inputs:
PBF file URL. Example - https://nextgis.com/data/toolbox_static_testfiles/osmclip_bbox/maldives-latest.osm.pbf
BBOX. Bounding Box in CSV format. Example - 14.5013,35.887,14.5066,35.899 (coordinates of the lower left and upper right corner of the frame). The bbox line can be taken here - https://boundingbox.klokantech.com/
Outputs:
Clipped PBF.
Try the tool in action
Click on the Demo button above the tool form. The fields are filled in with demo values.
Click on the Run button.