Skip to main content

Spatial elliptical fourier analysis

Project description

https://travis-ci.org/sgrieve/spatial_efd.svg?branch=master https://img.shields.io/codecov/c/github/sgrieve/spatial_efd.svg https://requires.io/github/sgrieve/spatial_efd/requirements.svg?branch=master https://readthedocs.org/projects/spatial-efd/badge/?version=latest https://img.shields.io/badge/License-MIT-green.svg

A pure python implementation of the elliptical Fourier analysis method described by Kuhl and Giardina (1982). This package is designed to allow the rapid analysis of spatial data stored as ESRI shapefiles, handling all of the geometric conversions. The code is built upon the pyefd module and it is hoped that this package will allow more geoscientists to apply this technique to analyze spatial data using the elliptical Fourier descriptor technique.

[Image of a drainage basin fitted fitted by the first 2,4,10,20 harmonics of its Fourier series]

Features

  • Built-in geometry processing, just pass in a shapefile and get results quickly!

  • Fourier coefficient average and standard devation calculation

  • Handles spatial input data through the pyshp library

  • Compute an appropriate number of harmonics for a given polygon

  • Basic plotting for analysis and debugging through matplotlib

Installation

Install spatial_efd by running:

$ pip install spatial_efd

Dependencies

This package is developed on linux for python 2.7 and requires matplotlib, numpy and pyshp. These packages will all install automatically if spatial_efd is installed using pip.

Tests

A range of unit tests are included in the /spatial/tests/ directory. These can be run using nose or directly from setup.py:

$ python setup.py test
$ nosetests

Usage

Here are examples of how to use the code.

Contribute

https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat

I welcome contributions to the code, head to the issue tracker on github to get involved!

  • Issue Tracker: github.com/sgrieve/spatial_efd/issues

  • Source Code: github.com/sgrieve/spatial_efd

Support

If you find any bugs, have any questions or would like to see a feature in a new version, drop me a line:

License

The project is licensed under the MIT license.

References

Kuhl, FP and Giardina, CR (1982). Elliptic Fourier features of a closed contour. Computer graphics and image processing, 18(3), 236-258.

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

spatial_efd-0.1.tar.gz (18.7 kB view hashes)

Uploaded Source

Supported by

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