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.
Helper function to adjust the clip extent to the edge of the pixel.
This function will shift all edges of the extent to the outmost edge of the raster’s pixel row or column on which the edge coincides.
Parameters: |
|
---|---|
Returns: | An array containing an the adjusted clip extent in the form [xmin, ymin, xmax, ymax] |
Return type: | list |
Clip a geometry (linestring or polygon) using a clip polygon.
To do this we combine the clip polygon with the input geometry which will add nodes to the input geometry where it intersects the clip polygon. Next we get the symmetrical difference between the input geometry and the combined geometry.
Parameters: |
|
---|---|
Returns: | A new geometry clipped to the region of the clip polygon. |
Return type: | QgsGeometry |
Clip a Hazard or Exposure layer to the extents provided.
Note
Will delegate to clipVectorLayer or clipRasterLayer as needed.
Parameters: |
|
---|---|
Returns: | Clipped layer (placed in the system temp dir). The output layer will be reprojected to EPSG:4326 if needed. |
Return type: | QgsMapLayer |
Convert a multipart geometry to a list of single parts.
This method was adapted from Carson Farmer’s fTools doGeometry implementation in QGIS.
Parameters: | geometry (QgsGeometry) – A geometry to be exploded it it is multipart. |
---|---|
Returns: | A list of single part geometries. |
Return type: | list |
Convert the supplied extent to geographic and return as as array.
Parameters: |
|
---|---|
Returns: | Transformed extents in EPSG:4326 in the form [xmin, ymin, xmax, ymax] |