Skip to content

wbierbower/fauxgeo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FauxGeo: generate simple geospatial rasters

FauxGeo is a python library that generates simple OSGeo-supported rasters. The primary purpose for this library is to help test geoprocessing functions.

PyPI Build

Features

Available Signal Functions

Signal Function RasterFactory Method
uniform .uniform(val)
ramp .ramp(zero_index, slope=1)
saw tooth .saw(low, high, period)
triangle .triangle(low, high, period)
step .step(low, high, period)
random range .random(low, high)
random from list .random(list)
alternating .alternate(val1, val2)

Installation

To install FauxGeo, simply:

$ pip install fauxgeo

Usage

import numpy as np
from fauxgeo import RasterFactory, Affine

options = {
  'affine': Affine.identity(),
  'epsg': 4326,
  'datatype': np.float32,
  'nodata': -9999,
  'driver': 'GTIFF',
  'shape': (10, 10)
}

factory = RasterFactory(**options)
factory.uniform(5).to_file('path/to/file')

Tests

$ python setup.py test

About

🗺 A python library that generates simple geospatial rasters for testing

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published