def _create_degenerate_geotiff(self, e):
tag_payloads = []<EOL>b = BytesIO()<EOL>if e == '<STR_LIT:<>':<EOL><INDENT>buffer = struct.pack('<STR_LIT>', b'<STR_LIT>', <NUM_LIT>, <NUM_LIT:8>)<EOL><DEDENT>else:<EOL><INDENT>buffer = struct.pack('<STR_LIT>', b'<STR_LIT>', <NUM_LIT>, <NUM_LIT:8>)<EOL><DEDENT>b.write(buffer)<EOL>offset = b.tell()<EOL>num_tags = <NUM_LIT:16><EOL>offset += <NUM_LIT:2><EOL>offset += num_tags * <NUM_LIT:12><EOL>offset += <NUM_LIT:4><EOL>offset += <NUM_LIT:1><EOL>buffer = struct.pack(e + '<STR_LIT:H>', num_tags)<EOL>b.write(buffer)<EOL>buffer = struct.pack(e + '<STR_LIT>', SUBFILETYPE, TIFF_LONG, <NUM_LIT:1>, <NUM_LIT:1>)<EOL>b.write(buffer)<EOL>buffer = struct.pack(e + '<STR_LIT>', IMAGEWIDTH, TIFF_SHORT, <NUM_LIT:1>, <NUM_LIT:1>)<EOL>b.write(buffer)<EOL>buffer = struct.pack(e + '<STR_LIT>', IMAGELENGTH, TIFF_SHORT, <NUM_LIT:1>, <NUM_LIT:1>)<EOL>b.write(buffer)<EOL>buffer = struct.pack(e + '<STR_LIT>', BITSPERSAMPLE, TIFF_SHORT, <NUM_LIT:1>, <NUM_LIT:8>)<EOL>b.write(buffer)<EOL>buffer = struct.pack(e + '<STR_LIT>',<EOL>COMPRESSION, TIFF_SHORT, <NUM_LIT:1>, COMPRESSION_NONE)<EOL>b.write(buffer)<EOL>buffer = struct.pack(e + '<STR_LIT>', PHOTOMETRIC, TIFF_SHORT, <NUM_LIT:1>, <NUM_LIT:1>)<EOL>b.write(buffer)<EOL>buffer = struct.pack(e + '<STR_LIT>', STRIPOFFSETS, TIFF_LONG, <NUM_LIT:1>, <NUM_LIT:1>)<EOL>b.write(buffer)<EOL>buffer = struct.pack(e + '<STR_LIT>', SAMPLESPERPIXEL, TIFF_SHORT, <NUM_LIT:1>, <NUM_LIT:1>)<EOL>b.write(buffer)<EOL>buffer = struct.pack(e + '<STR_LIT>', ROWSPERSTRIP, TIFF_LONG, <NUM_LIT:1>, <NUM_LIT:1>)<EOL>b.write(buffer)<EOL>buffer = struct.pack(e + '<STR_LIT>', STRIPBYTECOUNTS, TIFF_LONG, <NUM_LIT:1>, <NUM_LIT:1>)<EOL>b.write(buffer)<EOL>buffer = struct.pack(e + '<STR_LIT>', XRESOLUTION, TIFF_RATIONAL, <NUM_LIT:1>, offset)<EOL>b.write(buffer)<EOL>tag_payloads.append((e + '<STR_LIT:I>', <NUM_LIT>))<EOL>tag_payloads.append((e + '<STR_LIT:I>', <NUM_LIT:1>))<EOL>buffer = struct.pack(e + '<STR_LIT>',<EOL>YRESOLUTION, TIFF_RATIONAL, <NUM_LIT:1>, offset + <NUM_LIT:8>)<EOL>b.write(buffer)<EOL>tag_payloads.append((e + '<STR_LIT:I>', <NUM_LIT>))<EOL>tag_payloads.append((e + '<STR_LIT:I>', <NUM_LIT:1>))<EOL>buffer = struct.pack(e + '<STR_LIT>', <NUM_LIT>, TIFF_DOUBLE, <NUM_LIT:3>, offset + <NUM_LIT:16>)<EOL>b.write(buffer)<EOL>tag_payloads.append((e + '<STR_LIT:d>', <NUM_LIT:10>))<EOL>tag_payloads.append((e + '<STR_LIT:d>', <NUM_LIT:10>))<EOL>tag_payloads.append((e + '<STR_LIT:d>', <NUM_LIT:0>))<EOL>buffer = struct.pack(e + '<STR_LIT>', <NUM_LIT>, TIFF_DOUBLE, <NUM_LIT:6>, offset + <NUM_LIT>)<EOL>b.write(buffer)<EOL>datums = [<NUM_LIT:0.0>, <NUM_LIT:0.0>, <NUM_LIT:0.0>, <NUM_LIT>, <NUM_LIT>, <NUM_LIT:0.0>]<EOL>for data in datums:<EOL><INDENT>tag_payloads.append((e + '<STR_LIT:d>', data))<EOL><DEDENT>buffer = struct.pack(e + '<STR_LIT>', <NUM_LIT>, TIFF_SHORT, <NUM_LIT>, offset + <NUM_LIT>)<EOL>b.write(buffer)<EOL>datums = [<EOL><NUM_LIT:1>, <NUM_LIT:1>, <NUM_LIT:0>, <NUM_LIT:5>,<EOL><NUM_LIT>, <NUM_LIT:0>, <NUM_LIT:1>, <NUM_LIT:1>,<EOL><NUM_LIT>, <NUM_LIT:0>, <NUM_LIT:1>, <NUM_LIT:1>,<EOL><NUM_LIT>, <NUM_LIT>, <NUM_LIT:20>, <NUM_LIT:0>,<EOL><NUM_LIT>, <NUM_LIT>, <NUM_LIT>, <NUM_LIT:20>,<EOL><NUM_LIT>, <NUM_LIT:0>, <NUM_LIT:1>, <NUM_LIT>,<EOL>]<EOL>for data in datums:<EOL><INDENT>tag_payloads.append((e + '<STR_LIT:H>', data))<EOL><DEDENT>buffer = struct.pack(e + '<STR_LIT>', <NUM_LIT>, TIFF_ASCII, <NUM_LIT>, offset + <NUM_LIT>)<EOL>b.write(buffer)<EOL>items = (e + '<STR_LIT>', b'<STR_LIT>')<EOL>tag_payloads.append(items)<EOL>buffer = struct.pack(e + '<STR_LIT:I>', <NUM_LIT:0>)<EOL>b.write(buffer)<EOL>buffer = struct.pack(e + '<STR_LIT:B>', <NUM_LIT:0>)<EOL>b.write(buffer)<EOL>for format, datum in tag_payloads:<EOL><INDENT>buffer = struct.pack(format, datum)<EOL>b.write(buffer)<EOL><DEDENT>b.seek(<NUM_LIT:0>)<EOL>return b.read()<EOL>
Create an in-memory degenerate geotiff.

