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

Feature/add point endpoint #150

Merged
merged 5 commits into from
Jan 10, 2024
Merged

Feature/add point endpoint #150

merged 5 commits into from
Jan 10, 2024

Conversation

vincentsarago
Copy link
Member

continues #146

The mai change is that I'm introducing multi_points_pgstac which replace rio-tiler's multi_values method (because we use item dict instead of url, so it's not hashable as dict key).

In multi_points_pgstac I'm constructing an Item ID using the id and collection which we says are mandatory (this is not asserted but should)

@hrodmn could you have a look and tell me your tough

"values": [
(src, pts.data.tolist(), pts.band_names) for src, pts in values
],
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


out: Dict[str, Any] = {}
for val, asset in filter_tasks(tasks, allowed_exceptions=allowed_exceptions):
item_id = f"{asset['collection']}/{asset['id']}"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

collection and id are mandatory

Copy link
Collaborator

@hrodmn hrodmn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vincentsarago that looks like a cleaner version of what I attempted in #146 - thank you for fixing it up!

@vincentsarago vincentsarago merged commit be9cf40 into main Jan 10, 2024
7 checks passed
@vincentsarago vincentsarago deleted the feature/add-point-endpoint branch January 10, 2024 11:18
@vincentsarago
Copy link
Member Author

@hrodmn I'm having second though on the endpoint path /{lon},{lat}/values

I know we already have /{lon},{lat}/assets which might be the reason for the choice but at the same time in titiler (single item) we use /point/{lon},{lat}

would you be ok if we change this to /point/{lon},{lat} ?

@hrodmn
Copy link
Collaborator

hrodmn commented Jan 10, 2024

@hrodmn I'm having second though on the endpoint path /{lon},{lat}/values

I know we already have /{lon},{lat}/assets which might be the reason for the choice but at the same time in titiler (single item) we use /point/{lon},{lat}

would you be ok if we change this to /point/{lon},{lat} ?

That's fine with me. When I started working on it I went with /point/{lon},{lat} but changed my mind after finding /{lon},{lat}/assets. I think it makes sense to stay consistent with titiler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants