salem.Map.set_geometry

Map.set_geometry(geometry=None, crs=<pyproj.Proj object at 0x7f02c81c1a10>, text=None, text_delta=(0.01, 0.01), text_kwargs={}, **kwargs)

Adds any Shapely geometry to the map.

If called without arguments, it removes all previous geometries.

Parameters:

geometry: a Shapely gometry object (must be a scalar!)

crs: the associated coordinate reference system (default wgs84)

text: if you want to add a text to the geometry (it’s position is

based on the geometry’s centroid)

text_delta: it can be useful to shift the text of a certain amount

when annotating points. units are percentage of data coordinates.

text_kwargs: the keyword arguments to pass to the test() function

kwargs: any keyword associated with the geometrie’s plotting function::

  • Point: all keywords accepted by scatter(): marker, s, edgecolor,

facecolor...

  • Line: all keywords accepted by plot(): color, linewidth...
  • Polygon: all keywords accepted by PathPatch(): color, edgecolor,

facecolor, linestyle, linewidth, alpha...