pvfactors.geometry.base.BaseSurface

class pvfactors.geometry.base.BaseSurface(coords, normal_vector=None, index=None, param_names=None, params=None)[source]

BaseSurface will wrap the LineString class, but adding an orientation to it (normal vector). So two surfaces could use the same linestring, but have opposite orientations.

__init__(coords, normal_vector=None, index=None, param_names=None, params=None)[source]

Create a surface using linestring coordinates. Normal vector can have two directions for a given LineString, so the user can provide it in order to be specific, otherwise it will be automatically calculated, but then the surface won’t know if it was supposed to be pointing “up” or “down”. If the surface is empty, the normal vector will take the default value.

Parameters:
  • coords (list) – List of linestring coordinates for the surface

  • normal_vector (list, optional) – Normal vector for the surface (Default = None, so will be calculated)

  • index (int, optional) – Surface index (Default = None)

  • param_names (list of str, optional) – Names of the surface parameters, eg reflectivity, total incident irradiance, temperature, etc. (Default = None)

  • params (dict, optional) – Surface float parameters (Default = None)

Methods

__init__(coords[, normal_vector, index, ...])

Create a surface using linestring coordinates.

buffer(*args, **kwargs)

Buffer the surface.

difference(linestring)

Calculate remaining surface after removing part belonging from provided linestring,

distance(*args, **kwargs)

Distance between the surface and another geometry.

dwithin(*args, **kwargs)

Check if the surface is within a certain distance of another geometry.

get_param(param)

Get parameter value from surface.

interpolate(*args, **kwargs)

Interpolate along the linestring by the given distance.

plot(ax[, color, with_index])

Plot the surface on the given axes.

update_params(new_dict)

Update surface parameters.

Attributes

boundary

Return the boundary of the surface.

centroid

coords

is_empty

Check if the surface is empty.

length

Return the length of the surface.