scripts/input_dataframe.py
def generate_point_dataframe(self):
        """
        Computes the Elevations in a raster tif file
      
        Parameters
        ---------
      
        tif_file: str : filename/location of a tif image
        CRS: str : crs value for the given tif image
        
        Returns
        -------
        DataFrame
        """
        grid_raster = self.file_name
        try:
            grid = gr.from_file(grid_raster)

        except Exception as e:
        
            user_logger.info("Error in reading fiele"+e)
        
        #Convert to Pandas DataFrame
        single_df = grid.to_pandas()
      
        #Drop row and column columns
        columns =['row','col' ]
        single_df = pd.DataFrame(single_df.drop(columns=columns))
        single_df.rename(columns = {'value':'elevation'}, inplace = True) 
        single_df=single_df[['x','y','elevation']] # organize column
    
        single_df_point = gpd.GeoDataFrame(
            single_df, geometry=gpd.points_from_xy(single_df.x,single_df.y))
   
        # specify user inputed crs
        epsg='epsg:'+str(self.crs)
        single_df_point.crs = {'init' :epsg}
    
        #return dataframe that contains points and elevation 
        return single_df_point

        Computes the Elevations in a raster tif file
      
        Parameters
        ---------
      
        tif_file: str : filename/location of a tif image
        CRS: str : crs value for the given tif image
        
        Returns
        -------
        DataFrame
        
Computes the Elevations in a raster tif file
Parameters

str : filename/location of a tif image
CRS: str : crs value for the given tif image

Returns


Computes the Elevations in a raster tif file Parameters str : filename / location of a tif image CRS : str : crs value for the given tif image Returns
def generate_point_dataframe(self):
        grid_raster = self.file_name
        try:
            grid = gr.from_file(grid_raster)
        except Exception as e:
            user_logger.info("Error in reading fiele"+e)
        single_df = grid.to_pandas()
        columns =['row','col' ]
        single_df = pd.DataFrame(single_df.drop(columns=columns))
        single_df.rename(columns = {'value':'elevation'}, inplace = True) 
        single_df=single_df[['x','y','elevation']] 
        single_df_point = gpd.GeoDataFrame(
            single_df, geometry=gpd.points_from_xy(single_df.x,single_df.y))
        epsg='epsg:'+str(self.crs)
        single_df_point.crs = {'init' :epsg}
        return single_df_point
def generate_point_dataframe ( self ) : grid_raster = self . file_name try : grid = gr . from_file ( grid_raster ) except Exception as e : user_logger . info ( "Error in reading fiele" + e ) single_df = grid . to_pandas ( ) columns = [ 'row' , 'col' ] single_df = pd . DataFrame ( single_df . drop ( columns = columns ) ) single_df . rename ( columns = { 'value' : 'elevation' } , inplace = True ) single_df = single_df [ [ 'x' , 'y' , 'elevation' ] ] single_df_point = gpd . GeoDataFrame ( single_df , geometry = gpd . points_from_xy ( single_df . x , single_df . y ) ) epsg = 'epsg:' + str ( self . crs ) single_df_point . crs = { 'init' : epsg } return single_df_point
Computes the Elevations in a raster tif file
Parameters
Computes the Elevations in a raster tif file Parameters
"""
        Computes the Elevations in a raster tif file
      
        Parameters
        ---------
      
        tif_file: str : filename/location of a tif image
        CRS: str : crs value for the given tif image
        
        Returns
        -------
        DataFrame
        """ #Convert to Pandas DataFrame #Drop row and column columns # organize column # specify user inputed crs #return dataframe that contains points and elevation 
self