Parameters
----------
e : str
   Either '<' for little endian or '>' for big endian.

Returns
-------
bytes
    sequence of bytes making up a degenerate geotiff.  Should have
    something like the following structure:

    Magic: 0x4949 <little-endian> Version: 0x2a <ClassicTIFF>
    Directory 0: offset 8 (0x8) next 0 (0)
    SubFileType (254) LONG (4) 1<1>
    ImageWidth (256) SHORT (3) 1<1>
    ImageLength (257) SHORT (3) 1<1>
    BitsPerSample (258) SHORT (3) 1<8>
    Compression (259) SHORT (3) 1<1>
    Photometric (262) SHORT (3) 1<1>
    StripOffsets (273) LONG (4) 1<1>
    SamplesPerPixel (277) SHORT (3) 1<1>
    RowsPerStrip (278) LONG (4) 1<1>
    StripByteCounts (279) LONG (4) 1<1>
    XResolution (282) RATIONAL (5) 1<75>
    YResolution (283) RATIONAL (5) 1<75>
    33550 (0x830e) DOUBLE (12) 3<10 10 0>
    33922 (0x8482) DOUBLE (12) 6<0 0 0 444650 4.64051e+06 0>
    34735 (0x87af) SHORT (3) 24<1 1 0 5 1024 0 1 1 1025 0 1 1 ...>
    34737 (0x87b1) ASCII (2) 45<UTM Zone 16N NAD27"|Clar ...>