Closed rubenv closed 6 years ago
Also: no unit test added, since I'm not really sure how we can test this. Apologies for that.
@olt Any chance you can give this a look?
Sorry for the silence.
Imposm is a command line tool and should not be used as a library as there is no guarantee for a stable API. So I'm hesitant to add user requests.
However, the parser is now available at https://github.com/omniscale/go-osm This API should be stable (at least in terms of Semantic Versioning).
Here is the documentation of the (slightly changed) parser API: https://godoc.org/github.com/omniscale/go-osm/parser/pbf#example-package
The go-osm Branch already uses github.com/omniscale/go-osm for parsing: https://github.com/omniscale/imposm3/tree/go-osm
Please provide feedback in the go-osm repository.
I'm using the PBF parser in osmtopo and there's currently no way to stop the parser in case of a user abort.
This change seems like the least invasive way to make this possible, but I'm happy to write it differently if desired.