Module: safe_qgis.test_clipper

InaSAFE Disaster risk assessment tool developed by AusAid -
ISClipper test suite.

Contact : ole.moller.nielsen@gmail.com

Note

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

class safe_qgis.test_clipper.ClipperTest(methodName='runTest')[source]

Test the InaSAFE clipper

testRasterScaling()[source]

Raster layers can be scaled when resampled

This is a test for ticket #52

Native test .asc data has

Population_Jakarta_geographic.asc ncols 638 nrows 649 cellsize 0.00045228819716044

Population_2010.asc ncols 5525 nrows 2050 cellsize 0.0083333333333333

Scaling is necessary for raster data that represents density such as population per km^2

testRasterScaling_projected()[source]

Attempt to scale projected density raster layers raise exception

Automatic scaling when resampling density data does not currently work for projected layers. See issue #123.

For the time being this test checks that an exception is raised when scaling is attempted on projected layers. When we resolve issue #123, this test should be rewritten.

test_clipBoth()[source]

Raster and Vector layers can be clipped

test_clipRaster()[source]

Raster layers can be clipped

test_clipVector()[source]

Vector layers can be clipped

test_explodeMultiLineGeometry()[source]

Test exploding LINES multipart to single part geometries works

test_explodeMultiPointGeometry()[source]

Test exploding POINT multipart to single part geometries works

test_explodeMultiPolygonGeometry()[source]

Test exploding POLY multipart to single part geometries works

test_extentToKml()[source]

Test if extent to KML is working.

test_invalidFilenamesCaught()[source]

Invalid filenames raise appropriate exceptions

Wrote this test because test_clipBoth raised the wrong error when file was missing. Instead of reporting that, it gave Western boundary must be less than eastern. I got [0.0, 0.0, 0.0, 0.0]

See issue #170

test_vectorProjections()[source]

Test that vector input data is reprojected properly during clip

This module forms part of the InaSAFE tool.

Previous topic

Module: safe_qgis.test_impact_calculator

Next topic

Module: safe_qgis.test_dock

This Page