v_sim.Map

g GObject.Object GObject.Object v_sim.Map v_sim.Map GObject.Object->v_sim.Map

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

getLegendPosition (dir)

class

getLegendScale ()

class

new ()

class

new_fromPlane (plane)

compute_sync ()

draw (prec, shade, rgb, alpha)

export (shade, rgb, precision, filename, format)

getField ()

getFieldMinMax ()

getPlane ()

getScaledMinMax ()

getScalingRange ()

setField (field)

setLevel (glPrec, gross, refLength)

setLines (nIsoLines, minmax)

setPlane (plane)

setScaling (scale)

setScalingRange (minMax)

setSurface (surface)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

field

v_sim.ScalarField

r/w

projection field

plane

v_sim.Plane

r/w

projection plane

range-min-max

GLib.Array

r/w

min / max range to normalise data

scale

int

r/w

scaling scheme of input values

surface

v_sim.Surface

r/w

projection surface

Signals

Inherited:

GObject.Object (1)

Name

Short Description

changed

This signal is emitted each time the map has been changed and recomputed.

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

priv

v_sim.MapPrivate

r

Class Details

class v_sim.Map(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

v_sim.MapClass

Common name to refer to a #_VisuMap.

classmethod getLegendPosition(dir)
Parameters:

dir (v_sim.XyzDir) – v_sim.XyzDir.X or v_sim.XyzDir.Y

Returns:

the static legend position on screen in reduced coordinates.

Return type:

float

Retrieve information about the static legend attached to maps.

New in version 3.7.

classmethod getLegendScale()
Returns:

the scale factor of the static legend associated to maps.

Return type:

float

Retrieve information about the static legend attached to maps.

New in version 3.7.

classmethod new()
Returns:

a newly created v_sim.Map object.

Return type:

v_sim.Map

Creates a new v_sim.Map object.

New in version 3.6.

classmethod new_fromPlane(plane)
Parameters:

plane (v_sim.Plane) – a v_sim.Plane object.

Returns:

a newly created v_sim.Map object.

Return type:

v_sim.Map

Creates a new v_sim.Map object, projected on plane.

New in version 3.6.

compute_sync()

For later use. Currently computation of maps is always synchronous.

New in version 3.8.

draw(prec, shade, rgb, alpha)
Parameters:

It draws the self with the given shade. prec give the level of refinement used to draw the map, 100 means normal and 200 means twice smaller level. If rgb is present, this colour is used for possible isolines. If alpha is True, an alpha channel is added as a linear variation of the value of each vertex.

New in version 3.6.

export(shade, rgb, precision, filename, format)
Parameters:
Raises:

GLib.Error

Returns:

True if no error.

Return type:

bool

Export the given map to the format, using the shade color. If rgb is provided and self has some isolines, they will be drawn with this colour, otherwise an inverse colour is used.

New in version 3.6.

getField()
Returns:

a v_sim.ScalarField or None.

Return type:

v_sim.ScalarField or None

Retrieves the field self is projected from.

New in version 3.8.

getFieldMinMax()
Returns:

two floats being the min and the max.

Return type:

float

After self has been computed, one can access the min and max values of the field as represented in the map. For scaled values, see v_sim.Map.getScaledMinMax().

New in version 3.6.

getPlane()
Returns:

a v_sim.Plane or None.

Return type:

v_sim.Plane or None

Retrieves the plane self is based on.

New in version 3.7.

getScaledMinMax()
Returns:

True if the map has been computed and minMax has valid values.

minMax:

two float location.

Return type:

(bool, minMax: [float])

After self has been computed, one can access the scaled min and max values represented in the map. For field values, see v_sim.Map.getFieldMinMax().

New in version 3.6.

getScalingRange()
Returns:

a min / max range.

Return type:

[float]

Retrieves the min and max values used to scale the data in self.

New in version 3.8.

setField(field)
Parameters:

field (v_sim.ScalarField) – a v_sim.ScalarField object.

Returns:

True if field is changed.

Return type:

bool

It associates the values of field to self.

New in version 3.6.

setLevel(glPrec, gross, refLength)
Parameters:
Returns:

True if the level is actually changed.

Return type:

bool

Setup the level of recursivity in triangle calculation, depending on the current zoom level.

New in version 3.6.

setLines(nIsoLines, minmax)
Parameters:
  • nIsoLines (int) – number of required isolines.

  • minmax (float) – span for isoline values.

Returns:

True if lines are successfully calculated.

Return type:

bool

Calculate nIsoLines equally distributed in minmax.

New in version 3.6.

setPlane(plane)
Parameters:

plane (v_sim.Plane or None) – a v_sim.Plane object.

Returns:

True if internal plane is changed.

Return type:

bool

Set the internal v_sim.Plane of self to plane. All changed to plane will be automatically propagated to self. Use v_sim.Map.setField() to choose the field to take values from, set the level precision with v_sim.Map.setLevel().

New in version 3.7.

setScaling(scale)
Parameters:

scale (v_sim.MatrixScalingFlag) – a flag.

Returns:

True if scale is changed.

Return type:

bool

The scaling algorithm to transform input values into [0;1] is defined by scale.

New in version 3.8.

setScalingRange(minMax)
Parameters:

minMax ([float] or None) – two floats defining a range for input scaling.

Returns:

True if minMax is changed.

Return type:

bool

If minMax is provided, these values are used to scale the values of field to [0;1], otherwise the minMax values of the field itself are used.

New in version 3.8.

setSurface(surface)
Parameters:

surface (v_sim.Surface or None) – a v_sim.Surface object.

Returns:

True if internal surface is changed.

Return type:

bool

Set the internal v_sim.Surface of self to surface. All changed to surface will be automatically propagated to self. Use v_sim.Map.setField() to choose the field to take values from, set the level precision with v_sim.Map.setLevel().

New in version 3.8.

Signal Details

v_sim.Map.signals.changed(map)
Signal Name:

changed

Flags:

RUN_LAST, NO_RECURSE, NO_HOOKS

Parameters:

map (v_sim.Map) – The object which received the signal

This signal is emitted each time the map has been changed and recomputed.

New in version 3.8.

Property Details

v_sim.Map.props.field
Name:

field

Type:

v_sim.ScalarField

Default Value:

None

Flags:

READABLE, WRITABLE

projection field

v_sim.Map.props.plane
Name:

plane

Type:

v_sim.Plane

Default Value:

None

Flags:

READABLE, WRITABLE

projection plane

v_sim.Map.props.range_min_max
Name:

range-min-max

Type:

GLib.Array

Default Value:

None

Flags:

READABLE, WRITABLE

min / max range to normalise data

v_sim.Map.props.scale
Name:

scale

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

scaling scheme of input values

v_sim.Map.props.surface
Name:

surface

Type:

v_sim.Surface

Default Value:

None

Flags:

READABLE, WRITABLE

projection surface