Skip to content

Collection.from_file parses assets incorrectly #378

@TomAugspurger

Description

@TomAugspurger

I think that Collection.from_file parses asset objects incorrectly. Given the catalog

{
    "id": "id",
    "stac_version": "1.0.0",
    "type": "Collection",
    "description": "description",
    "license": "license",
    "extent": {
        "temporal": [null, null],
        "spatial": [[null, null]]
    },
    "links": {},
    "assets": {
        "a": {
            "href": "href",
            "title": "tile",
            "description": "description"
        }
    }
}

pystac.Collection.from_file gives

In [12]: pystac.Collection.from_file("cat.json").assets['a'].href
Out[12]: {'href': 'href', 'title': 'tile', 'description': 'description'}

It looks like the whole object is being set for the href, rather than just the href.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThings which are broken

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions