Ejemplo n.º 1
0
def generate_profile(fc_path, out_folder, overwrite):
    """
    :param fc_path: the full path to the feature class
    :type fc_path: basestring

    :param out_folder: the output folder
    :type out_folder: basestring

    :param overwrite: a flag to indicate if outputs should be overwritten
    :type overwrite: bool

    """

    log.info("Determining output XLS filename")
    xls_path = os.path.join(out_folder,
                            fc_properties.get_fc_name(fc_path) + report_ext)
    if overwrite is True:
        log.info("Deleting existing xls file")
        delete_existing_xls(xls_path)

    log.info("Getting feature class properties")
    fc_properties_list = fc_properties.get_fc_properties(fc_path)

    log.info("Getting feature class structure")
    fc_structure = fc_properties.get_fc_structure(fc_path)

    log.info("Writing to XLS")
    xls_output.write_fc_profile(fc_properties_list, fc_structure, xls_path)
Ejemplo n.º 2
0
 def test_get_fc_name_NO_CRS(self):
     fc = "NO_CRS_point"
     fc_path = os.path.join(fgdb, fc)
     self.assertEqual(fc, get_fc_name(fc_path))
Ejemplo n.º 3
0
 def test_get_fc_name_MGAZ56(self):
     fc = "MGAZ56_point"
     fc_path = os.path.join(fgdb, fc)
     self.assertEqual(fc, get_fc_name(fc_path))
Ejemplo n.º 4
0
 def test_get_fc_name_WGS_1984_Web_Mercator(self):
     fc = "Web_Mercator_point"
     fc_path = os.path.join(fgdb, fc)
     self.assertEqual(fc, get_fc_name(fc_path))
Ejemplo n.º 5
0
 def test_get_fc_name_WGS84_LL(self):
     fc = "WGS84_point"
     fc_path = os.path.join(fgdb, fc)
     self.assertEqual(fc, get_fc_name(fc_path))
Ejemplo n.º 6
0
 def test_get_fc_name_GDA94_GA_Lambert(self):
     fc = "GDA94_GA_Lambert_point"
     fc_path = os.path.join(fgdb, fc)
     self.assertEqual(fc, get_fc_name(fc_path))