Skip to main content

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
```

Project details


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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fauxgeo-0.3.0-py2.py3-none-any.whl (5.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file fauxgeo-0.3.0.tar.gz.

File metadata

  • Download URL: fauxgeo-0.3.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for fauxgeo-0.3.0.tar.gz
Algorithm Hash digest
SHA256 933fabccdedbc094a09a73f222172d1a9263bd0ca78fe70c8e1c87e21be84758
MD5 f5d6324c21b8b6dc5be4e23b0235e4db
BLAKE2b-256 663490b40accafe194df1d53acc8b48cb2c152c993ad9853d490a652a225d760

See more details on using hashes here.

File details

Details for the file fauxgeo-0.3.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for fauxgeo-0.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 653bdb452793b76dbc83bd1f8c6e666b51b3795667786676310e0bda6a5fae52
MD5 73d526cd3858e4a766bf526d0a7c75eb
BLAKE2b-256 29d53cfc9eea9cc456a1e5f3026a1099a52bca75fdc80285d1633504120babcb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page