Code Monkey home page Code Monkey logo

libgeosuitesnd's Introduction

Parser for the GeoSuite[tm] SND export format

This library provides functionality to parse geotechnical investigation data in .snd files generated by Trimbles GeoSuite.

Note: This parser is based on reverse-engineering, not a published standard. Some details in the format might have been missed, or might have changed in newer versions.

The datamodel is (mostly) compatible with libsgfdata, meaning that it is possible to (with some fields not being properly renamed/transformed) save the loaded data as an SGF file.

Usage

>>> data = libgeosuitesnd.parse("SOMEFILE.SND")
>>> data
[{'main': [{'method_code': 23,
            'method_name': 'rps',
            'day': 23,
            'month': 5,
            'year': 2011,
            'date': '2011-5-23',
            'stop_code': 91,
            'stop_desc': 'abandoned_hit_hard_surface',
            'depth_increment': 0.021,
            'depth_bedrock': None,
            'x_coordinate': 288557.381,
            'y_coordinate': 6667259.708,
            'z_coordinate': 139.01}],
  'data':        depth  feed_force  flushing  extra_spin  hammering  pumping comments
  0      0.021       102.0         0           0          0        0         
  1      0.042      1318.0         0           0          0        0         
  2      0.052      1038.0         0           0          0        0         
  3      0.072      1101.0         0           0          0        0         
  4      0.100      1728.0         0           0          0        0         
  ...      ...         ...       ...         ...        ...      ...      ...
  1326  28.550      5301.0         0           1          0        0         
  1327  28.570      9423.0         0           1          0        0         
  1328  28.605     12217.0         0           1          0        0         
  1329  28.631     11564.0         0           1          0        0         
  1330  28.650     11942.0         0           1          0        0         
  
  [1331 rows x 7 columns]}]
  
>>> libsgfdata.dump(data, "somefile.sgf")

Static metadata

For each of the enumerated value types - method_code and stop_code, there is a pandas dataframe that translates between the numerical values used in the file, and the libsgfdata compatible names:

>>> libgeosuitesnd.methods
        name                                            columns                                flags comment
code                                                                                                        
7        cpt  depth,feed_trust_force,pore_pressure,friction,...                                  NaN     NaN
21    rotary                                                NaN                                  NaN     NaN
22    simple                                                NaN                                  NaN     NaN
23       rps                             depth,feed_trust_force  extra_spin,flushing,pumping,ramming     NaN
25     total       depth,feed_trust_force,interval,pumping_rate  extra_spin,flushing,pumping,ramming     NaN

>>> libgeosuitesnd.stop_reasons
                                name
code                                
90    drilling_abandoned_prematurely
91        abandoned_hit_hard_surface
92               assumed_hit_boulder
93                   assumed_bedrock
94                   reached_bedrock
95                      broken_drill
96                       other_fault
97                drilling_abandoned

>>> libgeosuitesnd.flags
            name  value
code                   
R1    extra_spin      1
R2    extra_spin      0
y1      flushing      1
y2      flushing      0
S1       ramming      1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.