Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PBF Encoder #20

Open
przmv opened this issue Jan 2, 2017 · 2 comments
Open

PBF Encoder #20

przmv opened this issue Jan 2, 2017 · 2 comments

Comments

@przmv
Copy link

przmv commented Jan 2, 2017

Is there any progress in PBF Encoder development? Or are there any hints/ideas on how it could be implemented? I need such functionality and I'd really like to help with development, but I need just some initial assistance to get started.

@jongillham
Copy link
Member

I am not aware of anyone creating an encoder. The only people I assumed needed one were those that run openstreetmap.org. I would be interested to know your use case though.

On the whole we try to follow the same pattern as the Go standard library encoder/decoder pairs such as encoding/json. Therefore the API might look like this:

type Encoder struct { }

func NewEncoder(w io.Writer) *Encoder { }

func (e *Encoder) Encode(v interface{}) error { }

Where v can only be a Node, Relation or Way. However I am certain there are a few nuances about how these entities should be batched up.

@przmv
Copy link
Author

przmv commented Jan 3, 2017

I would be interested to know your use case though.

@jongillham Our use case is the following:

  1. Parse some PBF data
  2. Filter on some entries
  3. Obtain a PBF with filtered entries

So, we've implemented the first two points and now are investigating the ways to do the third as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants