Пример #1
0
    def extract_data_at_locations(self, locations):
        """

        EXTRACT RAINFALL FROM GRID AT locations

        """
        if self.verbose or self.debug: print('Extract Rain Check data First')

        locations = np.array(locations)
        all_values = []
        x = self.x
        y = self.y
        precips = self.precips

        if self.debug: print(locations)

        for precip in precips:
            # and then do the interpolation
            #values = interpolate2d(x,y,np.fliplr(precip.T),locations)
            values = interpolate_raster(x, y, precip, locations)
            all_values.append(values)

        return np.array(all_values)
Пример #2
0
    def extract_data_at_locations(self, locations):
        """
        
        Extract data from Rasters at locations  
        
        """
        if self.verbose or self.debug: print 'Extract data at locations', locations
        
        locations = np.array(locations)
        all_values = []
        x = self.x
        y = self.y
        data_slices = self.data_slices

        if self.debug: print locations
        
        for data in data_slices:
            # and then do the interpolation
            #values = interpolate2d(x,y,np.fliplr(precip.T),locations) 
            values = interpolate_raster(x,y,data,locations)      
            all_values.append(values) 


        return np.array(all_values)
Пример #3
0
    def extract_data_at_locations(self, locations):
        """
        
        EXTRACT RAINFALL FROM GRID AT locations  
        
        """
        if self.verbose or self.debug: print 'Extract Rain Check data First'
        
        locations = np.array(locations)
        all_values = []
        x = self.x
        y = self.y
        precips = self.precips

        if self.debug: print locations
        
        for precip in precips:
            # and then do the interpolation
            #values = interpolate2d(x,y,np.fliplr(precip.T),locations) 
            values = interpolate_raster(x,y,precip,locations)      
            all_values.append(values) 


        return np.array(all_values)