jbpy is a library for reading and writing Joint BIIF Profile files. Including:
- National Imagery Transmission Format (NITF)
- North Atlantic Treaty Organisation (NATO) Secondary Imagery Format (NSIF)
The Joint BIIF Profile is available from the NSG Standards Registry. See: https://nsgreg.nga.mil/doc/view?i=5674
jbpy can be installed using pip:
$ python -m pip install jbpyjbpy can also be installed using conda and the conda-forge channel:
$ conda install --channel conda-forge jbpyThis repository is licensed under the MIT license.
Some tests rely on the JITC Quick Look Test Data.
If this data is available, it can be used by setting the JBPY_JITC_QUICKLOOK_DIR environment variable.
JBPY_JITC_QUICKLOOK_DIR=<path> pytestThe JBP document provides extensibility through Support Data Extensions (SDEs) such as Tagged Record Extensions (TREs)
and Data Extension Segments (DES).
To mimic this extensibility, jbpy defines two entry point groups which are used to load SDE plugins:
jbpy.extensions.trejbpy.extensions.des_subheader
jbpy provides a number of built-in SDEs and will load additional SDEs from separately installed packages provided
they are declared under these entry point groups as described below.
Warning
There is not currently a mechanism to arbitrate multiple SDEs that are registered under the same plugin name.
A TRE plugin is named using a 6-character (left-justified and space-padded) TRETAG.
The object reference must resolve to a function with no required arguments that instantiates a jbpy.core.Tre object.
pyproject.toml example:
[project.entry-points."jbpy.extensions.tre"]
"MYTRE " = "my_package.my_module:my_tre_func"Once registered, a TRE object can be instantiated using jbpy.tre_factory:
>>> import jbpy
>>> tre = jbpy.tre_factory("MYTRE") # note: tag passed to factory must have trailing spaces strippedA DES subheader plugin is named using a 27-character string formed by concatenating the 25-character DESID and 2-digit
DESVER.
The object reference must resolve to a function that accepts a string-valued name and instantiates a
jbpy.core.DataExtensionSubheader object.
pyproject.toml example:
[project.entry-points."jbpy.extensions.des_subheader"]
"MY DES SUBHEADER 24" = "my_des_subheader_func"Once registered, a DES subheader object can be instantiated using jbpy.des_subheader_factory:
>>> import jbpy
>>> des_subhdr = jbpy.des_subheader_factory("MY DES SUBHEADER", 24)