def evaluation_results(self): """ Results of several evaluation tests for defined for the web map process (feature count, spatial reference and field count). :return: lists of the tests, results and messages with values depending on the results of the if statements """ list = [] results = [] messages = [] tests = ["Feature count", "Field count", "Spatial reference"] if self.eval_features: results.append("Pass") messages.append( "The feature count (%s) is within than the recommended <1000 features." % self.feature_count) else: results.append("Fail") messages.append( "The feature count (%s) is greater than the recommended <1000 features." % self.feature_count) if self.eval_fields: results.append("Pass") messages.append( "The field count (%s) is within the recommended maximum of 20 fields." % self.field_count) else: results.append("Fail") messages.append( "The field count (%s) is greater than the recommended <20 fields." % self.field_count) if self.eval_sr: results.append("Pass") messages.append( "The spatial reference %s is the same as the web staging map document %s." % (self.sr_name, utils.get_web_staging_spatial_ref())) else: results.append("Fail") messages.append( "The spatial reference %s is not the same as the web staging map document %s." % (self.sr_name, utils.get_web_staging_spatial_ref())) list.append(results) list.append(messages) list.append(tests) return list
def evaluate_spatial_ref_web_staging_mxd(self): """ Checks that the spatial reference of the layer against the spatial reference of the first data frame in the web staging mxd :return: a dictionary with a key of the data frame name in web staging mxd and a boolean value if it is the same as the layer. True means they are the same. """ if self.sr_name == utils.get_web_staging_spatial_ref(): return True else: return False
def evaluation_results(self): """ Results of several evaluation tests for defined for the web map process (feature count, spatial reference and field count). :return: lists of the tests, results and messages with values depending on the results of the if statements """ list = [] results = [] messages = [] tests = ["Feature count", "Field count", "Spatial reference"] if self.eval_features: results.append("Pass") messages.append("The feature count (%s) is within than the recommended <1000 features." % self.feature_count) else: results.append("Fail") messages.append("The feature count (%s) is greater than the recommended <1000 features." % self.feature_count) if self.eval_fields: results.append("Pass") messages.append("The field count (%s) is within the recommended maximum of 20 fields." % self.field_count) else: results.append("Fail") messages.append("The field count (%s) is greater than the recommended <20 fields." % self.field_count) if self.eval_sr: results.append("Pass") messages.append("The spatial reference %s is the same as the web staging map document %s." % (self.sr_name, utils.get_web_staging_spatial_ref())) else: results.append("Fail") messages.append("The spatial reference %s is not the same as the web staging map document %s." % (self.sr_name, utils.get_web_staging_spatial_ref())) list.append(results) list.append(messages) list.append(tests) return list