MapView#

class cegalprizm.investigator.MapView(investigation: cegalprizm.investigator.inv.investigation.Investigation)#

A class representing a MapView

The view defines how a map should be displayed. It allows control of both what data should be displayed and how the the data should be rendered.

Functions

__init__(investigation)

copy()

Create a copy of this view

create_property_views([property_names])

Creates a copy of this view for each property specified

create_zone_property_views([zone_properties])

Creates a copy of this view for each zone property specified

create_zone_views([zone_names])

Creates a copy of this view for each zone specified

get_json()

Gets the json string representing the current view

set_boreholes(borehole_names)

Set the boreholes to be shown in the view

set_colorscale_location(inside_viewport, ...)

Set where in the plot the points colorscale is to be shown.

set_grid(grid_name)

Set the grid to be shown on the map

set_interpolate(interpolate)

Set whether the map data should be interpolated

set_k(value)

Set the k layer to be displayed on the map

set_property(property_name)

Set the property to be shown on the map

set_surface(surface_name)

Set the surface to be shown in the view

set_z(value)

Set the z to be displayed on the map

set_zone(zone_name)

Set the zone to be shown in the view

set_zone_property(zone_property)

Set the zone property to be shown in the view

show_boreholes(show[, show_labels, ...])

Set whether the borehole should be shown on the map.

show_colorscale(show)

Set whether the points colorscale is shown

show_colorscale_frame(show_frame)

Set whether the frame should be shown around the points colorscale

show_contours(show)

Set whether the contours should be shown on the map

show_depth_property()

Sets the depth map to be shown

copy()#

Create a copy of this view

Returns

the copied view

Return type

MapView

create_property_views(property_names: Union[str, Sequence[str]] = 'all') List[cegalprizm.investigator.views.predefined_view_tuple.PredefinedViewTuple]#

Creates a copy of this view for each property specified

Parameters

property_names (Union[str, Sequence[str]], optional) – Defaults to ‘all’. - ‘all’ will duplicate the view for all the valid properties from the investigation - a list of property names to be used

Returns

a list of views; one per specified property

Return type

List[PredefinedViewTuple]

create_zone_property_views(zone_properties: Union[str, Sequence[str]] = 'all') List[cegalprizm.investigator.views.predefined_view_tuple.PredefinedViewTuple]#

Creates a copy of this view for each zone property specified

Parameters

zone_properties (Union[str, Sequence[str]], optional) – Defaults to ‘all’. - ‘all’ will duplicate the view for all the valid zone properties - a list of zone properties to be used

Returns

a list of views; one per specified zone property

Return type

List[PredefinedViewTuple]

create_zone_views(zone_names: Union[str, Sequence[str]] = 'all') List[cegalprizm.investigator.views.predefined_view_tuple.PredefinedViewTuple]#

Creates a copy of this view for each zone specified

Parameters

zone_names (Union[str, Sequence[str]], optional) – Defaults to ‘all’. - ‘all’ will duplicate the view for all the valid zone from the investigation - a list of zone names to be used

Returns

a list of views; one per specified zone

Return type

List[PredefinedViewTuple]

get_json() str#

Gets the json string representing the current view

Returns

The json string

Return type

str

set_boreholes(borehole_names: Sequence[str])#

Set the boreholes to be shown in the view

Parameters

borehole_names (Sequence[str]) – The list of borehole to be used

set_colorscale_location(inside_viewport: bool, location: str)#

Set where in the plot the points colorscale is to be shown.

Valid locations outside viewport are ‘left’ or ‘right’ Valid locations inside viewport are ‘top-left’ or ‘top-right’ or ‘bottom-left’ or ‘bottom-right’

Parameters
  • inside_viewport (bool) – If True, the colorscale will be shown inside the viewport

  • location (str) – A string indicating the desired location of the colorscale

Raises

ValueError – if the location is not a valid string

set_grid(grid_name: str)#

Set the grid to be shown on the map

Parameters

grid_name (str) – The name of the grid to be used

Raises

ValueError – if grid_name is not valid

set_interpolate(interpolate: bool)#

Set whether the map data should be interpolated

Parameters

show (bool) – Should the data be interpolated

set_k(value: int)#

Set the k layer to be displayed on the map

Parameters

value (int) – The k value to be used

Raises

ValueError – if value is not valid

set_property(property_name: str)#

Set the property to be shown on the map

Parameters

property_name (str) – The name of the property to be used

Raises

ValueError – if property_name is not valid

set_surface(surface_name: str)#

Set the surface to be shown in the view

Parameters

surface_name (str) – The name of the surface to be used

set_z(value: Union[int, float])#

Set the z to be displayed on the map

Parameters

value (Union[int, float]) – The z value to be used

Raises

ValueError – if value is not valid

set_zone(zone_name: str)#

Set the zone to be shown in the view

Parameters

zone_name (str) – The name of the zone to be used

set_zone_property(zone_property: str)#

Set the zone property to be shown in the view

Parameters

zone_property (str) – The name of the zone property to be used

show_boreholes(show: bool, show_labels: bool = False, show_trajectories: bool = False)#

Set whether the borehole should be shown on the map. Optionally the label and trajectory can also be shown.

Parameters
  • show (bool) – Should the boreholes be shown

  • show_labels (bool) – Should the labels be shown

  • show_trajectories (bool) – Should the trajectories be shown

show_colorscale(show: bool)#

Set whether the points colorscale is shown

Parameters

show (bool) – Should the colorscale be shown

show_colorscale_frame(show_frame: bool)#

Set whether the frame should be shown around the points colorscale

Parameters

show (bool) – Should the colorscale be shown

show_contours(show: bool)#

Set whether the contours should be shown on the map

Parameters

show (bool) – Should the contours be shown

show_depth_property()#

Sets the depth map to be shown