示例#1
0
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
示例#2
0
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
示例#3
0
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
示例#4
0
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
示例#5
0
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
示例#6
0
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