### Navigation

- index
- modules
- next
- previous
- Home »
- Contents »
- InaSAFE’s API documentation »
- Package::safe_qgis_tests »

# 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')

  Test the InaSAFE clipper

  `testRasterScaling`()

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

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

    Raster and Vector layers can be clipped

  `test_clipRaster`()

    Raster layers can be clipped

  `test_clipVector`()

    Vector layers can be clipped

  `test_explodeMultiLineGeometry`()

    Test exploding LINES multipart to single part geometries works

  `test_explodeMultiPointGeometry`()

    Test exploding POINT multipart to single part geometries works

  `test_explodeMultiPolygonGeometry`()

    Test exploding POLY multipart to single part geometries works

  `test_extentToKml`()

    Test if extent to KML is working.

  `test_invalidFilenamesCaught`()

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

    Test that vector input data is reprojected properly during clip

This module forms part of the InaSAFE tool.

### Navigation

- index
- modules
- next
- previous
- Home »
- Contents »
- InaSAFE’s API documentation »
- Package::safe_qgis_tests »