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

Add label features to vector tile search API response #86044

Closed
nreese opened this issue Apr 20, 2022 · 1 comment · Fixed by #86458
Closed

Add label features to vector tile search API response #86044

nreese opened this issue Apr 20, 2022 · 1 comment · Fixed by #86458
Assignees
Labels
:Analytics/Geo Indexing, search aggregations of geo points and shapes >enhancement Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)

Comments

@nreese
Copy link
Contributor

nreese commented Apr 20, 2022

Description

There are 2 labeling issues in Kibana when using Vector tiles.

  1. Multiple labels for MultiPolygon and MultiLineString geometries.
    Screen Shot 2022-04-20 at 9 32 26 AM
  2. Multiple labels for features that span tiles. For example, hexagons that span tile boundaries.
    Screen Shot 2022-04-20 at 9 35 52 AM

The recommended solution is to provide features for labels, where the feature geometry is the label location.

To resolve these issues, I propose adding a new parameter, withLabels, to _mvt API that when true would add label features to the response. Label features could be added in 2 ways

  1. another layer, "label", in the response. The "label" layer will contain Point feature for each hit and agg feature. For agg features, the Point feature will be the center of the hexagon. For hit features, the Point feature will be the centroid of the largest polygon for MultiPolygon and the centroid for the longest line for MultiLineString.
  2. Include label feature in existing "hits" and "aggs" layers. Give label feature a property like "__EsIsLabelFeature" so filter expressions can be used exclude features in style rules.

Kibana is creating these centroid features today for GeoJSON sources. Kibana includes label features in GeoJSON feature collection and uses filters to exclude features in style rules (option 2 above)

cc @jsanz @thomasneirynck

@nreese nreese added >enhancement :Analytics/Geo Indexing, search aggregations of geo points and shapes needs:triage Requires assignment of a team area label labels Apr 20, 2022
@elasticmachine elasticmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Apr 20, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo (Team:Analytics)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/Geo Indexing, search aggregations of geo points and shapes >enhancement Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants