code: def _read(self, directory, filename, session, path, name, extension, spatial, spatialReferenceID, replaceParamFile):
          
          # Set file extension property
          self.fileExtension = extension
  
          # Open file and read plain text into text field
          with open(path, 'r') as f:
              self.rasterText = f.read()
  
          # Retrieve metadata from header
          lines = self.rasterText.split('\n')
          for line in lines[0:6]:
              spline = line.split()
  
              if 'north' in spline[0].lower():
                  self.north = float(spline[1])
              elif 'south' in spline[0].lower():
                  self.south = float(spline[1])
              elif 'east' in spline[0].lower():
                  self.east = float(spline[1])
              elif 'west' in spline[0].lower():
                  self.west = float(spline[1])
              elif 'rows' in spline[0].lower():
                  self.rows = int(spline[1])
              elif 'cols' in spline[0].lower():
                  self.columns = int(spline[1])
  
          if spatial:
              # Get well known binary from the raster file using the MapKit RasterLoader
              wkbRaster = RasterLoader.grassAsciiRasterToWKB(session=session,
                                                             grassRasterPath=path,
                                                             srid=str(spatialReferenceID),
                                                             noData='-1')
              self.raster = wkbRaster
              self.srid = spatialReferenceID
  
          # Assign other properties
          self.filename = filename
docs: Index Map Read from File Method