marook / osm-read

an openstreetmap XML and PBF data parser for node.js and the browser
GNU Lesser General Public License v3.0
107 stars 25 forks source link

add browser support to PBF parser? #3

Closed nrenner closed 10 years ago

nrenner commented 10 years ago

Note: this is not an actual request to merge, just as a reference

I did a quick and dirty test for using pbfParser in the browser (not caring about Node.js). Example: http://nrenner.github.io/osm-read/

I'm thinking about discontinuing osm-pbf.js and switching to osm-read because it's based on ProtoBuf.js and already supports reading some metadata, but:

  1. While my test is using shims and replacements for the node-specific parts, I would rather factor these out and have a neutral core. Browser support could then be added here or as a separate project. What do you think?
  2. Do you care about the GPL license and it's strong copyleft? I would prefer a permissive license like MIT, 2-clause BSD or Apache License (used by ProtoBuf.js) that doesn't require other projects using the library to also use GPL.
marook commented 10 years ago

Wow... it looks like you put a lot of effort into adapting osm-read :)

regarding 1.: I've written osm-read with a node.js environment in mind. But I think browser support would be a valuable extension for the current implementation. I'm totally with you that the strong reliance on node.js APIs should be refactored into a defined abstraction layer. To make things easier to understand I would recommend doing this step by step. I will accept pull requests for such refactorings even if they are just a part of the final solution. The code must only pass it's tests at any time.

regarding 2.: I don't have much experience with licensing. I know that the GPL license is very restricting for reuse in non open source environments. I could agree to change the license to LGPL. What do you think?

nrenner commented 10 years ago

I'm not a licensing expert either and I don't know which philosophy is better and don't want to convince anyone. I just decided to go for a permissive license and want to license my project under MIT, but that means I can't use any GPL libraries.

I guess LGPL would be fine though, so if you don't mind, changing the license to LGPL would be great. Otherwise I still can continue with osm-pbf.js, so it's not such a big deal.

marook commented 10 years ago

I changed the licensing to LGPL with version 0.3.2.

nrenner commented 10 years ago

Thanks a lot!

Closing, proper implementation will follow in step by step PRs.