Download the PHP package franksierra/osm-pbf without Composer
On this page you can find all versions of the php package franksierra/osm-pbf. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download franksierra/osm-pbf
More information about franksierra/osm-pbf
Files in franksierra/osm-pbf
Package osm-pbf
Short Description Works with Open Street Map .osm.pbf compressed files.
License MIT
Homepage https://github.com/franksierra/osm-pbf
Informations about the package osm-pbf
OSM PBF (Open Street Map Protofol Buffer Files)
This package gives you the ability to work with Open Street Maps Protocol Buffer Files , .osm.pbf. I get them from https://download.geofabrik.de/ and I haven't tried processing planet.osm
Installation
Require this package with composer.
Usage
You can read osm.pbf files using the Reader class:
Create a binary handle to the .osm.pbf file and pass it in the Reader()
Constructor:
Call the function readFileHeader()
to get some useful information about the file that is being read
Functions to get the boundaries box:
Functions to get replication information (WIP: Updating the dataset):
Starting the data read:
You could use the skipToBlock($index)
function to start at any given index (Maybe resume a failed operation):
The function processElements($elements)
should be your own implementation but could be something like this:
All versions of osm-pbf with dependencies
google/protobuf Version ^3.15.0
mdurrant/php-binary-reader Version ^1.0
ext-zlib Version *