-
Notifications
You must be signed in to change notification settings - Fork 1.3k
merge GeoJSON vector tiles work #893
Comments
The library consists of |
@incanus it would be nice to have it as a separate library — easier to maintain this way, with separate tests etc. It could also grow into a useful standalone tool. |
Related to #904, we can't subclass
|
FYI above I was speaking of GeoJSON only because that's what |
Current status: as of 988e64e, I have some semblance of an ever-present annotations layer atop the style layers, which generates tile coverage properly. Then, instead of kicking off async web loads for tile data, it queries a passed Next steps, roughly:
|
Still making slow progress here. Current structure is a |
As of 645aeda I'm getting things to render a bit. |
Next up is some careful looking into the
That should keep me busy a while longer. |
As of d36caee this now works, at least within the limits of:
That's next. |
1.) Collision detection happens only for Symbol Buckets (not lines or areas). 2.) If you want render something over all areas, lines and symbols, you would have to make sure that glDepthRange gets called with the right depth range. Painter uses a variable called strata for this. You may want to review your changes around this area to debug this. |
Thanks @mb12, I am fresh to this part of the code since much of the collision work so this is a good pointer. Also I think I've determined my problems are with actual geometry conversion, but I'm still digging in. I'm super interested in what you are up to with the code base — care to get in touch on my git email or my first name |
Currently taking a side trip to work on symbols instead of merely lines, since this is a higher-priority item and everything thus far has been hardcoded for lines at the expense of symbols and fills. Longer term, we'll probably have a lines/polygons annotations layer and another, separate points layer dynamically added to the style. On iOS at least, the two groups — points and line/polygon shapes — are each relegated to their own z-ordering, which we'll likely start with. Eventually we can open up more control in the API for intermingling the two, as well as interleaving their component annotations between other layers of the map. That is, iOS model / first goal:
Eventual goal, for example:
|
As I've gotten into this, I've found that there's enough branching logic required to support both vector tiles as current and "live tiles" of annotation data that I'm thinking it makes more sense to adapt all of the live stuff for the vector tile construct. Right now, vector tiles are (rightly) expected to be created from PBF data, and then the various parsing buckets (fill/line/symbol) are coupled to that format, parsing and interpreting actual vector tile geometry commands individually. Instead of adding support for "manual" geometry to the buckets as I have been (where
This also moves towards a model of GeoJSON or live annotation features existing in multiple layers of one tile, which is how vector tiles work now. That way we can still apply filters to get |
Spinning the tile refactoring out to #928 for the next step. |
#928 is dead! Back to this issue now, interfacing |
As of e5d8b78 we have GeoJSON fetched from local file, parsed in C++, and added as live tiles to a non-hacky rendering infrastructure. Next up: figuring out why labels get garbled and not all shapes show up initially. Video: https://dl.dropboxusercontent.com/u/575564/garble.mp4 |
Backlog:
|
The garbling in the posted video is similar to this issue. |
|
@incanus Something along the lines of https://github.com/mapbox/hey/issues/3712. We would not look at imagery, but try to reduce density for lower zoom tiles in places where points are too crowded, so that e.g. if we have 100,000 points, we don't have to render 100,000 on z0. Duplicate points filtering is not sufficient, because it's still potentially |
@mourner Yeah point filtering would be great for performance and allow a developer to throw lots of points at the map without having to worry about the performance impact. @incanus I think you are on the right track with clearing tiles. You want to be able to say - these tiles are dirty, on next redraw, fetch new ones. That way only the tiles that need to be reloaded will be and it will happen as part of the normal update/render/swap flow. |
Ok, point annotation removals now work as of e4da705. That hits everything up in #893 (comment), so I think we can say point features are complete. Time now to clean, tidy up (e.g. fbd5511#commitcomment-10224463), and get a point annotations PR in. |
Oops, forgot |
Done in 3ce0fb9. Moving on to cleanup & separate PR for point API. |
Point annotations PR → #1018 |
Moving this ticket to the b2 milestone, since the real GeoJSONVT integration involves shapes; points are standalone. |
For b2, need to port over some improvements from @mourner like mapbox/geojson-vt@6f82954 when we get back to shapes. |
Note to catch up with |
Picking up shape annotation work again for b2 in |
pretty sweet! does that work with lines as well as closed shapes? |
Yep, though still working through a fair number of issues. It’s looking like the first cut will support either open shapes with a variable-width/color border, closed shapes with a fill color and an optional, but fixed-width, variable-color border, and possibly cutout holes in closed shapes. |
Currently working on multiple layers, styling, and laying foundation for relative ordering. Just to brain dump:
|
Another approach, an alternative to each shape having a layer in the style, is to put all shapes in a single style layer like we do with points, make line and fill buckets parse out their |
That's a huge push, outlined in mapbox/mapbox-gl-style-spec#249. |
I was seeing it in terms of annotation layers only, but I see how this should be made generic and how it plays with data-driven styles now. Thanks for the reminder. |
Shape work PR coming into place: #1655 |
Shapes are just about set for b2, so I'm back looking into this ticket's branch ( |
#1655 supersedes this now that GeoJSONVT as the underpinning of shape annotations has landed there. |
Picking up from #507 (comment), we'll need to merge the
geojsonvt
branch, which will require it interfacing better with the library.MultiGeometry
supportLatLng
struct)/cc @mourner @1ec5
The text was updated successfully, but these errors were encountered: