Giter VIP home page Giter VIP logo

pointcollection's Introduction

pointCollection

Utilities for organizing and manipulating point data

Please make sure that gdal is installed before you install this package.

introduction

This package is designed to allow efficient reading and writing of geospatial data from Python. It covers some of the same ground as do community tools such as geopandas and pdal, but offers an abbreviated syntax and a modular design that may be helpful to some projects.

Installation

An efficient way to add pointCollection to your python environment is to clone the repository, change into the repository directory, and install the package with pip:

git clone https://github.com/SmithB/pointCollection.git
cd pointCollection
pip install -e .

(I like to install packages in developer mode.)

What this package provides

The package provides two main base classes, and a set of helper classes designed for efficient data access of files on disk. In general use, it is usually imported with the abbreviation:

import pointCollection as pc

Data classes

pointCollection.data() class

This is the main class for this project. It is intended to contain data, and has methods that read from and write to specific formats (primarily from hdf5). It is constructed either by reading from a file, or from a dictionary interface:

import pointCollection as pc
import numpy as np
D=pc.data().from_dict({'x':np.arange(5),'y':np.arange(5),'z':np.arange(5)**2})

This creates a pointCollection.data instance with fields 'x','y', and 'z', and we can access the data using dot syntax:

print(D.z)
--[0 1 2 3 4]

All the fields in the object can also be indexed by applying standard Python slicing/indexing syntax to the object; for example:

D.z[0:3]

returns a new pointCollection.data object containing first three elements of all fields of D.

pointCollection.data objects can also read data from hdf5 files, using the .from_h5() method, which accepts arguments to specify the fields and groups to be read. Subclasses of pointCollection.data are provided for a few different ice-sheet altimetry data formats:

  • ICESat-2 ATL06 and ATL11
  • ICESat GLAH12
  • IceBridge ATM Qfit, LVIS
  • Cryosat-2 data

pointCollection.grid.data() class

The pointCollection grid format reads and writes data from gridded files. It is intended to contain 'x' and 'y' fields (and sometimes 't' or 'time' for 3-D data) specifying the corrdinates of the grid, and data fields, the default for which is 'z'. pc.grid.data() objects can be indexed using 2-d or 3-d slicing operations. Methods are provided to read and write data from hdf-5 files and geotifs.

pointCollection.GeoIndex() class

pointCollection also provides the geoIndex class, which is indended to organize data from a variety of different datasets that is contained in individual files. Once a geoIndex has been created for a set of files, it allows data to be read transparently from all the files, returning a list of pc.data objects for a specified input area.

Language License Binder Binder

pointcollection's People

Contributors

bpjelley avatar dfelikson avatar smithb avatar tsutterley avatar

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.