# pointpats.dtot

pointpats.dtot(coord, points) → float
pointpats.dtot(coord: ndarray, points: ndarray) → float
pointpats.dtot(coord: Point, points: GeoPandasBase) → float

  Sum of Euclidean distances between event points and a selected point.

  Parameters:
    coord

      starting point

    points arraylike

      array representing a point pattern

  Returns:
    distance

      sum of Euclidean distances.

  Examples

      >>> import numpy as np
      >>> import geopandas as gpd
      >>> import shapely

  Create an array of point coordinates.

      >>> coords = np.array(
      ...     [
      ...         [66.22, 32.54],
      ...         [22.52, 22.39],
      ...         [31.01, 81.21],
      ...         [9.47, 31.02],
      ...         [30.78, 60.10],
      ...         [75.21, 58.93],
      ...         [79.26, 7.68],
      ...         [8.23, 39.93],
      ...         [98.73, 77.17],
      ...         [89.78, 42.53],
      ...         [65.19, 92.08],
      ...     ]
      ... )

  Passing an array of coordinates returns a tuple capturing the bounds.

      >>> point = [30.78, 60.10]
      >>> dtot(point, coords)
      np.float64(465.3617957739617)

  The same applies to a GeoPandas object.

      >>> point = shapely.Point(point)
      >>> geoms = gpd.GeoSeries.from_xy(*coords.T)
      >>> dtot(point, geoms)
      np.float64(465.3617957739617)