This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Getting extents of pbf file using osmosis

1

Is there a way to obtain the extents of a pbf file (top, bottom, left, right) using osmosis or similar tool?

asked 30 Oct '18, 14:35

awa5114's gravatar image

awa5114
46226
accept rate: 0%


2 Answers:

3

The osmconvert --out-statistics option returns lat/lon min/max values:

osmconvert liechtenstein.osm.pbf --out-statistics

osmconvert binaries are also available for Windows.

answered 31 Oct '18, 10:55

ikonor's gravatar image

ikonor
1.3k21119
accept rate: 18%

Excellent, I knew there had to be a way through the regular tools!

(31 Oct '18, 12:33) awa5114

2

This can be done with the osmium command line tool from https://github.com/osmcode/osmium-tool (also present in recent Linux distributions):

% osmium fileinfo -eg data.bbox myfile.osm.pbf
[======================================================================] 100% 
(6.0807,47.4811,9.74985,50.3178)

answered 30 Oct '18, 14:56

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Source code available on GitHub .