Opened 10 years ago
Closed 5 years ago
#5589 closed enhancement (wontfix)
Allow base64 encoding of CGM data when creating NITF files
Reported by: | hikergreg | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | closed_because_of_github_migration |
Component: | default | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
When creating NITF files with CGM data, the user provides the binary CGM data in a char* with minimal escaping (see SEGMENT_0_DATA field at http://www.gdal.org/frmt_nitf_advanced.html).
This works fine with the C/C++ interface, but an issue arises with the Java bindings. In Java, the binary data is put in a String object, but the Java native level interprets Strings as being UTF-encoded by default. This borks up the data transfer.
My suggestion is to add a flag that would allow for the CGM data to be provided using base64 encoding instead of the default backslash-quotable. For example: SEGMENT_0_DATA_ENCODING=base64.
I've attached a patch with a proposed implementation for NITF/CGM creation. I can come up with some edits to the documentation as well.
Attachments (1)
Change History (4)
by , 10 years ago
Attachment: | nitf_cgm.patch added |
---|
comment:3 by , 5 years ago
Milestone: | → closed_because_of_github_migration |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.
Proposed patch