Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
63 lines (42 sloc) 1.66 KB
osm-read - developer guide
1) Running the tests
2) Protocol Buffers
3) Generating manyNodes.pbf test data
4) Release NPM Module
------------------------------------------------------------------------
Running the tests
Currently there is a set of mocha (https://github.com/visionmedia/mocha)
based unit and integration tests. The tests can be executed in a node.js
context and in the browser.
To run the tests within node.js type:
$ npm test
To run the tests within the browser you first have to install browserify:
$ npm install browserify -g
Then run browserify in order to generate the latest osm-read-pbf.js:
$ npm run browserify
To finally execute the tests open test/index.html in your favourite
browser.
------------------------------------------------------------------------
Protocol Buffers
The protocol buffer definitions for reading openstreetmap pbf files have
been taken from the osmosis source code repository:
https://github.com/openstreetmap/osmosis/tree/master/osmosis-osm-binary/src/main/protobuf
js modules for the proto files generated with (see scripts in package.json):
$ npm run buildProto
------------------------------------------------------------------------
Generating manyNodes.pbf test data
The file test/manyNodes.pbf can be generated via the script
test/genManyNodes.sh. genManyNodes.sh requires bash and osmosis
installed.
------------------------------------------------------------------------
Release NPM Module
Adjust the module version in package.json. The execute the following:
$ git commit -a
$ npm install
$ npm test
$ npm run browserify
$ xdg-open test/index.html
$ npm publish
$ git tag <released version>
$ git push
$ git push --tags
Something went wrong with that request. Please try again.