Example #1
0
 def get_getis(self, w_type, params):
     """fetch data for getis ord's g"""
     try:
         query = pu.construct_neighbor_query(w_type, params)
         result = plpy.execute(query)
         # if there are no neighbors, exit
         if len(result) == 0:
             return pu.empty_zipped_array(4)
         else:
             return result
     except plpy.SPIError, err:
         plpy.error('Analysis failed: %s' % err)
Example #2
0
    def get_markov(self, w_type, params):
        """fetch data for spatial markov"""
        try:
            query = pu.construct_neighbor_query(w_type, params)
            data = plpy.execute(query)

            if len(data) == 0:
                return pu.empty_zipped_array(4)

            return data
        except plpy.SPIError, err:
            plpy.error('Analysis failed: %s' % err)
Example #3
0
    def get_moran(self, w_type, params):
        """fetch data for moran's i analyses"""
        try:
            query = pu.construct_neighbor_query(w_type, params)
            data = plpy.execute(query)

            # if there are no neighbors, exit
            if len(data) == 0:
                return pu.empty_zipped_array(2)
            return data
        except plpy.SPIError, err:
            plpy.error('Analysis failed: %s' % e)
            return pu.empty_zipped_array(2)
Example #4
0
 def get_moran(self, w_type, params):  # pylint: disable=no-self-use
     """fetch data for moran's i analyses"""
     query = pu.construct_neighbor_query(w_type, params)
     return plpy.execute(query)
Example #5
0
 def get_markov(self, w_type, params):  # pylint: disable=no-self-use
     """fetch data for spatial markov"""
     query = pu.construct_neighbor_query(w_type, params)
     return plpy.execute(query)
Example #6
0
 def get_getis(self, w_type, params):  # pylint: disable=no-self-use
     """fetch data for getis ord's g"""
     query = pu.construct_neighbor_query(w_type, params)
     return plpy.execute(query)
 def get_moran(self, w_type, params):
     """fetch data for moran's i analyses"""
     query = pu.construct_neighbor_query(w_type, params)
     return plpy.execute(query)
 def get_markov(self, w_type, params):
     """fetch data for spatial markov"""
     query = pu.construct_neighbor_query(w_type, params)
     return plpy.execute(query)
 def get_getis(self, w_type, params):
     """fetch data for getis ord's g"""
     query = pu.construct_neighbor_query(w_type, params)
     return plpy.execute(query)