def boreholes_from_xml(folder, version, extra_fields): xmlfiles = utils.careful_glob(folder, '*{:.1f}.xml'.format(version)) for xmlfile in xmlfiles: xml = XMLBoreholeFile(xmlfile) borehole = xml.to_borehole(extra_fields) if borehole is not None: yield borehole
def cpts_from_gef(folder, datacolumns=None, classifier=None, fieldnames=None): geffiles = utils.careful_glob(folder, '*.gef') for geffile in geffiles: gef = GefCPTFile(geffile, classifier, fieldnames) cpt = gef.to_cpt(datacolumns) if cpt is not None: yield cpt
def boreholes_from_gef(folder, classifier=None, fieldnames=None): geffiles = utils.careful_glob(folder, '*.gef') for geffile in geffiles: gef = GefBoreholeFile(geffile, classifier, fieldnames) borehole = gef.to_borehole() if borehole is not None: yield borehole
def boreholes_from_csv(folder, fieldnames=None, extra_fields=None, delimiter=',', decimal='.' ): csvfiles = utils.careful_glob(folder, '*.csv') for csvfile in csvfiles: csv_ = CSVBoreholeFile(csvfile, delimiter=delimiter, decimal=decimal, ) for borehole in csv_.to_boreholes(fieldnames, extra_fields): if borehole is not None: yield borehole