[gdal-dev] [PROPOSAL] Add CADRG write support via RPFTOC/NITF drivers
Frank Warmerdam
warmerdam at pobox.com
Wed Jun 11 07:26:52 PDT 2025
Patrik,
I have no objection to such a proposal, but in my experience with specific
NITF based product profiles it is often not worth trying to support
completely based on write support built into the GDAL drivers themselves.
For producing NCDRD compliant NITF files our approach at Planet has been to
produce many of the auxilary segments (TREs and DESs) in python code
ourselves and then pass via the GDAL NITF TRE= and DES= creation options.
We did of course have to have some core header field construction logic
supported in the NITF driver, and JPEG2000 write support.
Anyways, depending on how complex you find your CADRG driver write support
gets, you might want to consider doing parts of the work externally ---
ideally as an example python or similar script that could be shared, and
customized with others without having to implement full generalized write
support within the drivers themselves.
Like Even I was surprised to see CADRG creation capability was still
relevant in 2025.
I am curious if there are many folks out there with an interest in
NCDRD compliant NITF production (and also SNIP production -- an upcoming
project). I'm wondering if it would be worth a blog post, or perhaps a
presentation at FOSS4G one day. I will offer I am happy to chat with folks
going through similar projects.
Best regards,
Frank
On Wed, Jun 11, 2025 at 8:52 AM Patrik Sylve via gdal-dev <
gdal-dev at lists.osgeo.org> wrote:
> Hi,
>
> We are exploring the possibility of adding write support for CADRG format
> in GDAL and would appreciate some community feedback before starting
> implementation.
>
> There is currently no open-source workflow for creating CADRG. GDAL can
> already read CADRG via RPFTOC/NITF drivers, so extending that work feels
> like a good next step.
>
>
> Short background on CADRG format:
>
> CADRG is a Raster Product Format (RPF) that consists of a TOC file
> referencing data frames. Each data frame is stored as a National Imagery
> Transmission Format (NITF) message.
>
> GDAL currently supports:
>
> * Reading CADRG (a.toc) via the RPFTOC driver
> * Reading individual CADRG frames via the NITF driver
> * Writing NITF images, both without and with JPEG compression
>
>
> To implement a CADRG writer, we could extend the existing NITF and RPFTOC
> drivers:
>
> NITF:
> * Implement Vector Quantisation compression
> * Add option to set Frame size
> ** A CADRG frame must be 1536x1536 pixels, so output would be tiled
> * Add option to set CADRG scale
>
> RPFTOC:
> * Extend with 'write' mode
> ** Internally call NITF driver to generate CADRG compliant data frames
> ** Generate a .toc file per MIL-STD-2411
>
> Example usage, create a CADRG from a TIF-file:
>
> gdal_translate input.tif ./RPF \
> -of RPFTOC \
> -co "PRODUCT=CADRG" \
> * # NITF file header options*
> -co "FTITLE=My CADRG Product" \
> -co "FSCLAS=U" \
> ...
>
> Output:
> └── RPF/
> ├─── a.toc
> └─── frames/
> ├──── 00AVL01C.TL6
> └──── 00AVM01C.TL6
>
>
>
> Drivers:
> * https://gdal.org/en/stable/drivers/raster/rpftoc.html
> * https://gdal.org/en/stable/drivers/raster/nitf.html
>
> Standards:
> * CADRG:
> http://everyspec.com/MIL-PRF/MIL-PRF-080000-99999/MIL-PRF-89038_25371/
> * RPF: http://everyspec.com/MIL-STD/MIL-STD-2000-2999/MIL-STD-2411_6903/
>
>
> Would this be a welcomed addition? Any thoughts or feedback is appreciated.
>
>
> Best regards / Vänliga hälsningar
>
> *Patrik Sylve*
>
> Software Developer
>
>
> *E:* patrik.sylve at t-kartor.com
>
>
> www.t-kartor.com
>
>
> *This e-mail is private and confidential between the sender and the
> addressee. In the event of misdirection, the recipient*
>
> *is prohibited from using, copying or disseminating it or any information
> in it. Please notify the above of any such misdirection.*
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam,
warmerdam at pobox.com
light and sound - activate the windows | USA: +1 650-701-7823
<http://voice.google.com/calls?a=nc,%2B16507017823>
and watch the world go round - Rush | CAN: +1 343-550-9984
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20250611/bd1fa4fc/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook-fzlqfxva.png
Type: image/png
Size: 39667 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20250611/bd1fa4fc/attachment-0001.png>
More information about the gdal-dev
mailing list