Table of contents Index

class GvLayer - Base class for display layers.

Declared in module gview

Inheritance hierarchy:

gview.GvLayer
  gview.GvData
    gtk.GtkData

Synopsis

class GvLayer(GvData):
    def gview.GvLayer.__init__(self, _obj=None)
    def gview.GvLayer.display_change(self) # Send a display property notification.
    def gview.GvLayer.extents(self) # Return extents of layer.
    def gview.GvLayer.is_visible(self) # Check if layer is visible.
    def gview.GvLayer.launch_properties(self) # Launch a properties panel for this layer.
    def gview.GvLayer.reproject(self, projection) # Attempt to change view projection.
    def gview.GvLayer.set_visible(self, visible) # Set layer visibility.

    # Inherited from gtk.GtkObject
    def gtk.GtkObject.__cmp__(self, other)
    def gtk.GtkObject.__getattr__(self, attr)
    def gtk.GtkObject.__getitem__(self, key)
    def gtk.GtkObject.__hash__(self)
    def gtk.GtkObject.__init__(self, _obj=None)
    def gtk.GtkObject.__setitem__(self, key, v)
    def gtk.GtkObject.connect(self, name, f, *extra)
    def gtk.GtkObject.connect(self, name, f, *extra)
    def gtk.GtkObject.connect_after(self, name, f, *extra)
    def gtk.GtkObject.connect_after(self, name, f, *extra)
    def gtk.GtkObject.connect_object(self, name, f, obj, *extra)
    def gtk.GtkObject.connect_object(self, name, f, obj, *extra)
    def gtk.GtkObject.connect_object_after(self, name, f, obj, *extra)
    def gtk.GtkObject.destroy(self, _obj=None)
    def gtk.GtkObject.disconnect(self, id)
    def gtk.GtkObject.emit(self, signal, *args)
    def gtk.GtkObject.emit_stop_by_name(self, sig)
    def gtk.GtkObject.flags(self, mask=None)
    def gtk.GtkObject.get_data(self, key)
    def gtk.GtkObject.remove_data(self, key)
    def gtk.GtkObject.set(self, dict)
    def gtk.GtkObject.set_data(self, key, value)
    def gtk.GtkObject.set_flags(self, flags)
    def gtk.GtkObject.signal_handler_block(self, id)
    def gtk.GtkObject.signal_handler_unblock(self, id)
    def gtk.GtkObject.signal_handlers_destroy(self)
    def gtk.GtkObject.unset_flags(self, flags)

    # Inherited from gview.GvData
    def gview.GvData.__init__(self, _obj=None)
    def gview.GvData.changed(self) # Emit GvData changed signal.
    def gview.GvData.get_name(self) # Fetch the name of this GvData.
    def gview.GvData.get_parent(self) # Fetch parent GvData object.
    def gview.GvData.get_projection(self) # Fetch projection, if any.
    def gview.GvData.get_properties(self) # Get GvData properties (attributes) as a dictionary.
    def gview.GvData.get_property(self, name) # Get a GvData property.
    def gview.GvData.set_name(self, name) # Set the name of this GvData.
    def gview.GvData.set_projection(self, projection) # Set the projection.
    def gview.GvData.set_property(self, name, value) # Set a GvData property.

    # Inherited from gtk.GtkData
    def gtk.GtkData.__init__(self, _obj=None)

Description

Signals:

setup
called when the layer is being setup. Internal use.
teardown
called when the layer is being destroyed. Internal use.
draw
called after normal drawing is complete on the layer. Gives tools an opportunity to draw layer specific overlays.
get-extents
called to fetch extents of layer. Takes a GvRect as an argument (not clear to me why this is a signal).
display-change
called to indicate a display property (colour, interpolation method, etc) of this layer has changed. Triggers redraw.

gview.GvLayer.extents(self)

Return extents of layer.

The extents are returned as a tuple (xmin,ymin,xmax,ymax).

gview.GvLayer.launch_properties(self)

Launch a properties panel for this layer.

Returns the dialog object, or None if none can be created.

gview.GvLayer.reproject(self, projection)

Attempt to change view projection.

Currently this only works for rasters, but eventually it will modify the display projection of any kind of GvLayer.

Returns 0 on failure, or non-zero on success.

gview.GvData.changed(self)

Emit GvData changed signal.

Send a notification that this data has changed, with a NULL change_info value.

gview.GvData.get_parent(self)

Fetch parent GvData object.

This is typically used to get the underlying GvData on which a GvLayer (which is also a GvData) depends.

gview.GvData.get_projection(self)

Fetch projection, if any.

The projection is normally expressed in OpenGIS Well Known Text format or an empty string if no value is available.

gview.GvData.get_properties(self)

Get GvData properties (attributes) as a dictionary.

The properties are returned as a Python dictionary. Note that changes to this dictionary are not applied back to the GvData.

gview.GvData.get_property(self, name)

Get a GvData property.

name
the key or name of the property being set. Should be a well behaved token (no spaces, equal signs, or colons).

NOTE: Returns None if property does not exist.

gview.GvData.set_projection(self, projection)

Set the projection.

This method won't actually modify the data geometry, only the interpretation of the geometry.

gview.GvData.set_property(self, name, value)

Set a GvData property.

name
the key or name of the property being set. Should be a well behaved token (no spaces, equal signs, or colons).
value
the value to be assigned. Any text is acceptable.

Valid HTML 4.0! Made with CSS