-
Notifications
You must be signed in to change notification settings - Fork 123
Description
Ive got a geotiff in a custom CRS that does not have and epsg code. According to the docs on the projection extension, I should be able to set proj:epsg
to null
if I supply a wkt instead (which is what I'm doing) However, I'm getting an error when callingpystac.Catalog.validate_all()
.
I think the correct way to do this should be to set pystac.Item.ext.projection.epsg
to None
, however this does not actually set it to None
, it unsets the property completely because it calls this function:
pystac/pystac/extensions/base.py
Line 124 in a8f50cb
def _set_property(self, key, value, asset): |
So that obviously fails the validator because proj:epsg
is required.
I've also tried setting it directly to the json representation of a null value ("null"
), but then the validator fails because apparently 'null'
...is not 'null'
:
jsonschema.exceptions.ValidationError: 'null' is not of type 'integer', 'null'
Failed validating 'type' in schema['allOf'][1]['properties']['properties']['properties']['proj:epsg']:
{'title': 'EPSG code', 'type': ['integer', 'null']}
On instance['properties']['proj:epsg']:
'null'
Am I missing something here/is there a better way of doing this? I can for example set the epsg code to 0 but that obviously feels wrong. I'm new to STAC so apologies if I've missed something!