Code Monkey home page Code Monkey logo

gslibio.jl's Introduction

GslibIO.jl

Utilities to read/write extended and legacy GSLIB files in Julia.

Build Status Coverage Status

Overview

The GSLIB file format was introduced a long time ago for storing geospatial data over Cartesian grids or point sets in text files that are easy to read. Unfortantely, the format specification is incomplete:

Cartesian grids

  • it doesn't contain the size of the grid (i.e. (nx, ny, nz))
  • it doesn't specify the origin and spacing (i.e. (ox, oy, oz), (sx, sy, sz))
  • it doesn't specify the special symbol for inactive cells (e.g. -999)

Point sets

  • it doesn't specify which variable names are geospatial coordinates

This package introduces an extended GSLIB format that addresses these issues. It also provides helper functions to load data in legacy format.

Installation

Get the latest stable release with Julia's package manager:

] add GslibIO

Usage

Please use save and load for the extended GSLIB file format and save_legacy and load_legacy for the legacy GSLIB file format. Consult the docstring of each function for more information.

An usual workflow consists of loading a legacy file with load_legacy by setting the options manually, and then saving the data back to disk in extended format with save. The new extended format can then be loaded without human intervention.

using GslibIO

# load grid data stored in legacy format
data = GslibIO.load_legacy("legacy.gslib", (100,100,50), na=-999)

# save grid data in new extended format
GslibIO.save("extended.gslib", data)

# now it can be loaded without special options
GslibIO.load("extended.gslib")

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.