stac-extensions/projection

`proj:epsg` is marked as "required", but this only applies to items

Closed this issue · 11 comments

l0b0 commented

The readme says proj:epsg is required, but it's only actually required inside items. Is this a bug in the schema, a missing piece of documentation, or have I misunderstood something?

Yes, I think it is only required in items, indeed.

if I understand well, proj:epsg is required in the item OR the asset property. Not sure how to translate this in the schema 😬

I've also recently struggled with the schema issue, so putting this on my to do list...

Just came across this issue when running validator.

What happens when you use proj:wkt2 with some projection without an EPSG code? In my case it's MODIS.

I'd say it should be "at least one of proj:epsg, proj:wkt2, proj:projjson should be present", not sure how that can be expressed in json schema.

EDIT: so I guess I need to set it to null? #6

Yeah, it was meant to be that you set proj:epsg to null if you specify a WKT2 or PROJJSON that has no corresponding EPSG code.

The issue that the schema has is that it always requires this for the item properties although it could be present either there or in one of the other places (assets, etc:)

We need to find someone who has the time to do these changes though.

"required" but can/should be set to null is a bit confusing to be honest. In my case it turns out pgstac is stripping nulls when hydrating items out of db, so can't produce compliant stac item out of the API even after updating generation logic :(.

Dev call: Remove the requirement for proj:epsg

Afterthoughts: What do the null values for the CRS fields then mean? Usually, we just omit them instead of allowing null, so feels a bit inconsistent...

Does anyone know how clients will interpret "proj:epsg": null on the item properties and a non-null value on the assets? I'm hoping to find a way to have metadata that validates with the current schema and works with existing clients. In my case, some of the assets are metadata files, so it doesn't necessarily make sense to have proj:epsg at the item property level.

@tschaub I'll fix this asap. Forgot a bit about it, but will make sure we release a version without the epsg requirement soon.

Oh and to specifically answer your question: All clients I've seen so far and it's also the rule in STAC in general that Asset properties override general Item properties.

This has finally been fixed. You don't need to provide proj:epsg at the item level any longer.