npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@bedrock-engineer/gef-parser

v0.1.2

Published

Parse GEF (Geotechnical Exchange Format) files for CPT and Borehole data

Readme

@bedrock-engineer/gef-parser

npm version

A TypeScript library for parsing GEF (Geotechnical Exchange Format) files. GEF is the standard file format for exchanging geotechnical data in the Netherlands and Belgium, including Cone Penetration Test (CPT) measurements and borehole logs.

This parser handles the GEF format specification, coordinate transformations, and provides typed data structures for analysis and visualization. It uses the WebAssembly build of gef-file-to-map for initial tokenization, with all CSV parsing, header validation, and domain logic implemented in TypeScript using zod.

Try the live demo | View example usage

Features

  • Parse GEF-CPT (Cone Penetration Test) files
  • Parse GEF-BORE (Borehole) files with soil layers and specimens
  • Automatic GEF type detection
  • Support for Dutch (BRO/VOTB) and Belgian (DOV) extensions
  • Coordinate system conversion to WGS84
  • Depth correction for inclinometer data
  • Full TypeScript support with type definitions

GEF-DISS and GEF-SIEVE are not supported.

Installation

npm install @bedrock-engineer/gef-parser

Usage

Basic Parsing

Parse a GEF file and automatically detect whether it's CPT or borehole data:

import { parseGefFile } from "@bedrock-engineer/gef-parser";

// From a browser file input
const fileInput = document.querySelector('input[type="file"]');

fileInput.addEventListener("change", async (e) => {
  const file = e.target.files[0];
  const gefData = await parseGefFile(file);

  if (gefData.type === "cpt") {
    // CPT data with measurements
    console.log("Cone resistance:", gefData.data.qc);
    console.log("Depth:", gefData.data.depth);
    console.log("Metadata:", gefData.metadata);
  } else if (gefData.type === "bore") {
    // Borehole data with soil layers
    gefData.data.forEach((layer) => {
      console.log(
        `${layer.soilCode} from ${layer.depthTop}m to ${layer.depthBottom}m`,
      );
    });
    console.log("Specimens:", gefData.specimens);
  }
});

With Node.js reading GEF file from filesystem:

import { readFile } from "fs/promises";

const buffer = await readFile("path/to/file.gef");
const file = new File([buffer], "file.gef");
const gefData = await parseGefFile(file);

Coordinate Conversion

Convert GEF coordinates (typically Dutch RD or Belgian Lambert) to WGS84:

import { convertToWGS84 } from "@bedrock-engineer/gef-parser";

const result = convertToWGS84({
  x: 155000, // RD x-coordinate
  y: 463000, // RD y-coordinate
  epsg: 28992, // Dutch RD coordinate system
});

if (result.success) {
  console.log(`Lat: ${result.lat}, Lon: ${result.lon}`);
}

Depth Correction

Apply depth corrections for inclinometer data:

import { addComputedDepthColumns } from "@bedrock-engineer/gef-parser";

// Adds corrected depth columns based on inclinometer measurements
const correctedData = addComputedDepthColumns(gefData.data);

API

Main Functions

  • parseGefFile(file: File): Promise<GefData> - Parse any GEF file
  • parseGefCptData() - Parse CPT-specific data
  • parseGefBoreData() - Parse borehole-specific data
  • processCptMetadata() - Extract CPT metadata
  • processBoreMetadata() - Extract borehole metadata

Types

All types are exported from the main entry point:

import type {
  GefData,
  GefCptData,
  GefBoreData,
  GefHeaders,
  ColumnInfo,
} from "@bedrock-engineer/gef-parser";

License

Apache-2.0

By Jules Blom at Bedrock.engineer