Skip to content

inasafe/python-safe

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# Note

This repository is for archival reference only. Please see the main inasafe/inasafe repo for the latest code.

safe - spatial analysis functional engine

Python based toolkit to implement spatial analysis that involve raster and vector data.

It was built because we did not want to worry about the differences between osgeo.gdal and osgeo.ogr, or WCS and WFS.

This is the result of mixing mathematicians and engineers and tasking them to create simulations to prepare for natural hazards with very short deadlines.

Features

  • Unified API to work with Raster and Vector objects.
  • Uses GDAL/OGR and Numpy in the backend.
  • Simple plugin module for creating your own functions and registering them in the engine.
  • Built-in interpolation operations for most common needs (Raster - Raster, Raster - Point, Raster - Polygon )
  • Autodiscovery of compatible functions based on layer metadata.
  • Support for output styles (SLD - OGC Styled Layer Descriptors).
  • Able to use layers from remote OGC compatible web services (WFS / WCS) (not implemented)
  • Designed to be easy to implement within QGIS and GeoNode.

Installation

  1. Install dependencies

    You will need NumPy, Nose and GDAL.

    In Ubuntu, you can do it like this:

    sudo apt-get install python-numpy python-gdal python-nose
    
  2. Install this package:

    pip install python-safe
    

    If you do not have pip installed but only easy_install, you can do easy_install pip and then use it to install python-safe.

  3. To verify everything is working as it should do, open a python shell and do:

    import safe
    safe.test()
    

    You can pass additional parameters to the test function, for example: verbose=2 to view the test names.

For Developers

The source code and issue tracker can be found at http://github.com/AIFDR/python-safe

To install a development version instead of the last release you can do:

pip install -e git+git://github.com/AIFDR/python-safe.git#egg=python-safe

Or use the old fashioned:

git clone git://github.com/AIFDR/python-safe.git
cd python-safe
python setup.py install

Thanks

This package was originally created with funding from AusAID, Indonesia's BNPB, The World Bank and GFDRR.

About

Geospatial impact calculations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 74.7%
  • PLSQL 24.2%
  • Scheme 1.1%