InaSAFE Disaster risk assessment tool by AusAid - Clipper test suite.
Contact : email@example.com
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.
Test the InaSAFE clipper
Runs before each test.
Runs after each test.
Test adjust_clip_extent works as expected.
Raster and Vector layers can be clipped.
Test that we can clip a geometry using another geometry.
Test for clipping less than one pixel.
Raster layers can be clipped.
Test we can clip a raster with no extension - see #659.
Vector layers can be clipped.
Vector layers can be hard clipped.
Hard clipping will remove any dangling, non intersecting elements.
Test clipping vector layer with unicode attribute in feature.
This issue is described at Github #2262 and #2233 TODO: FIXME: This is a hacky fix. See above ticket for further explanation. To fix this, we should be able to specify UTF-8 encoding for QgsVectorFileWriter
Test exploding LINES multipart to single part geometries works.
Test exploding POINT multipart to single part geometries works
Test exploding POLY multipart to single part geometries works.
Test if extent to KML is working.
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
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
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 that vector input data is reprojected properly during clip.