class_docstr: Test the MITIFF Writer class.
docstr: Test conversion of geolocations.
docstr_tok: ["Test","conversion","of","geolocations","."]
code: def test_convert_proj4_string(self):
      """Test conversion of geolocations."""
      import dask.array as da
      import xarray as xr
      from pyresample.geometry import AreaDefinition
  
      from satpy.writers.mitiff import MITIFFWriter
  
      checks = [
          {
              "epsg": "EPSG:32631",
              "proj4": (
                  " Proj string: +proj=etmerc +lat_0=0 +lon_0=3 +k=0.9996 "
                  "+ellps=WGS84 +datum=WGS84 +units=km +x_0=501020.000000 "
                  "+y_0=1515.000000\n"
              ),
          },
          {
              "epsg": "EPSG:32632",
              "proj4": (
                  " Proj string: +proj=etmerc +lat_0=0 +lon_0=9 +k=0.9996 "
                  "+ellps=WGS84 +datum=WGS84 +units=km +x_0=501020.000000 "
                  "+y_0=1515.000000\n"
              ),
          },
          {
              "epsg": "EPSG:32633",
              "proj4": (
                  " Proj string: +proj=etmerc +lat_0=0 +lon_0=15 +k=0.9996 "
                  "+ellps=WGS84 +datum=WGS84 +units=km +x_0=501020.000000 "
                  "+y_0=1515.000000\n"
              ),
          },
          {
              "epsg": "EPSG:32634",
              "proj4": (
                  " Proj string: +proj=etmerc +lat_0=0 +lon_0=21 +k=0.9996 "
                  "+ellps=WGS84 +datum=WGS84 +units=km +x_0=501020.000000 "
                  "+y_0=1515.000000\n"
              ),
          },
          {
              "epsg": "EPSG:32635",
              "proj4": (
                  " Proj string: +proj=etmerc +lat_0=0 +lon_0=27 +k=0.9996 "
                  "+ellps=WGS84 +datum=WGS84 +units=km +x_0=501020.000000 "
                  "+y_0=1515.000000\n"
              ),
          },
      ]
      for check in checks:
          area_def = AreaDefinition(
              "test",
              "test",
              "test",
              check["epsg"],
              100,
              200,
              (-1000.0, -1500.0, 1000.0, 1500.0),
          )
  
          ds1 = xr.DataArray(
              da.zeros((10, 20), chunks=20),
              dims=("y", "x"),
              attrs={"area": area_def},
          )
  
          w = MITIFFWriter(filename="dummy.tif", base_dir=self.base_dir)
          proj4_string = w._add_proj4_string(ds1, ds1)
          assert proj4_string == check["proj4"]
  
imports: import logging
  import os
  import unittest
  import numpy
  from PIL import Image
label_desc: Use image node_id 24 for calling the TestMITIFFWriter obj's underlying member method code with example usage: obj.test_convert_proj4_string() without return types