Skip to content

Commit

Permalink
Merge branch 'branch-0.15' of github.com:rapidsai/cuspatial into cusp…
Browse files Browse the repository at this point in the history
…-231-polygon-separation
  • Loading branch information
cwharris committed Jul 21, 2020
2 parents 53f3ce6 + 688a604 commit 0679517
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 2 additions & 0 deletions python/cuspatial/cuspatial/_lib/polygon_separation.pyx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright (c) 2020, NVIDIA CORPORATION.

from cudf._lib.column cimport column, column_view, Column
from cudf._lib.move cimport move, unique_ptr

Expand Down
25 changes: 24 additions & 1 deletion python/cuspatial/cuspatial/core/gis.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,30 @@ def directed_hausdorff_distance(xs, ys, offsets):
return DataFrame.from_gpu_matrix(result)


def directed_polygon_separation(xs, ys, offsets):
def directed_polygon_point_distance(xs, ys, offsets):
"""Compute the directed polygon-point distances between all pairs of
polygons.
Parameters
----------
xs
column of x-coordinates
ys
column of y-coordinates
offsets
number of points in each space
Returns
-------
result : cudf.DataFrame
The pairwise directed distance matrix with one row and one column per input
polygon; the value at row `i`, column `j` represents the polygon-point distance
from polygon i to any vertex in polygon j.
Examples
--------
... TODO ...
"""
xs, ys = normalize_point_columns(as_column(xs), as_column(ys))
offsets = as_column(offsets, dtype="int32")
result = cpp_directed_polygon_separation(xs, ys, offsets)
Expand Down

0 comments on commit 0679517

Please sign in to comment.