-
Notifications
You must be signed in to change notification settings - Fork 85
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
Projection of Geometry {x,y} #4
Comments
divide by 16 to get the actual pixel space value. |
Cool. What is the reason to super sample 16x? |
to avoid precision loss before rounding to integers. This value is configuration at vector tile creation - will plan to doc this out more so I have a place to point you in the spec, but for now just assume 16. |
Note that the |
Great! I was wondering what extent meant. Is this part of the reason why you only need to generate tiles to zoom 12? What is the general approach regarding the dynamic subtiles at higher zoom levels? I suppose it isn't that complicated - just keep slicing it into 4s. |
After working a bit in drawing these pbf tiles on HTML5 canvas, I am wondering why we have this extent of 4096. Why super sample atall? It would massively save space if the extent were 256, that way a pixel will have at max 1 node. After a node has already been rounded to an integer, what is the point of having this super sample? The reason I am asking, is that if I want to represent millions of points in a given tile, I want to project to a pixel and only have one point for a pixel that in turn represents many points that another API call can query. The browser should not have knowledge about the source points, just the projected points. |
You can set the extent in your layer: vector-tile-js/proto/vector_tile.proto Line 80 in b12f85f
|
I understand this, however, I don't understand why we would ever want something more than the pixel extent of a tile. I have gotten node-mapnik to render with an extent of 256 when I specify an option for path_multiplier = 1. Then, I make the tolerance be 2 instead of 32. What I wonder is why don't we have 256 be defulat rather than 4096? |
Vector tiles aren't just meant for rendering with Mapnik. You can do lots of other stuff with them, and for those things, a resolution higher than 256 is useful. |
ah, i can see how this would be helpful with scaling in opengl. cool! |
When I get a feature and I call
feature.loadGeometry();
, I get an array of arrays that have values creating lines like this:I thought that the geometry points would be between 0 and 255, because they have been projected to the pixel space of the tile. Apparently I am wrong. If this is pixel space, does it correspond to the zoom that the tiles were cut from? Also, where is the origin?
The text was updated successfully, but these errors were encountered: