SigMF
SigMF copied to clipboard
Cannot add `core:geolocation` field (GeoJSON validation)
The following example fails in sigmf.validate.match_type()
:
import sigmf
from sigmf import SigMFFile
meta = SigMFFile(
global_info = {
SigMFFile.DATATYPE_KEY: "cf32_le",
SigMFFile.VERSION_KEY: sigmf.__version__,
SigMFFile.GEOLOCATION_KEY: {
"type": "Point",
"coordinates": [-107.6183682, 34.0787916, 2120.0]
}
}
)
It seems that the current schema validation code is not prepared to handle GeoJSON objects. Or, I misunderstand how these objects should be provided (unfortunately, I did not find any complete example or test code).
The issue is the former, though its not exactly clear why.
@Teque5 any idea why this does not parse? https://github.com/gnuradio/SigMF/blob/sigmf-v1.x/sigmf/schema-meta.json#L89-L105
Yes this does not parse because in sigmf/validate.py
within match_type
there is no valid type for dict
. If we ever merge #224 then this will get resolved.
#224 allows list
and dict
types to be validated correctly.
We can close this issue or mark 224 as blocking.