-
Notifications
You must be signed in to change notification settings - Fork 12
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
Can't write a STAC Parquet file from a list of Items
#462
Comments
Also failing if converted to ic = ItemCollection(items)
stacrs.write("items.parquet", ic)
|
Does work with a dict! ic = ItemCollection(items)
stacrs.write("items.parquet", ic.to_dict()) |
I think you need to: stacrs.pystac.write("items.parquet", items) However, I'm thinking that this "do all pystac things through |
Yeah, there should be no need to know the distinction between the rust implementation and the python implementation, I don't think. |
Also, I don't know why it's |
Well, there's a difference between the object you're passing in. A
It's a module that's meant for interoperability with pystac objects, so I figured it was the most obvious name. Open to other suggestions, of course! NB I want to maintain "no dependencies by default" for this package, so I would have a strong preference to not depend on pystac (optional dependency is fine). |
Ok, but is it really that important? This is pretty closely coupled to pystac. Is it because it'll be used in Rust more? Maybe there should be a separate Python wrapper, and a core Rust implementation that is dependency free? All of my interactions with STAC items in Python use |
It's not coupled to pystac at all ... it only knows how to work with pystac objects if pystac is present on the system. I do think it's important to stay dependency-free — there's a lot of folks out there that don't use pystac, and I don't see any reason to pull it in if we don't need to.
You mean like a separate package? Yeah, that's a good idea — or we could even add it as an optional dependency to pystac 🤔 — maybe I like that, interesting.
I generally agree, and try to get people to use pystac, but many prefer |
Ok, I see where you're coming from. But I really find So, it's not super impactful passing in and out dictionaries, but it feels clumsy is all. Being able to transact in Items and ItemCollections would be better, in my humble opinion 😄. |
I think part of my hesitation is that I don't want to write a pystac replacement here ... there's so much effort that's gone in to pystac that I want to make sure we keep putting sweat in over there. I just want to supplement, which is why making stacrs an optional dependency on pystac is sort of appealing (aka |
@alexgleith after some internal discussions with @kylebarron and @vincentsarago, I think I'm leaning towards the KISS route for stacrs and will remove |
To be honest my main concern is that if you try to allow pystac Object, we'll basically just use I don't think just allowing |
Ok, no worries and I understand the reasoning here. I was confused initially as I saw the I do like the idea of getting this |
Code is here:
It fails with the error:
But
type(items[0])
results in:The text was updated successfully, but these errors were encountered: