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

Back compatibility for vt.parse #474

Closed
springmeyer opened this issue Jul 8, 2015 · 1 comment
Closed

Back compatibility for vt.parse #474

springmeyer opened this issue Jul 8, 2015 · 1 comment
Milestone

Comments

@springmeyer
Copy link
Member

After #419 is done the need for vt.parse() will be gone.

This is awesome, but we'll need to think through how to lessen the damage downstream.

My thinking is that:

  • We should remove all usage of vt.parse from the node-mapnik tests
  • We keep vt.parse() as a function but either:
    • make it do nothing except print a deprecation warning, or
    • change its behavior to be a validation function.

By validation I mean it could create a tile_datasource on the stack and make sure that works without throwing. That would allow usage like this to keep working the same: https://github.com/mapbox/mapbox-upload-validate/blob/7666dca170e0d35ad81280c2b2fb997c8852f72a/lib/validators/serialtiles.js#L48-L73. However I'm not yet convinced this is a good idea. There are a lot of forms of validation users might want for vector tiles and it likely makes more sense to think of this as a totally separate task. Users might want to know 1) is it a protobuf, 2) is it a valid vector tile at the byte/schema level ("parseable"), 3) is that vector tile made up of geometries that make sense (clipped and within the bounds of the tile) or was it improperly encoded if various odd ways...

@springmeyer springmeyer added this to the v3.5.0 milestone Jul 8, 2015
springmeyer pushed a commit that referenced this issue Jul 10, 2015
 - Implements #419: `vt.parse()` no longer required
 - Keeps `vt.parse()` as a validator - refs #474
 - Prep work toward #422
 - Moves usage of google's libprotobuf and protoc generated code to cpp only
   in preparation for reducing or fully removing google dep in the future
 - Next step: port more functions away from using `vector_tile::Tile` to reduce
   the overhead of needing to create the object in most cases (except writing)
@springmeyer
Copy link
Member Author

change its behavior to be a validation function

For now I've kept it as a way to validate that the underlying buffer is parseable. Will revisit as I continue to work on #422

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

No branches or pull requests

1 participant