Index: src/gnuboat/common/datahandler/loghandler.py
===================================================================
--- src/gnuboat/common/datahandler/loghandler.py	(revision 2a31181f02ac93729aaf46e3bcfb5c23dd7ab3f0)
+++ src/gnuboat/common/datahandler/loghandler.py	(revision c04676b54a51f77872002d7773416aa1b136db2e)
@@ -88,5 +88,6 @@
         nmea_file_date_should = datetime.datetime.utcnow().strftime("%Y-%m-%d")
         mode = 'A'
-        if self._nmea_file == None or self._nmea_file_date is None or self._nmea_file_date != nmea_file_date_should:
+        if (self._nmea_file is None or self._nmea_file_date is None or
+                self._nmea_file_date != nmea_file_date_should):
             if self._nmea_file:
                 self._nmea_file.close()
@@ -189,8 +190,4 @@
         }
 
-    """	Reads the original gnuboat log files and calls a callable function on all complete LogDataset
-		callback must be of a function wich excepts the LogDataset as a parameter.
-	"""
-
     def gnuboat_read_file(
         self,
@@ -200,4 +197,9 @@
         errors_ignore=False
     ):
+        """
+            Reads the original gnuboat log files and calls a callable function
+            on all complete LogDataset callback must be of a function wich
+            excepts the LogDataset as a parameter.
+        """
         result = LogParsingResult()
 
@@ -217,11 +219,12 @@
         return result
 
-    """	Reads the original gnuboat log from input_list and calls a callable function on all complete LogDataset
-		callback must be of a function wich excepts the LogDataset as a parameter.
-	"""
-
     def gnuboat_read(
         self, input_list, callback, checksums_fix=False, errors_ignore=False
     ):
+        """
+            Reads the original gnuboat log from input_list and calls a callable
+            function on all complete LogDataset callback must be of a function
+            wich excepts the LogDataset as a parameter.
+        """
         result = LogParsingResult()
 
@@ -272,9 +275,11 @@
                     last_row.water_depth_set(None)
                     last_row.water_temperature_set(None)
-                elif nmea_sentence.sentence_type == 'DPT' and last_row is not None:
+                elif (nmea_sentence.sentence_type == 'DPT' and
+                      last_row is not None):
                     last_row.water_depth_set(
                         self._to_float(nmea_sentence.depth, current_row)
                     )
