Helper tools and custom components for binding OGR and Qt4.
Functions
geometryToGraphicsItem(geom[, transform]) | Convert an OGR geometry into a Qt4 graphics item. |
layerToGraphicsItem(layer[, srs, transform]) | Convert an OGR layer into a Qt4 graphics item. |
singleGeometryToGraphicsItem(geom[, transform]) | Convert a single OGR geometry into a Qt4 graphics item. |
transformGeometry(geom, transform) | Apply an OSR transform to an OGR geometry. |
the max number of features that are converted whan the graphics item for a layer is generated
Convert an OGR geometry into a Qt4 graphics item.
If the transform callable is provided then each point in the geometry is converted using the transform(x, y, z) call before genereting the graphics item path.
Parameters: |
|
---|---|
Returns: | a Qt4 graphics item representing the geometry |
See also
Convert an OGR layer into a Qt4 graphics item.
If the srs parameter is provided each feature is converted into the target spatial reference system before generating the graphics item.
If the transform callable is provided then each point in the geometry is converted using the transform(x, y, z) call before genereting the graphics item path.
Parameters: |
|
---|---|
Returns: | a Qt4 graphics item (QGraphicsItemGroup) representing the layer |
Convert a single OGR geometry into a Qt4 graphics item.
A “single geometry” is an OGR gemetry that don’t include other geometries (GetGeometryCount() == 0).
If the transform callable is provided then each point in the geometry is converted using the transform(x, y, z) call before genereting the graphics item path.
Parameters: |
|
---|---|
Returns: | a Qt4 graphics item representing the geometry |
See also
Apply an OSR transform to an OGR geometry.
This function is almost equal to the ogr.Geometry.Transform method but raises an exception if the conversion fails and clone the geometry before performing the transformation in order to leave the original geometry unmodified.
Parameters: |
|
---|---|
Returns: | a new geometry instance with transforation applied |