This page contains the documentation for the InaSAFE is_clipper module.
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.
Clip a Hazard or Exposure layer to the extents provided.
Note
Will delegate to clipVectorLayer or clipRasterLayer as needed.
Args:
theLayer - a valid QGIS vector or raster layer
- theExtent - an array representing the exposure layer
extents in the form [xmin, ymin, xmax, ymax]. It is assumed that the coordinates are in EPSG:4326 although currently no checks are made to enforce this.
- theCellSize - cell size which the layer should be resampled to.
This argument will be ignored for vector layers and if not provided for a raster layer, the native raster cell size will be used.
- theExtraKeywords - Optional keywords dictionary to be added to
output layer
Convert a multipart geometry to a list of single parts. This method was adapted from Carson Farmer’s fTools doGeometry implementation in QGIS.
A helper to get a little kml doc for an extent so that we can use it with gdal warp for clipping.