-                elif nmea_sentence.sentence_type == 'MTW' and last_row is not None:
+                elif (nmea_sentence.sentence_type == 'MTW' and
+                      last_row is not None):
                     last_row.water_temperature_set(
                         self._to_float(nmea_sentence.temperature, current_row)
@@ -294,6 +299,7 @@
             except ValueError as error:
                 print(
-                    'INFO: Failed to convert value from line {} into numeric: {}\n      Message: {}'
-                    .format(current_row, string, error)
+                    ('INFO: Failed to convert value from line '
+                     '{} into numeric: {}\n      Message: {}').format(
+                        current_row, string, error)
                 )
                 return 0
@@ -306,6 +312,6 @@
         if matches is None:
             print(
-                'INFO: Failed to convert latitude position value from line {} into decimal degrees: {}'
-                .format(current_row, nmea_value)
+                ('INFO: Failed to convert latitude position value from line '
+                 '{} into decimal degrees: {}').format(current_row, nmea_value)
             )
             return
@@ -321,6 +327,6 @@
         if matches is None:
             print(
-                'INFO: Failed to convert longitude position value from line {} into decimal degrees: {}'
-                .format(current_row, nmea_value)
+                ('INFO: Failed to convert longitude position value from line '
+                 '{} into decimal degrees: {}').format(current_row, nmea_value)
             )
             return
Index: src/gnuboat/common/spatial/tilegenerator.py
===================================================================
--- src/gnuboat/common/spatial/tilegenerator.py	(revision 2a31181f02ac93729aaf46e3bcfb5c23dd7ab3f0)
+++ src/gnuboat/common/spatial/tilegenerator.py	(revision c04676b54a51f77872002d7773416aa1b136db2e)
@@ -33,39 +33,23 @@
     from dataclasses import dataclass
 
-    #@dataclass
-    #class TileWidth:
-    #"""
-    #tile_size: The tile size in Pixel,
-    #longitude: The width of the Tile in decimal degrees
-    #latitude:  The height of the Tile in decimal degrees
-    #"""
-    #tile_size: int
-    #longitude: float
-    #latitude: float
-
     @dataclass
     class ResultPath:
         """
-			path: Absolute path of the created results
-			prefixes: Dict with meaningful prefixes in the path. e.g. {'tile_size': '512', 'density': '10_100'}
-		"""
+            path: Absolute path of the created results
+            prefixes: Dict with meaningful prefixes in the path. e.g.
+            {'tile_size': '512', 'density': '10_100'}
+        """
         path: str
         prefixes: dict
 
 except ImportError:
-    #class TileWidth:
-    #"""
-    #Workaround for @dataclass, until python 3.7 is available in main distros
-    #"""
-    #def __init__(self, tile_size, longitude, latitude):
-    #self.tile_size = tile_size
-    #self.longitude = longitude
-    #self.latitude = latitude
-
+    # Workaround for @dataclass, until python 3.7 is available in
+    # main distros
     class ResultPath:
         """
-			path: Absolute path of the created results
-			prefixes: Dict with meaningful prefixes in the path. e.g. {'tile_size': '512', 'density': '10_100'}
-		"""
+            path: Absolute path of the created results
+            prefixes: Dict with meaningful prefixes in the path. e.g.
+            {'tile_size': '512', 'density': '10_100'}
+        """
         def __init__(self, path, prefixes):
             self.path = path
@@ -133,12 +117,12 @@
 class RasterSlice(dict):
     """
-		lng_lat_box: LngLatBbox
-		zoom_range: ZoomRange
-		tile_size: The tile size in Pixel,
-		grid_width: The width of the resulting rastr
-		grid_height:  The height of the resulting rastr
-		
-		It's derived from dict to be json serialisable
-	"""
+        lng_lat_box: LngLatBbox
+        zoom_range: ZoomRange
+        tile_size: The tile size in Pixel,
+        grid_width: The width of the resulting rastr
+        grid_height:  The height of the resulting rastr
+
+        It's derived from dict to be json serialisable
+    """
     def __init__(
         self, lng_lat_box, zoom_range, tile_size, grid_width, grid_height
@@ -180,10 +164,12 @@
 class TileGenerator:
     """
-		- tile_sizes = Array of tile sizes in pixel, which should be rendered
-		- zoom_range = Range of zooms, tiles are created for
-		- densities = Array with counts of data points per density_base, where tiles are created for
-		- density_base = Radios of circle as a datum plane for the densities values
-		- nodata_value = Value used for pixels without valid data
-	"""
+        - tile_sizes = Array of tile sizes in pixel, which should be rendered
+        - zoom_range = Range of zooms, tiles are created for
+        - densities = Array with counts of data points per density_base, where
+          tiles are created for
+        - density_base = Radios of circle as a datum plane for the densities
+          values
+        - nodata_value = Value used for pixels without valid data
+    """
     def __init__(
         self,
@@ -200,5 +186,6 @@
         self._debug = debug
 
-        # -999 is a workaround, as long gdal python api does not handle addAlpha
+        # -999 is a workaround, as long gdal python api does not handle
+        # addAlpha
         self._colors = {
             -999: '255 255 255',
@@ -213,7 +200,7 @@
     def fit_extent_to_tiles(self, lng_lat_box, zoom_range):
         """
-			Enlarges the extent (given by lng_lat_box) to the borders of the tiles
-			lng_lat_box is of Type LngLatBbox
-		"""
+            Enlarges the extent (given by lng_lat_box) to the borders of the
+            tiles lng_lat_box is of Type LngLatBbox
+        """
         tile_bounding = mercantile.bounding_tile(
             lng_lat_box.west(), lng_lat_box.south(), lng_lat_box.east(),
@@ -241,9 +228,10 @@
     ):
         """
-			Slice the complete area of input_file into smaller pieces,
-			so that each created raster file is smaller than raster_file_size_max
-			and cut into pieces at the borders of tiles and not thorugh tiles.
-			It returns an array of latitude longitude boxes representaing the borders, per slice.
-		"""
+            Slice the complete area of input_file into smaller pieces,
+            so that each created raster file is smaller than
+            raster_file_size_max and cut into pieces at the borders of
+            tiles and not thorugh tiles. It returns an array of latitude
+            longitude boxes representaing the borders, per slice.
+        """
         if tile_sizes is None:
             tile_sizes = self._tile_sizes
@@ -259,7 +247,9 @@
                 LngLatBbox(west, south, east, north), zoom_range
             )
-            # The lng_lat_box is exactly on the border between tiles. Since there are rounding errors,
-            # we move the corner edges a very little bit (about a few mm) into the tile. This makes sure,
-            # that we only get those tiles returned, which are really in the lng_lat_box.
+            # The lng_lat_box is exactly on the border between tiles.
+            # Since there are rounding errors, we move the corner edges
+            # a very little bit (about a few mm) into the tile. This makes
+            # sure, that we only get those tiles returned, which are really
+            # in the lng_lat_box.
             tiles_zoom_min = mercantile.tiles(
                 lng_lat_box.west() + 1 * 10**-7,
@@ -349,9 +339,10 @@
     ):
         """
-			Runs all nescessary steps to create the tiles.
-			All default parameters equal to none are replaced by the one of the object
-			input_file = vrt source file used as a base for all steps to creating the tiles
-			Returns an array of paths with the created tiles if successfull
-		"""
+            Runs all nescessary steps to create the tiles.
+            All default parameters equal to none are replaced by the one
+            of the object input_file = vrt source file used as a base for
+            all steps to creating the tiles. Returns an array of paths with
+            the created tiles if successfull
+        """
         if densities is None:
             densities = self._densities
@@ -364,6 +355,6 @@
         datasource = self._datasource_open(input_file)
         source_layer = datasource.GetLayerByIndex(0)
-        source_x_min, source_x_max, source_y_min, source_y_max = source_layer.GetExtent(
-        )
+        (source_x_min, source_x_max,
+         source_y_min, source_y_max) = source_layer.GetExtent()
         source_layer_name = source_layer.GetName()
 
@@ -379,5 +370,6 @@
         tile_result_paths = []
         for density_min in densities:
-            gridding_algorithm = 'average:radius1={}:radius2={}:angle=0.0:min_points={}:nodata={}'.format(
+            gridding_algorithm = ('average:radius1={}:radius2={}:angle=0.0:'
+                                  'min_points={}:nodata={}').format(
                 radius_x, radius_y, density_min, nodata_value
             )
@@ -433,5 +425,6 @@
             )
             # create the tiles
-            title = 'GNUBoat {} datasets per {} squaremetre, Tilesize: {}'.format(
+            title = ('GNUBoat {} datasets per {} squaremetre, '
+                     'Tilesize: {}').format(
                 density_min, density_base, tile_slice.tile_size()
             )
@@ -468,8 +461,8 @@
     ):
         """
-			Rastering the data from source file into a tif.
-			The input should be a vrt source file.
-			The function returns the path to the generated tif file.
-		"""
+            Rastering the data from source file into a tif.
+            The input should be a vrt source file.
+            The function returns the path to the generated tif file.
+        """
         if nodata_value is None:
             nodata_value = self._nodata_value
@@ -504,6 +497,7 @@
     ):
         """
-			Creates the hillshade from a raster tif file and returns the path to the resulting tif file
-		"""
+            Creates the hillshade from a raster tif file and returns the path
+            to the resulting tif file
+        """
         gdal.DEMProcessing(
             output_file,
@@ -521,6 +515,7 @@
     ):
         """
-			Creates the color relief from a raster tif and returns the path to the resulting tif file
-		"""
+            Creates the color relief from a raster tif and returns
+            the path to the resulting tif file
+        """
         if colors is None:
             colors = self._colors
@@ -596,21 +591,23 @@
             zoom_range.minimum(), zoom_range.maximum()
         )
-        # using the patched (tilesize) gdal2tiles.py script here, until the upstream version mades it in the distros
+        # using the patched (tilesize) gdal2tiles.py script here, until the
+        # upstream version mades it in the distros
         subprocess.run([
             'gdal2tiles-gnuboat.py', '-q', '-w', 'none',
-            '--tilesize={}'.format(tile_size), '-z', tile_zoom_option, '-t',
-            title, input_file, output_directory
-        ],
-                       check=True,
-                       stdout=subprocess.PIPE,
-                       stderr=subprocess.PIPE)
+            '--tilesize={}'.format(tile_size), '-z', tile_zoom_option,
+            '-t', title, input_file, output_directory],
+            check=True,
+            stdout=subprocess.PIPE,
+            stderr=subprocess.PIPE)
 
     def move_tiles_in_place(self, source_path, target_path, skip_empty=True):
         """
-			Moves the generated tiles from the source_path into the target_path.
-			It moves file per file, so that the tiles are going to be integrated into an existing folder.
-			If skip_emtpy = True only one empty tile is copied to the top level directory. All other empty
-			tiles are not moved into target_path.
-		"""
+            Moves the generated tiles from the source_path into the
+            target_path. It moves file per file, so that the tiles are
+            going to be integrated into an existing folder. If
+            skip_emtpy = True only one empty tile is copied to the
+            top level directory. All other empty tiles are not moved
+            into target_path.
+        """
         copied_empty_tile = False
 
@@ -663,25 +660,32 @@
         return True
 
-    #def contours_create():
+    # def contours_create():
     # @todo Cut Tifs / warp
-    #contour_input = gdal.Open(gdal_file, gdalconst.GA_ReadOnly)
-    #contour_input_band = contour_input.GetRasterBand(1)
-    ##Generate layer to save Contourlines in
-    #contour_output = ogr.GetDriverByName("ESRI Shapefile").CreateDataSource(gdal_file_contours)
-    #proj = osr.SpatialReference()
-    #proj.SetWellKnownGeogCS(input_epsg)
-    #for depth in colors:
-    #contour_layer = contour_output.CreateLayer('contour_{}_{}_{}'.format(density_min, density_base, depth), srs = proj)
-    #field_definition = ogr.FieldDefn("ID", ogr.OFTInteger)
-    #contour_layer.CreateField(field_definition)
-    #field_definition = ogr.FieldDefn("elev", ogr.OFTReal)
-    #contour_layer.CreateField(field_definition)
-    ##Generate Contourlines
-    #gdal.ContourGenerate(contour_input_band, depth, 0, [], 0, 0, contour_layer, 0, 1)
-    #contour_output = None
-    #del contour_output
-    #print("  Created contour lines {}".format(gdal_file_contours))
-
-    #def crop():
-    # cropping the tifs
-    #gdal.Warp('/tmp/gnuboat/test.tif', gdal_file_color_relief, options = gdal.WarpOptions(format = 'GTiff', dstAlpha = True, srcNodata = "255 255 255", dstNodata = target_nodata_value, cutlineDSName = '/tmp/gnuboat/contours/contour-0.shp', cutlineLayer="contour-0", cropToCutline=True))
+    # contour_input = gdal.Open(gdal_file, gdalconst.GA_ReadOnly)
+    # contour_input_band = contour_input.GetRasterBand(1)
+    # Generate layer to save Contourlines in
+    # contour_output = ogr.GetDriverByName("ESRI Shapefile")
+    #    .CreateDataSource(gdal_file_contours)
+    # proj = osr.SpatialReference()
+    # proj.SetWellKnownGeogCS(input_epsg)
+    # for depth in colors:
+    # contour_layer = contour_output.CreateLayer('contour_{}_{}_{}'
+    #    .format(density_min, density_base, depth), srs = proj)
+    # field_definition = ogr.FieldDefn("ID", ogr.OFTInteger)
+    # contour_layer.CreateField(field_definition)
+    # field_definition = ogr.FieldDefn("elev", ogr.OFTReal)
+    # contour_layer.CreateField(field_definition)
+    # Generate Contourlines
+    # gdal.ContourGenerate(contour_input_band, depth, 0, [], 0, 0,
+    #    contour_layer, 0, 1)
+    # contour_output = None
+    # del contour_output
+    # print("  Created contour lines {}".format(gdal_file_contours))
+
+    # def crop():
+    #  cropping the tifs
+    # gdal.Warp('/tmp/gnuboat/test.tif', gdal_file_color_relief,
+    #    options = gdal.WarpOptions(format = 'GTiff', dstAlpha = True,
+    #        srcNodata = "255 255 255", dstNodata = target_nodata_value,
+    #        cutlineDSName = '/tmp/gnuboat/c contours/contour-0.shp',
+    #        cutlineLayer="contour-0", cropToCutline=True))
Index: src/gnuboat/common/tests/test_tilegenerator.py
===================================================================
--- src/gnuboat/common/tests/test_tilegenerator.py	(revision 2a31181f02ac93729aaf46e3bcfb5c23dd7ab3f0)
+++ src/gnuboat/common/tests/test_tilegenerator.py	(revision c04676b54a51f77872002d7773416aa1b136db2e)
@@ -260,6 +260,6 @@
     datasource = ogr.Open(datasource_vrt)
     source_layer = datasource.GetLayerByIndex(0)
-    source_x_min, source_x_max, source_y_min, source_y_max = source_layer.GetExtent(
-    )
+    (source_x_min, source_x_max,
+     source_y_min, source_y_max) = source_layer.GetExtent()
     source_layer_name = source_layer.GetName()
     lon_metre_max = 60 * 1852 * math.cos(
@@ -272,5 +272,6 @@
 
     tilegen = tilegenerator.TileGenerator()
-    gridding_algorithm = 'average:radius1={}:radius2={}:angle=0.0:min_points={}:nodata={}'.format(
+    gridding_algorithm = ('average:radius1={}:radius2={}:angle=0.0:'
+                          'min_points={}:nodata={}').format(
         radius_x, radius_y, 10, -999
     )
@@ -318,6 +319,5 @@
         'density_base':
             100,
-        'nodata_value':
-            -999,
+        'nodata_value': -999,
         'skip_empty':
             True
@@ -346,6 +346,5 @@
                          'density_base':
                              100,
-                         'nodata_value':
-                             -999,
+                         'nodata_value': -999,
                          'skip_empty':
                              True
Index: tox.ini
===================================================================
--- tox.ini	(revision 2a31181f02ac93729aaf46e3bcfb5c23dd7ab3f0)
+++ tox.ini	(revision c04676b54a51f77872002d7773416aa1b136db2e)
@@ -27,5 +27,7 @@
 pep8ignore =
     src/gnuboat/mapservice_impl/tasks/tileconfig.py E701
+    src/gnuboat/common/spatial/tilegenerator.py E701
     src/gnuboat/mapservice/controllers/*.py E501
     src/gnuboat/mapservice/models/*.py E501
-    src/gnuboat/mapservice/test/test_.py E501
+    src/gnuboat/mapservice/test/*.py E501 W293
+    src/gnuboat/common/bin/gdal2tiles-gnuboat.py ALL
