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
Geometry labels #8
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No obvious concerns from me, but I'm out of the loop on what's going on with the tileserver...
fetch_feature_layer.py
Outdated
@@ -30,6 +33,28 @@ def get_column_type(value): | |||
raise Exception(f'unknown type {type(value)}') | |||
|
|||
|
|||
def create_point_table_schema(meta_data: MetaData, data: dict, table_name: str, srid: int) -> Table: | |||
""" | |||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes. The cheater's way of adding code "documentation" so linting won't complain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That method was dumb anyway. I've removed it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also just catching on this, but interested to see how it works. I've only tried to sync data from DataBC and not ESRI, and also not in python.
More a general question/comment than feedback relevant to the PR, but here I am anyway: Is there a search feature being passed to ESRI or are we grabbing the whole object list for the whole layer in fetch_object_list ? If it works it works it's not like a human is doing all those http calls to grab each object, but I'm curious if it's possible to search by a feature or if it's planned.
I can imagine the object list for some has to be insane (insane like the features with so many duplicate vertices that help create these issues to begin with).
Right now it's grabbing the entire layer. For our use case at least, that's the desired functionality.
The "duplication" issue I mentioned relates to how vector tiles are served up and rendered. A geometry may span multiple tiles, so it ends up with a label for each tile. For the layers I'm pulling right now, the data is nice and clean. |
Create a separate table for each layer, that contains only the centroid of the source layer. This allows for a separate layer that only contains labels, not entire geometries and thus avoiding duplication of labels that may occur when serving up geometries that span multiple tiles.