Export dataset into ISO 19115 XML.
Compatibility with core CKAN versions:
CKAN version | Compatible? |
---|---|
2.9 | yes |
2.10 | yes |
To install ckanext-iso19115:
-
Install it into virtualenv:
pip install ckanext-iso19115
-
Add
iso19115
to theckan.plugins
.
None at present
# Storage path for pre-compiled schema definition
# (optional, default: somewhere inside system's tempdir).
ckanext.iso19115.misc.cache_dir = /var/data/iso19115_cache
Customize the way of mapping dataset into ISO 19115 by implementing IIso18115
interface.
from ckanext.iso19115.interfaces import IIso19115
class Iso19115(p.SingletonPlugin):
p.implements(IIso19115, inherit=True)
def iso19115_metadata_converter(self, data_dict: dict[str, Any]):
return Converter(data_dict)
Converter
must be defined as a sub-class of
ckanext.iso19115.converter.Converter
. It already contains some basic logic
that can be used as a starting point for extension.
Export dataset into ISO 19115 JsonML.
Format can be changed using format
parameter of the action. Possible alternatives:
- xml
Check if the dataset can be rendered as a valid ISO 19115 document
To run the tests, do:
pytest