Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Use logical types when possible #4

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

barbuz
Copy link

@barbuz barbuz commented Feb 1, 2024

Hello @TomAugspurger , we have been using stac-table for our project and it has been amazing, thanks for your work!

Using stac-table I have realised that the types returned were based on physical types rather than logical. This is not great to know what the data is because for example both string and bytes show as byte_array and both datetimes and integers show as int64.

This PR changes it so that the logical type is used whenever possible, I hope this can be a useful change.

Note: I have also needed to change the types of two columns in the tests to get them to pass before doing any changes to the code, I suspect that the "naturalearth_lowres" dataset in geopandas may have gotten updated at some point. It is also going to be deprecated in the future, so eventually the source data for this test should probably be included in the package.

@TomAugspurger
Copy link
Collaborator

Thanks @barbuz.

I think it would be good to work through stac-extensions/table#1 first, which tries to clarify exactly what type means. Then we can update tools like stac-table to conform to that.

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

Successfully merging this pull request may close these issues.

2 participants