You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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!
The text was updated successfully, but these errors were encountered:
You haven't missed anything - it's a good catch, and exactly to spec. This is a bug, unfortunately - I believe it was introduced in PySTAC 0.5.5, so if you downgrade to 0.5.4 it might work?
This should be fixed in the next version of PySTAC, which will be an update to use STAC 1.0.0-RC3 or 4, whichever RC is out when we're ready. I can close this issue when it's fixed. Let me know if the downgrade doesn't work, or if using the next PySTAC for an RC version of the spec would be a problem. Thanks!
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
tonull
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
toNone
, however this does not actually set it toNone
, it unsets the property completely because it calls this function:pystac/pystac/extensions/base.py
Line 124 in a8f50cb
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'
: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!
The text was updated successfully, but these errors were encountered: