Parser for the GeoSuite[tm] PRV export format

Overview

Parser for the GeoSuite[tm] PRV export format

This library provides functionality to parse geotechnical investigation data in .prv 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 fields not being properly renamed/transformed) save the loaded data as an SGF file.

Usage

>>> data = libgeosuiteprv.parse("SOMEFILE.PRV" )
>>> 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")
You might also like...
Analisador de strings feito em Python // String parser made in Python

Este é um analisador feito em Python, neste programa, estou estudando funções e a sua junção com "if's" e dados colocados pelo usuário. Neste código,

A python library for writing parser-based interactive fiction.

About IntFicPy A python library for writing parser-based interactive fiction. Currently in early development. IntFicPy Docs Parser-based interactive f

Ergonomic option parser on top of dataclasses, inspired by structopt.
Ergonomic option parser on top of dataclasses, inspired by structopt.

oppapī Ergonomic option parser on top of dataclasses, inspired by structopt. Usage from typing import Optional from oppapi import from_args, oppapi @

Parser for air tickets' price

Air-ticket-price-parser Parser for air tickets' price How to Install Firefox If geckodriver.exe is not compatible with your Firefox version, download

A simple string parser based on CLR to check whether a string is acceptable or not for a given grammar.

A simple string parser based on CLR to check whether a string is acceptable or not for a given grammar.

Neogex is a human readable parser standard, being implemented in Python

Neogex (New Expressions) Parsing Standard Much like Regex, Neogex allows for string parsing and validation based on a set of requirements. Unlike Rege

A parser of Windows Defender's DetectionHistory forensic artifact, containing substantial info about quarantined files and executables.

A parser of Windows Defender's DetectionHistory forensic artifact, containing substantial info about quarantined files and executables.

The parser of a timetable of tennis matches for Flashscore website

FlashscoreParser The parser of a timetable of tennis matches for Flashscore website. The program collects the schedule of tennis matches for two days

Simple utlity for sniffing decrypted HTTP/HTTPS traffic on a jailbroken iOS device into an HAR format.
Simple utlity for sniffing decrypted HTTP/HTTPS traffic on a jailbroken iOS device into an HAR format.

Description iOS devices contain a hidden feature for sniffing decrypted HTTP/HTTPS traffic from all processes using the CFNetwork framework into an HA

Comments
  • Pandas deprication warning

    Pandas deprication warning

    python 3.9.13 libgeosuiteprv==0.0.5 pandas==1.5.0

    When running the lib i get a deprication warning outputted to console, as noted below:

    libgeosuiteprv \ init.py: 46: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. df = df.append(pd.Series(data_num), ignore_index=True)

    bug 
    opened by danpejobo 0
  • Date handling

    Date handling

    Broken/missing dates break parsing. To fix:

    https://github.com/emerald-geomodelling/libgeosuiteprv/blob/master/libgeosuiteprv/init.py#L32

    should change into

    'date': parse_date(firstline_list[2]),
    

    and

    def parse_date(v):
        try:
            if len(v) >= 8:
                return dateutil.parser.isoparse(v).date()
        except ValueError as exception:
            logger.debug("Unable to parse date as iso %s: %s" % (v, exception))
        try:
            return dateutil.parser.parse(v, parserinfo=dateutil.parser.parserinfo(dayfirst=True)).date()
        except Exception as e:
            logger.debug("Unable to parse date %s: %s" %(v,e))
            return v
    

    should be added (see libsgfdata for similar code)...

    opened by redhog 0
Owner
EMerald Geomodelling
EMerald Geomodelling
Addon for Blender 2.8+ that automatically creates NLA tracks for all animations. Useful for GLTF export.

PushDownAll An addon for Blender 2.8+ that runs Push Down on all animations, creating NLA tracks for each. This is useful if you have an object with m

Cory Petkovsek 16 Oct 6, 2022
ViberExport - Export messages from Viber messenger using viber.db file

?? ViberExport Export messages from Viber messenger using viber.db file ⚡ Usage:

null 7 Nov 23, 2022
Sheet2export - FreeCAD macro to export spreadsheet

Description This is FreeCAD macro to export spreadsheet to file.

Darek L 3 Jul 9, 2022
Interfaces between napari and pymeshlab library to allow import, export and construction of surfaces.

napari-pymeshlab Interfaces between napari and the pymeshlab library to allow import, export and construction of surfaces. This is a WIP and feature r

Zach Marin 4 Oct 12, 2022
Export transactions for an algorand wallet to a CSV file

algorand_txn_csv_exporter - (Algorand transaction CSV exporter) This script will export transactions for an algorand wallet to a CSV file. It is inten

TeneoPython01 5 Jun 19, 2022
JD-backup is an advanced Python script, that will extract all links from a jDownloader 2 file list and export them to a text file.

JD-backup is an advanced Python script, that will extract all links from a jDownloader 2 file list and export them to a text file.

Kraken.snv 3 Jun 7, 2022
Blender-3D-SH-Dma-plugin - Import and export Sonic Heroes Delta Morph animations (.anm) into Blender 3D

io_scene_sonic_heroes_dma This plugin for Blender 3D allows you to import and ex

Psycrow 3 Mar 22, 2022
:snake: Complete C99 parser in pure Python

pycparser v2.20 Contents 1 Introduction 1.1 What is pycparser? 1.2 What is it good for? 1.3 Which version of C does pycparser support? 1.4 What gramma

Eli Bendersky 2.8k Dec 29, 2022
A Gura parser implementation for Python

Gura parser This repository contains the implementation of a Gura format parser in Python. Installation pip install gura-parser Usage import gura gur

JWare Solutions 19 Jan 25, 2022
Parser for RISC OS Font control characters in Python

RISC OS Font control parsing in Python This repository contains a class (FontControlParser) for parsing font control codes from a byte squence, in Pyt

Charles Ferguson 1 Nov 2, 2021