use of org.codice.imaging.nitf.core.tre.impl.TreEntryImpl in project alliance by codice.
the class ImageInputTransformerTest method createNitfWithPiatgb.
private static void createNitfWithPiatgb(File file) {
NitfHeader header = NitfHeaderFactory.getDefault(FileType.NITF_TWO_ONE);
Tre piatgb = TreFactory.getDefault("PIATGB", TreSource.ImageExtendedSubheaderData);
piatgb.add(new TreEntryImpl("TGTUTM", "55HFA9359093610", "string"));
piatgb.add(new TreEntryImpl("PIATGAID", "ABCDEFGHIJUVWXY", "string"));
piatgb.add(new TreEntryImpl("PIACTRY", "AS", "string"));
piatgb.add(new TreEntryImpl("PIACAT", "702XX", "string"));
piatgb.add(new TreEntryImpl("TGTGEO", "351655S1490742E", "string"));
piatgb.add(new TreEntryImpl("DATUM", "WGE", "string"));
piatgb.add(new TreEntryImpl("TGTNAME", "Canberra Hill ", "string"));
piatgb.add(new TreEntryImpl("PERCOVER", "57", "UINT"));
piatgb.add(new TreEntryImpl("TGTLAT", "-35.30812 ", "float"));
piatgb.add(new TreEntryImpl("TGTLON", "+149.12447 ", "float"));
ImageSegment imageSegment = ImageSegmentFactory.getDefault(FileType.NITF_TWO_ONE);
imageSegment.addImageBand(TreUtilityTest.createImageBand());
imageSegment.getTREsRawStructure().add(piatgb);
new NitfCreationFlowImpl().fileHeader(() -> header).imageSegment(() -> imageSegment).write(file.getAbsolutePath());
}
Aggregations