Skip to content

Reconstruct STAC Items from geoparquet rows #46

Closed

Description

Apologies if this isn't the right repo to ask this question, but I was looking to reconstruct PySTAC Items from geoparquet rows (https://planetarycomputer.microsoft.com/docs/quickstarts/stac-geoparquet/#Bulk-STAC-item-queries-with-GeoParquet). Is there a convenience method of the flavor item = planetary_computer.item_from_geoparquet_row(dataframe, index) or something similar that I'm not finding? If not, would this be the place to open a PR to add such functionality, or is there a better repo?

I realize iterating over rows of a geopandas dataframe is an antipattern, but I think it's required for my use case (bulk load STAC items, modify them, then write them back out). If there's a better way, any guidance would be appreciated.

Activity

  1. TomAugspurger commented on Sep 21, 2022

    @TomAugspurger

    Can you try stac_geoparquet.to_item_collection()? https://github.com/TomAugspurger/stac-geoparquet/blob/d2c9ad43e055dda17c1fd30be1d26f082aaaca21/stac_geoparquet/stac_geoparquet.py#L109-L121. That does iterate over rows, but I think it's unavoidable.

    Oh, and it's probably buggy, so LMK if you run into issues.

  2. TomAugspurger commented on Mar 19, 2023

    @TomAugspurger

    Closing this in favor of issues in stac-geoparquet, primarily https://github.com/TomAugspurger/stac-geoparquet/issues/3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions