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

missing GEO type #791

Open
bodcsoft opened this issue Jan 3, 2025 · 2 comments
Open

missing GEO type #791

bodcsoft opened this issue Jan 3, 2025 · 2 comments

Comments

@bodcsoft
Copy link

bodcsoft commented Jan 3, 2025

I have been looking at using mlcroissant to see if we can make our data holdings friendly to AI researchers
we are starting to host more of our data within ERDDAP, which allows for access in multiple different formats.

working my way through building a croissant file, I noticed there doesn't seem to be a GEO datatype in the DataType class.

to get my example working, I made a few changes to the mlcroissant locally and thought I would mention them here.

I added a new line to

so it now contains a GEO

class DataType:
    """Data types supported by Croissant."""

    AUDIO_OBJECT = namespace.SDO.AudioObject
    BOOL = namespace.SDO.Boolean
    BOUNDING_BOX = ML_COMMONS_V_1_0.BoundingBox
    DATE = namespace.SDO.Date
    FLOAT = namespace.SDO.Float
    IMAGE_OBJECT = namespace.SDO.ImageObject
    INTEGER = namespace.SDO.Integer
    SPLIT = ML_COMMONS_V_1_0.Split
    TEXT = namespace.SDO.Text
    URL = namespace.SDO.URL
->    GEO = namespace.SDO.GeoCoordinates

Then in

EXPECTED_DATA_TYPES: dict[term.URIRef, type] = {
set the dict as such

EXPECTED_DATA_TYPES: dict[term.URIRef, type] = {
    DataType.BOOL: bool,
    DataType.DATE: pd.Timestamp,
    DataType.FLOAT: float,
    DataType.INTEGER: int,
    DataType.TEXT: bytes,
    DataType.URL: bytes,
->    DataType.GEO: float
}

This has worked for my example, and I would be happy to suggest the edits in a PR, I wouldn't know what the knock-on effects for the tests would be tho

Cheers
Tom

@thogar-computer
Copy link

Oops, It seems that my password manager was a little too eager with the auto sign and picked the totally wrong account.

@omshinde
Copy link

Thanks. We're developing a geo-extension for Croissant - GeoCroissant which will include geo-coordinates. See here

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

No branches or pull requests

3 participants