programmatically generate geospatial rasters for testing
Project description
# 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](https://badge.fury.io/py/fauxgeo.png)
![Build](https://travis-ci.org/wbierbower/fauxgeo.svg?branch=master)
## 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:
```bash
$ pip install fauxgeo
```
## Usage
```python
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.ramp(0, 10, 5).to_file('path/to/file')
```
## Tests
```bash
$ python setup.py test
```
FauxGeo is a python library that generates simple OSGeo-supported rasters. The primary purpose for this library is to help test geoprocessing functions.
![PyPI](https://badge.fury.io/py/fauxgeo.png)
![Build](https://travis-ci.org/wbierbower/fauxgeo.svg?branch=master)
## 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:
```bash
$ pip install fauxgeo
```
## Usage
```python
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.ramp(0, 10, 5).to_file('path/to/file')
```
## Tests
```bash
$ python setup.py test
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fauxgeo-0.3.0.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for fauxgeo-0.3.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 653bdb452793b76dbc83bd1f8c6e666b51b3795667786676310e0bda6a5fae52 |
|
MD5 | 73d526cd3858e4a766bf526d0a7c75eb |
|
BLAKE2b-256 | 29d53cfc9eea9cc456a1e5f3026a1099a52bca75fdc80285d1633504120babcb |