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

multipolygon encoding #2

Closed
tmcw opened this issue Jul 8, 2014 · 1 comment
Closed

multipolygon encoding #2

tmcw opened this issue Jul 8, 2014 · 1 comment

Comments

@tmcw
Copy link
Contributor

tmcw commented Jul 8, 2014

something is awry with multipolygon encoding - unlike the rest of examples, it's larger as a pbf than as geojson:

image

@springmeyer
Copy link
Owner

my hunch is that is the expected result. It is important for arrays (e.g. repeated items) in protobuf to be packed for maximum efficiency. Because only native types can be packed and this proto uses custom types for the arrays, this sample proto is, so far, just an example of the simplest and least optimized approach to encoding for pbf. I planned next to compare to a packed flat array, but have not gotten around to that code example. As context, in vector tiles we use a single, packed array for geometries which is much more efficient: https://github.com/mapbox/mapnik-vector-tile/blob/6ed7f9f8495bf04e13808e068125a543a53280bf/proto/vector_tile.proto#L62

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

2 participants