feat: vector visParams support and style#447
Conversation
|
i'll give a more thorough review tomorrow, seems to work after a quick check in QGIS. Here's the quick feedback from claude:
|
|
Thanks @zacdezgeo those review issues/suggestions were implemented:
(I'm not sure why the pre-commit is failing, locally my branch pass all the ruff test, do you have any idea?) |
- Implemented the GEE FeatureView visParams (color, fill, stroke, opacity, width, point/polygon/line style) - Guard against bare hex colors, invalid values, and unsupported data-driven styles
- update_ee_vector_layer re-inserts at the original layer tree slot - thread vis_params through the full vector add/update call chain - making sure updated vector layers preserve EE custom properties for reload/update - collapse duplicate key sets into a single ee_style_keys constant - rewrite doc in the examples to explain local-vector vs catalog-tile
- Implemented the GEE FeatureView visParams (color, fill, stroke, opacity, width, point/polygon/line style) - Guard against bare hex colors, invalid values, and unsupported data-driven styles
|
forced push to rebase off of changes in main @XavierCLL. I'm not sure what was going on with your local vs. remote branch, but pre-commit was failing on my end. I formatted the code with Ruff, and the CI is currently passing. I'll close #449 for now. |
zacdezgeo
left a comment
There was a problem hiding this comment.
Looks much better now, and the earlier issues I flagged seem addressed. I just have one last concern before merge: in the named FeatureCollection/catalog tile path, the docs now say unsupported client-side-only style keys are silently ignored, but the implementation still appears to forward the original vis_params through the fallback branch when none of the .style()-supported keys are present. I think that path should consistently filter to the supported server-side keys and pass { } otherwise, so the behavior matches the docs. Other than that, this looks great!
|
Hi @zacdezgeo you're right, what a good eye! fixed the fallback branch now passes |
visParamswere not implemented forFeatureCollectionvector layers. Even simple examples like the following were displayed with a random/default color:Previously, the feature was displayed with a random color. This PR implements styling support for
FeatureCollectionvector layers using GEE FeatureView-stylevisParams, including color, fill, stroke, opacity, width, and point/polygon/line styles.Reference: https://developers.google.com/earth-engine/guides/featureview_styling
This PR only implements styling, not full FeatureView support; see #446.
Full GEE FeatureView support still needs to be implemented separately because it requires a different approach. The current
FeatureCollection(vector) implementation downloads the vector data to a local GeoJSON file, which is very limited compared to Earth Engine’s optimized FeatureView tile rendering.