Giter VIP home page Giter VIP logo

gdalutils's Introduction

gdalutils

gdalutils is a small library to handle GDAL-based raster files

Installation

Just run this line after installing all dependencies

pip install git+https://github.com/fathom-global/gdalutils.git

Dependencies

Usage

The module is loaded via

import gdalutils as gu

To read a raster directly from disk it can be done by

gu.get_data(filename)

It'll return a numpy.array object

Geographical information can be read via

gu.get_geo(filename)

it'll return a Python list containing

  1. xmin
  2. ymin
  3. xmax
  4. ymax
  5. number of cells x direction
  6. number of cells y direction
  7. resolution x direction
  8. resolution y direction
  9. an array containing center coordiantes of x cells
  10. an array containing center coordiantes of y cells
  11. projection
  12. nodata value

Writing numpy.array object is posible by calling

gu.write_raster(myarray, myraster, geo, fmt, nodata, bigtiff)

Where myarray is a numpy.array object, myraster is a filename output, geo is a list with geographical information identical to the one obtained with gu.get_geo, fmt is the format output: 'Float32', 'Float64', etc, nodata is the NODATA value and bigtiff is a boolean for BIGTIFF support

gdalutils's People

Contributors

jsosa avatar

Watchers

James Cloos 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.