diff --git a/CMakeLists.txt b/CMakeLists.txt index f6109f33..45c00d96 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -161,6 +161,7 @@ set(xmsgrid_py xmsgrid/python/xmsgrid_py.cpp # Geometry xmsgrid/python/geometry/geometry_py.cpp + xmsgrid/python/geometry/GmMultiPolyIntersector_py.cpp xmsgrid/python/geometry/GmTriSearch_py.cpp # Triangulate xmsgrid/python/triangulate/triangulate_py.cpp diff --git a/_package/tests/unit_tests/geometry_tests/multi_poly_intersector_pyt.py b/_package/tests/unit_tests/geometry_tests/multi_poly_intersector_pyt.py new file mode 100644 index 00000000..3cfc21f7 --- /dev/null +++ b/_package/tests/unit_tests/geometry_tests/multi_poly_intersector_pyt.py @@ -0,0 +1,141 @@ +"""Tests for the MultiPolyIntersector class.""" + +__copyright__ = "(C) Copyright Aquaveo 2023" +__license__ = "See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt" + +# 1. Standard python modules +import math +import unittest + +# 2. Third party modules + +# 3. Aquaveo modules + +# 4. Local modules +from xms import grid + + +def _zeroed_z(points) -> list[list[float]]: + """Returns the points with 0.0 for z values.""" + return [[point[0], point[1], 0.0] for point in points] + + +class TestMultiPolyIntersector(unittest.TestCase): + """Tests for the MultiPolyIntersector class.""" + + def setUp(self): + """Runs before each test case.""" + pass + + def _run_test(self, pt1, pt2, poly_points, polys, poly_ids, t_vals, pts, starting_id=1, query='covered_by'): + """Runs the test.""" + mpi = grid.geometry.MultiPolyIntersector(poly_points, polys, starting_id, query) + + # Traverse the line segment + out_poly_ids, out_t_vals, out_pts = mpi.traverse_line_segment(pt1, pt2) + + # Check poly ids + assert len(out_poly_ids) == len(poly_ids) + assert_str = f'Expected {poly_ids}. Got {out_poly_ids}' + assert out_poly_ids == poly_ids, assert_str + + # Check t vals + assert len(out_t_vals) == len(t_vals) + for out_t_val, t_val in zip(out_t_vals, t_vals): + assert_str = f'Expected {t_val}. Got {out_t_val}' + assert math.isclose(out_t_val, t_val), assert_str + + # Check points + assert len(out_pts) == len(pts) + for idx, (out_point, point) in enumerate(zip(_zeroed_z(out_pts), _zeroed_z(pts))): + for i in range(3): + assert_str = f'Point {idx}[{i}], : Expected {point[i]}. Got {out_point[i]}' + assert math.isclose(out_point[i], point[i]), assert_str + + def test_traverse_line_segment_1_out_out(self): + r"""A test. + + (10,10) + 3-------------2 + | | + 0------------------1 + | | + | 1 | + | | + 0-------------1 + (0,0) + """ + # Use lists to prove that we can + pts = [[0, 0, 0], [10, 0, 0], [10, 10, 0], [0, 10, 0]] + polys = [[0, 1, 2, 3]] + expected_ids = (1, -1) + expected_t_vals = (0.08333333333333333, 0.91666666666666667) + expected_pts = ((0.0, 5.0, 0.0), (10.0, 5.0, 0.0)) + self._run_test([-1, 5], [11, 5], pts, polys, expected_ids, expected_t_vals, expected_pts) + expected_ids = (0, -1) + self._run_test([-1, 5], [11, 5], pts, polys, expected_ids, expected_t_vals, expected_pts, 0, 'intersects') + + def test_traverse_line_segment_1_out_in(self): + """A test. + + (10,10) + 3-------------2 + | | + 0----------1 | + | | + | 1 | + | | + 0-------------1 + (0,0) + """ + # Use tuples to prove that we can + pts = ((0, 0, 0), (10, 0, 0), (10, 10, 0), (0, 10, 0)) + polys = [(0, 1, 2, 3)] + expected_ids = (1, -1) + expected_t_vals = (0.11111111111111111, 1.0) + expected_pts = ((0.0, 5.0, 0.0), (8.0, 5.0, 0.0)) + self._run_test((-1, 5), (8, 5), pts, polys, expected_ids, expected_t_vals, expected_pts) + expected_ids = (2, -1) + self._run_test((-1, 5), (8, 5), pts, polys, expected_ids, expected_t_vals, expected_pts, 2, 'intersects') + + def test_polygon_from_point(self): + r"""A test. + + (0,20) + 3-------------2 + | | + | | + | *1 | * + | | + | | + 0------*-----*1------*------6 + | | + | | + | *2 | + * | | + | | + 4-------------5 + (0,0) (20,0) + """ + pts = [(0, 10, 0), (10, 10, 0), (10, 20, 0), (0, 20, 0), (10, 0, 0), (20, 0, 0), (20, 10, 0)] + polys = [(0, 1, 2, 3), (4, 5, 6, 1)] + mpi = grid.geometry.MultiPolyIntersector(pts, polys) + assert mpi.polygon_from_point((5, 5, 0)) == -1 + assert mpi.polygon_from_point((5, 10, 0)) == 1 + assert mpi.polygon_from_point((5, 15, 0)) == 1 + assert mpi.polygon_from_point((10, 10, 0)) == 1 + assert mpi.polygon_from_point((15, 15, 0)) == -1 + assert mpi.polygon_from_point((15, 10, 0)) == 2 + assert mpi.polygon_from_point((15, 5, 0)) == 2 + mpi = grid.geometry.MultiPolyIntersector(pts, polys, query='intersects') + assert mpi.polygon_from_point((5, 5, 0)) == -1 + assert mpi.polygon_from_point((5, 10, 0)) == 1 + assert mpi.polygon_from_point((5, 15, 0)) == 1 + assert mpi.polygon_from_point((10, 10, 0)) == 1 + assert mpi.polygon_from_point((15, 15, 0)) == -1 + assert mpi.polygon_from_point((15, 10, 0)) == 2 + assert mpi.polygon_from_point((15, 5, 0)) == 2 + + +if __name__ == '__main__': + unittest.main() diff --git a/_package/xms/grid/__init__.py b/_package/xms/grid/__init__.py index fbff5907..97dd6980 100644 --- a/_package/xms/grid/__init__.py +++ b/_package/xms/grid/__init__.py @@ -3,4 +3,4 @@ from . import triangulate # NOQA: F401 from . import ugrid # NOQA: F401 -__version__ = '7.7.6' +__version__ = '7.8.0' diff --git a/_package/xms/grid/geometry/__init__.py b/_package/xms/grid/geometry/__init__.py index 16a1db1a..7d1b8be6 100644 --- a/_package/xms/grid/geometry/__init__.py +++ b/_package/xms/grid/geometry/__init__.py @@ -1,3 +1,4 @@ """Initialize the module.""" from . import geometry # NOQA: F401 +from .multi_poly_intersector import MultiPolyIntersector # NOQA: F401 from .tri_search import TriSearch # NOQA: F401 diff --git a/_package/xms/grid/geometry/multi_poly_intersector.py b/_package/xms/grid/geometry/multi_poly_intersector.py new file mode 100644 index 00000000..f00c62e4 --- /dev/null +++ b/_package/xms/grid/geometry/multi_poly_intersector.py @@ -0,0 +1,106 @@ +"""Pure Python wrapper for GmMultiPolyIntersector class.""" + +__copyright__ = "(C) Copyright Aquaveo 2023" +__license__ = "See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt" + +# 1. Standard python modules + +# 2. Third party modules + +# 3. Aquaveo modules + +# 4. Local modules +from .._xmsgrid.geometry import GmMultiPolyIntersector + + +class MultiPolyIntersector(object): + """Intersects a line segment with any number of polygons in 2D and returns the polygons in order with t values.""" + + def __init__(self, points, polys, starting_id=1, query='covered_by', **kwargs) -> None: + """Constructor. + + Args: + points (list): The points that make up the polygon. + polys (list): 0-based indexes into a_points array to define polygons. The first point is NOT repeated as + the last point. + starting_id (int): If the polygon IDs should start at something other than 1, specify the starting value. + query (str): The query to use ('covered_by', 'intersects') + **kwargs (dict): Generic keyword arguments + """ + if 'instance' not in kwargs: + if not points: + raise ValueError('points is a required arguments.') + if not polys: + raise ValueError('polys is a required argument.') + if query not in {'covered_by', 'intersects'}: + raise ValueError('query must be either "covered_by" or "intersects".') + self._instance = GmMultiPolyIntersector(points, polys, starting_id, query) + else: + if not isinstance(kwargs['instance'], GmMultiPolyIntersector): + raise ValueError('"instance" must be of type _xmsgrid.geometry.GmMultiPolyIntersector') + self._instance = kwargs['instance'] + + def __eq__(self, other) -> bool: + """Equality operator. + + Args: + other (MultiPolyIntersector): MultiPolyIntersector to compare + + Returns: + bool: True if MultiPolyIntersector are equal + """ + other_instance = getattr(other, '_instance', None) + if not other_instance or not isinstance(other_instance, GmMultiPolyIntersector): + print("not instance or no value") + return False + return other_instance == self._instance + + def __ne__(self, other) -> bool: + """Equality operator. + + Args: + other (MultiPolyIntersector): MultiPolyIntersector to compare + + Returns: + bool: True if MultiPolyIntersector are not equal + """ + result = self.__eq__(other) + return not result + + # Why define these? + # def __repr__(self) -> str: + # """Returns a string representation of the MultiPolyIntersector.""" + # return "" + # + # def __str__(self) -> str: + # """Returns a string representation of the MultiPolyIntersector.""" + # return "" + + def traverse_line_segment(self, pt1, pt2) -> tuple[tuple[int], tuple[float], tuple[tuple[float, float, float]]]: + """Intersect segment with polys and return intersected polys, t-values, and points. + + Args: + pt1 (iterable): 1st point defining a line segment. + pt2 (iterable): 2nd point defining a line segment. + + Returns: + tuple containing: + - Ids of polygons intersected by line segment. Can be zero or 1 based depending on starting_id. + - Values from 0.0 to 1.0 representing where on the line segment the intersection with the polygon occurs. + If there are any t values there are always at least 2 and all represent where the line enters the polygon, + except the last which represents where it exited. There would therefore be one more t value than poly id + but we make the sizes equal by always making the last poly id -1. + - Intersection points. + """ + return self._instance.TraverseLineSegment(pt1, pt2) + + def polygon_from_point(self, point) -> int: + """Returns the ID of the polygon containing the point. + + Args: + point (iterable): The point. + + Returns: + The polygon id. + """ + return self._instance.PolygonFromPoint(point) diff --git a/pydocs/source/index.rst b/pydocs/source/index.rst index bb4e83c2..83273049 100644 --- a/pydocs/source/index.rst +++ b/pydocs/source/index.rst @@ -36,6 +36,7 @@ Index * :doc:`modules/ugrid/UGrid` * :doc:`modules/ugrid/ugrid_utils` +* :doc:`modules/geometry/MultiPolyIntersector` * :doc:`modules/geometry/TriSearch` * :doc:`modules/triangulate/Tin` @@ -46,6 +47,7 @@ Index modules/ugrid/UGrid.rst modules/ugrid/ugrid_utils.rst + modules/geometry/MultiPolyIntersector.rst modules/geometry/TriSearch.rst modules/triangulate/Tin.rst diff --git a/pydocs/source/modules/geometry/MultiPolyIntersector.rst b/pydocs/source/modules/geometry/MultiPolyIntersector.rst new file mode 100644 index 00000000..ad8e889e --- /dev/null +++ b/pydocs/source/modules/geometry/MultiPolyIntersector.rst @@ -0,0 +1,10 @@ +******************** +MultiPolyIntersector +******************** + +Intersects a line segment with any number of polygons in 2D and returns the polygons in order with t values. + +.. autoclass:: xms.grid.geometry.MultiPolyIntersector + :members: + + .. automethod:: __init__ \ No newline at end of file diff --git a/xmsgrid/geometry/GmBoostTypes.h b/xmsgrid/geometry/GmBoostTypes.h index 22231555..2f794811 100644 --- a/xmsgrid/geometry/GmBoostTypes.h +++ b/xmsgrid/geometry/GmBoostTypes.h @@ -4,7 +4,7 @@ /// \brief boost::geometry types /// \ingroup geometry /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/geometry/GmExtents.cpp b/xmsgrid/geometry/GmExtents.cpp index c0241bff..6a22d5d0 100644 --- a/xmsgrid/geometry/GmExtents.cpp +++ b/xmsgrid/geometry/GmExtents.cpp @@ -2,7 +2,7 @@ /// \file /// \ingroup geometry /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/geometry/GmExtents.h b/xmsgrid/geometry/GmExtents.h index c6b175bd..4a6b2d1a 100644 --- a/xmsgrid/geometry/GmExtents.h +++ b/xmsgrid/geometry/GmExtents.h @@ -3,7 +3,7 @@ /// \file /// \ingroup geometry /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/geometry/GmExtents.t.h b/xmsgrid/geometry/GmExtents.t.h index 9efb2d4f..cd80bc28 100644 --- a/xmsgrid/geometry/GmExtents.t.h +++ b/xmsgrid/geometry/GmExtents.t.h @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ /// \file /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ #pragma once diff --git a/xmsgrid/geometry/GmMultiPolyIntersectionSorter.h b/xmsgrid/geometry/GmMultiPolyIntersectionSorter.h index 889cd761..94da8a7e 100644 --- a/xmsgrid/geometry/GmMultiPolyIntersectionSorter.h +++ b/xmsgrid/geometry/GmMultiPolyIntersectionSorter.h @@ -3,7 +3,7 @@ /// \file /// \ingroup geometry /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/geometry/GmMultiPolyIntersectionSorterTerse.cpp b/xmsgrid/geometry/GmMultiPolyIntersectionSorterTerse.cpp index 6352fdaf..7a01f85f 100644 --- a/xmsgrid/geometry/GmMultiPolyIntersectionSorterTerse.cpp +++ b/xmsgrid/geometry/GmMultiPolyIntersectionSorterTerse.cpp @@ -2,7 +2,7 @@ /// \file /// \ingroup geometry /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/geometry/GmMultiPolyIntersectionSorterTerse.h b/xmsgrid/geometry/GmMultiPolyIntersectionSorterTerse.h index 9e18c359..bbb7e5ed 100644 --- a/xmsgrid/geometry/GmMultiPolyIntersectionSorterTerse.h +++ b/xmsgrid/geometry/GmMultiPolyIntersectionSorterTerse.h @@ -3,7 +3,7 @@ /// \file /// \ingroup geometry /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/geometry/GmMultiPolyIntersector.cpp b/xmsgrid/geometry/GmMultiPolyIntersector.cpp index 083d50a9..33520e4f 100644 --- a/xmsgrid/geometry/GmMultiPolyIntersector.cpp +++ b/xmsgrid/geometry/GmMultiPolyIntersector.cpp @@ -2338,7 +2338,7 @@ void GmMultiPolyIntersector2IntermediateTests::testPointOnPolygonVertex() {118.66666666666669, 93.33333333333333, 0.0}, {100.0, 100.0, 0.0} }; - + VecInt2d expectedPolyIds = { {167, -1}, {166, -1}, @@ -2412,7 +2412,7 @@ void GmMultiPolyIntersector2IntermediateTests::testPointOnPolygonVertex() {138.66666666666669, 93.33333333333333, 0.0}, {120.0, 100.0, 0.0} }; - + expectedPolyIds = { {}, {13, -1}, @@ -2497,7 +2497,7 @@ void GmMultiPolyIntersector2IntermediateTests::testPointsNearEdgePoints() VecDbl tValues; VecPt3d points; mpi->TraverseLineSegment(segmentPoints[0].x, segmentPoints[0].y, segmentPoints[1].x, segmentPoints[1].y, polyIds, tValues, points); - + VecInt expectedPolyIds = {1836, -1}; VecPt3d expectedPoints = { {958452.39285714, 498553.35714286, 0.0}, @@ -2525,4 +2525,4 @@ void GmMultiPolyIntersector2IntermediateTests::testPointsNearEdgePoints() //} // namespace xms -#endif +#endif \ No newline at end of file diff --git a/xmsgrid/geometry/GmMultiPolyIntersector.h b/xmsgrid/geometry/GmMultiPolyIntersector.h index 54b705fd..dc884623 100644 --- a/xmsgrid/geometry/GmMultiPolyIntersector.h +++ b/xmsgrid/geometry/GmMultiPolyIntersector.h @@ -77,4 +77,4 @@ class GmMultiPolyIntersector }; // class GmMultiPolyIntersector -} // namespace xms +} // namespace xms \ No newline at end of file diff --git a/xmsgrid/geometry/GmMultiPolyIntersector.t.h b/xmsgrid/geometry/GmMultiPolyIntersector.t.h index 2bb34722..8ffeb544 100644 --- a/xmsgrid/geometry/GmMultiPolyIntersector.t.h +++ b/xmsgrid/geometry/GmMultiPolyIntersector.t.h @@ -4,7 +4,7 @@ /// \file /// \ingroup geometry /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/geometry/GmMultiPolyIntersectorData.h b/xmsgrid/geometry/GmMultiPolyIntersectorData.h index 7c8008c9..bc93a613 100644 --- a/xmsgrid/geometry/GmMultiPolyIntersectorData.h +++ b/xmsgrid/geometry/GmMultiPolyIntersectorData.h @@ -3,7 +3,7 @@ /// \file /// \ingroup geometry /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/geometry/GmPolyLinePtRedistributer.cpp b/xmsgrid/geometry/GmPolyLinePtRedistributer.cpp index 2f0dbeb4..45a59694 100644 --- a/xmsgrid/geometry/GmPolyLinePtRedistributer.cpp +++ b/xmsgrid/geometry/GmPolyLinePtRedistributer.cpp @@ -2,7 +2,7 @@ /// \file /// \ingroup geometry /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/geometry/GmPolyLinePtRedistributer.h b/xmsgrid/geometry/GmPolyLinePtRedistributer.h index c50e51ba..2943d3de 100644 --- a/xmsgrid/geometry/GmPolyLinePtRedistributer.h +++ b/xmsgrid/geometry/GmPolyLinePtRedistributer.h @@ -2,7 +2,7 @@ /// \file /// \ingroup geometry /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ #pragma once diff --git a/xmsgrid/geometry/GmPolyLinePtRedistributer.t.h b/xmsgrid/geometry/GmPolyLinePtRedistributer.t.h index 8addf04b..0c0bec08 100644 --- a/xmsgrid/geometry/GmPolyLinePtRedistributer.t.h +++ b/xmsgrid/geometry/GmPolyLinePtRedistributer.t.h @@ -2,7 +2,7 @@ /// \file /// \ingroup geometry /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ #pragma once #ifdef CXX_TEST diff --git a/xmsgrid/geometry/GmPolygon.cpp b/xmsgrid/geometry/GmPolygon.cpp index 636567b0..442be969 100644 --- a/xmsgrid/geometry/GmPolygon.cpp +++ b/xmsgrid/geometry/GmPolygon.cpp @@ -2,7 +2,7 @@ /// \file /// \ingroup geometry /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/geometry/GmPolygon.h b/xmsgrid/geometry/GmPolygon.h index ddb01be0..fbcde908 100644 --- a/xmsgrid/geometry/GmPolygon.h +++ b/xmsgrid/geometry/GmPolygon.h @@ -3,7 +3,7 @@ /// \file /// \ingroup geometry /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/geometry/GmPolygon.t.h b/xmsgrid/geometry/GmPolygon.t.h index b4e6909a..64ce8354 100644 --- a/xmsgrid/geometry/GmPolygon.t.h +++ b/xmsgrid/geometry/GmPolygon.t.h @@ -4,7 +4,7 @@ /// \file /// \ingroup geometry /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/geometry/GmPtSearch.cpp b/xmsgrid/geometry/GmPtSearch.cpp index 0e52592d..fb26c185 100644 --- a/xmsgrid/geometry/GmPtSearch.cpp +++ b/xmsgrid/geometry/GmPtSearch.cpp @@ -2,7 +2,7 @@ /// \file /// \ingroup geometry /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/geometry/GmPtSearch.h b/xmsgrid/geometry/GmPtSearch.h index df827677..f594a8df 100644 --- a/xmsgrid/geometry/GmPtSearch.h +++ b/xmsgrid/geometry/GmPtSearch.h @@ -3,7 +3,7 @@ /// \file /// \ingroup geometry /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/geometry/GmPtSearch.t.h b/xmsgrid/geometry/GmPtSearch.t.h index 89f4eccc..38bd1989 100644 --- a/xmsgrid/geometry/GmPtSearch.t.h +++ b/xmsgrid/geometry/GmPtSearch.t.h @@ -3,7 +3,7 @@ /// \file /// \ingroup geometry /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/geometry/GmTriSearch.cpp b/xmsgrid/geometry/GmTriSearch.cpp index 51d83b0d..2c0116d9 100644 --- a/xmsgrid/geometry/GmTriSearch.cpp +++ b/xmsgrid/geometry/GmTriSearch.cpp @@ -4,7 +4,7 @@ /// Uses the boost RTree for queries. /// \ingroup geometry /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/geometry/GmTriSearch.h b/xmsgrid/geometry/GmTriSearch.h index acf32614..c77cacd1 100644 --- a/xmsgrid/geometry/GmTriSearch.h +++ b/xmsgrid/geometry/GmTriSearch.h @@ -3,7 +3,7 @@ /// \file /// \ingroup geometry /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/geometry/GmTriSearch.t.h b/xmsgrid/geometry/GmTriSearch.t.h index c6a7ed51..4a6c77b6 100644 --- a/xmsgrid/geometry/GmTriSearch.t.h +++ b/xmsgrid/geometry/GmTriSearch.t.h @@ -4,7 +4,7 @@ /// \file /// \ingroup geometry /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/geometry/geoms.cpp b/xmsgrid/geometry/geoms.cpp index fbf384dc..ac7436ef 100644 --- a/xmsgrid/geometry/geoms.cpp +++ b/xmsgrid/geometry/geoms.cpp @@ -3,7 +3,7 @@ /// \brief Functions dealing with geometry. /// \ingroup geometry /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ // 1. Precompiled header diff --git a/xmsgrid/geometry/geoms.h b/xmsgrid/geometry/geoms.h index b7b4ea4a..4f028a21 100644 --- a/xmsgrid/geometry/geoms.h +++ b/xmsgrid/geometry/geoms.h @@ -4,7 +4,7 @@ /// \brief Functions dealing with geometry. /// \ingroup geometry /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/geometry/geoms.t.h b/xmsgrid/geometry/geoms.t.h index 4620138b..6c4d7125 100644 --- a/xmsgrid/geometry/geoms.t.h +++ b/xmsgrid/geometry/geoms.t.h @@ -4,7 +4,7 @@ /// \file /// \ingroup geometry /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ // 3. Standard Library Headers diff --git a/xmsgrid/matrices/matrix.cpp b/xmsgrid/matrices/matrix.cpp index 51c3cc27..06b2664b 100644 --- a/xmsgrid/matrices/matrix.cpp +++ b/xmsgrid/matrices/matrix.cpp @@ -9,7 +9,7 @@ /// from [1..n] using the routines defined in this file. /// \ingroup matrices /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/matrices/matrix.h b/xmsgrid/matrices/matrix.h index 8b9bb2c7..07bd12fd 100644 --- a/xmsgrid/matrices/matrix.h +++ b/xmsgrid/matrices/matrix.h @@ -10,7 +10,7 @@ /// from [1..n] using the routines defined in this file. /// \ingroup matrices /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ // 3. Standard Library Headers diff --git a/xmsgrid/python/geometry/GmMultiPolyIntersector_py.cpp b/xmsgrid/python/geometry/GmMultiPolyIntersector_py.cpp new file mode 100644 index 00000000..0362dbd7 --- /dev/null +++ b/xmsgrid/python/geometry/GmMultiPolyIntersector_py.cpp @@ -0,0 +1,66 @@ +//------------------------------------------------------------------------------ +/// \file +/// \brief +/// \copyright (C) Copyright Aquaveo 2023. Distributed under FreeBSD License +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) +//------------------------------------------------------------------------------ + +//----- Included files --------------------------------------------------------- +#include +#include +#include // Needed for PyUtils.h + +#include +#include +#include +#include +#include + +//----- Namespace declaration -------------------------------------------------- +namespace py = pybind11; + +//----- Python Interface ------------------------------------------------------- + +// Use a wrapper struct to avoid compile errors due to virtual ~GmMultiPolyIntersector() being declared protected +struct Wrapper { + BSHP p = nullptr; +}; + +void initGmMultiPolyIntersector(py::module &m) { + // GmMultiPolyIntersector class + py::class_ gmMpi(m, "GmMultiPolyIntersector"); + + // --------------------------------------------------------------------------- + // function: init + // --------------------------------------------------------------------------- + gmMpi.def(py::init([](py::iterable poly_points, py::iterable polys, int starting_id, + const std::string& query) { + BSHP vec_pts = xms::VecPt3dFromPyIter(poly_points); + BSHP vec_polys = xms::VecInt2dFromPyIter(polys); + BSHP sorter(new xms::GmMultiPolyIntersectionSorterTerse); + Wrapper wrapper; + wrapper.p = xms::GmMultiPolyIntersector::New(*vec_pts, *vec_polys, sorter, starting_id); + wrapper.p->SetQuery(query == "covered_by" ? xms::GMMPIQ_COVEREDBY : xms::GMMPIQ_INTERSECTS); + return wrapper; + }), py::arg("poly_points"), py::arg("polys"), py::arg("starting_id") = 1, py::arg("query") = "covered_by"); + // --------------------------------------------------------------------------- + // function: TraverseLineSegment + // --------------------------------------------------------------------------- + gmMpi.def("TraverseLineSegment", [](Wrapper &self, py::iterable pt1, py::iterable pt2) + -> py::tuple { + xms::Pt3d p1 = xms::Pt3dFromPyIter(pt1); + xms::Pt3d p2 = xms::Pt3dFromPyIter(pt2); + xms::VecInt poly_ids; + xms::VecDbl t_vals; + xms::VecPt3d pts; + self.p->TraverseLineSegment(p1.x, p1.y, p2.x, p2.y, poly_ids, t_vals, pts); + return py::make_tuple(xms::PyIterFromVecInt(poly_ids), xms::PyIterFromVecDbl(t_vals), xms::PyIterFromVecPt3d(pts)); + }, py::arg("pt1"), py::arg("pt2")); + // --------------------------------------------------------------------------- + // function: PolygonFromPoint + // --------------------------------------------------------------------------- + gmMpi.def("PolygonFromPoint", [](Wrapper &self, py::iterable point) -> int { + xms::Pt3d p = xms::Pt3dFromPyIter(point); + return self.p->PolygonFromPoint(p); + }, py::arg("point")); +} \ No newline at end of file diff --git a/xmsgrid/python/geometry/GmTriSearch_py.cpp b/xmsgrid/python/geometry/GmTriSearch_py.cpp index 1f1f07a2..0007ac31 100644 --- a/xmsgrid/python/geometry/GmTriSearch_py.cpp +++ b/xmsgrid/python/geometry/GmTriSearch_py.cpp @@ -2,7 +2,7 @@ /// \file /// \brief /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/python/geometry/geometry_py.cpp b/xmsgrid/python/geometry/geometry_py.cpp index 775910fb..81886516 100644 --- a/xmsgrid/python/geometry/geometry_py.cpp +++ b/xmsgrid/python/geometry/geometry_py.cpp @@ -2,7 +2,7 @@ /// \file /// \brief /// \copyright (C) Copyright Aquaveo 2020. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- @@ -233,5 +233,6 @@ void initGeometry(py::module &geometry) { return xms::gmCalculateWavelength(a_period, a_depth, a_gravity); }); + initGmMultiPolyIntersector(geometry); initGmTriSearch(geometry); } \ No newline at end of file diff --git a/xmsgrid/python/geometry/geometry_py.h b/xmsgrid/python/geometry/geometry_py.h index 39a71cf6..43f19b70 100644 --- a/xmsgrid/python/geometry/geometry_py.h +++ b/xmsgrid/python/geometry/geometry_py.h @@ -3,7 +3,7 @@ /// \file /// \brief initializer functions for members of geometry python module. /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- @@ -15,4 +15,5 @@ namespace py = pybind11; //----- Function declarations -------------------------------------------------- void initGeometry(py::module &); +void initGmMultiPolyIntersector(py::module &); void initGmTriSearch(py::module &); diff --git a/xmsgrid/python/triangulate/TrTin_py.cpp b/xmsgrid/python/triangulate/TrTin_py.cpp index 67504d2b..cb511c05 100644 --- a/xmsgrid/python/triangulate/TrTin_py.cpp +++ b/xmsgrid/python/triangulate/TrTin_py.cpp @@ -2,7 +2,7 @@ /// \file /// \brief /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/python/triangulate/triangulate_py.cpp b/xmsgrid/python/triangulate/triangulate_py.cpp index 67bb0015..6d57eebc 100644 --- a/xmsgrid/python/triangulate/triangulate_py.cpp +++ b/xmsgrid/python/triangulate/triangulate_py.cpp @@ -2,7 +2,7 @@ /// \file /// \brief /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/python/triangulate/triangulate_py.h b/xmsgrid/python/triangulate/triangulate_py.h index f331db36..49fc5988 100644 --- a/xmsgrid/python/triangulate/triangulate_py.h +++ b/xmsgrid/python/triangulate/triangulate_py.h @@ -3,7 +3,7 @@ /// \file /// \brief initializer functions for members of triangulate python module. /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/python/ugrid/XmUGridUtils_py.cpp b/xmsgrid/python/ugrid/XmUGridUtils_py.cpp index 6f874aab..1f9cb6d2 100644 --- a/xmsgrid/python/ugrid/XmUGridUtils_py.cpp +++ b/xmsgrid/python/ugrid/XmUGridUtils_py.cpp @@ -2,7 +2,7 @@ /// \file /// \brief Python bindings for XmUGridUtils.h. /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/python/ugrid/XmUGrid_py.cpp b/xmsgrid/python/ugrid/XmUGrid_py.cpp index 3056feb2..487bd2c5 100644 --- a/xmsgrid/python/ugrid/XmUGrid_py.cpp +++ b/xmsgrid/python/ugrid/XmUGrid_py.cpp @@ -2,7 +2,7 @@ /// \file /// \brief Python bindings for XmUGrid. /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/python/ugrid/ugrid_py.cpp b/xmsgrid/python/ugrid/ugrid_py.cpp index e910dddd..b7f09f22 100644 --- a/xmsgrid/python/ugrid/ugrid_py.cpp +++ b/xmsgrid/python/ugrid/ugrid_py.cpp @@ -2,7 +2,7 @@ /// \file /// \brief Initialize python interface. /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/python/ugrid/ugrid_py.h b/xmsgrid/python/ugrid/ugrid_py.h index 0d6223ba..fb713321 100644 --- a/xmsgrid/python/ugrid/ugrid_py.h +++ b/xmsgrid/python/ugrid/ugrid_py.h @@ -3,7 +3,7 @@ /// \file /// \brief initializer functions for members of ugrid python module. /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/python/xmsgrid_py.cpp b/xmsgrid/python/xmsgrid_py.cpp index bf33afbd..8ed2f07f 100644 --- a/xmsgrid/python/xmsgrid_py.cpp +++ b/xmsgrid/python/xmsgrid_py.cpp @@ -2,7 +2,7 @@ /// \file /// \brief root module for xmsgrid Python bindings. /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/triangulate/TrBreaklineAdder.cpp b/xmsgrid/triangulate/TrBreaklineAdder.cpp index 3b358b97..34f99a43 100644 --- a/xmsgrid/triangulate/TrBreaklineAdder.cpp +++ b/xmsgrid/triangulate/TrBreaklineAdder.cpp @@ -2,7 +2,7 @@ /// \file /// \ingroup triangulate /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/triangulate/TrBreaklineAdder.h b/xmsgrid/triangulate/TrBreaklineAdder.h index 444bb90f..41509c27 100644 --- a/xmsgrid/triangulate/TrBreaklineAdder.h +++ b/xmsgrid/triangulate/TrBreaklineAdder.h @@ -3,7 +3,7 @@ /// \file /// \ingroup triangulate /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/triangulate/TrBreaklineAdder.t.h b/xmsgrid/triangulate/TrBreaklineAdder.t.h index 073715e1..33a6565c 100644 --- a/xmsgrid/triangulate/TrBreaklineAdder.t.h +++ b/xmsgrid/triangulate/TrBreaklineAdder.t.h @@ -4,7 +4,7 @@ /// \file /// \ingroup triangulate /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/triangulate/TrTin.cpp b/xmsgrid/triangulate/TrTin.cpp index b7b0e871..6791eeaa 100644 --- a/xmsgrid/triangulate/TrTin.cpp +++ b/xmsgrid/triangulate/TrTin.cpp @@ -2,7 +2,7 @@ /// \file /// \ingroup triangulate /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/triangulate/TrTin.h b/xmsgrid/triangulate/TrTin.h index bf45fdf4..3006c84c 100644 --- a/xmsgrid/triangulate/TrTin.h +++ b/xmsgrid/triangulate/TrTin.h @@ -3,7 +3,7 @@ /// \file /// \ingroup triangulate /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/triangulate/TrTin.t.h b/xmsgrid/triangulate/TrTin.t.h index 5301fb8c..1f76465f 100644 --- a/xmsgrid/triangulate/TrTin.t.h +++ b/xmsgrid/triangulate/TrTin.t.h @@ -4,7 +4,7 @@ /// \file /// \ingroup triangulate /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ // 3. Standard Library Headers diff --git a/xmsgrid/triangulate/TrTriangulator.cpp b/xmsgrid/triangulate/TrTriangulator.cpp index 881c3e8e..f1a6612d 100644 --- a/xmsgrid/triangulate/TrTriangulator.cpp +++ b/xmsgrid/triangulate/TrTriangulator.cpp @@ -2,7 +2,7 @@ /// \file /// \ingroup triangulate /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/triangulate/TrTriangulator.h b/xmsgrid/triangulate/TrTriangulator.h index 63aa7e32..4c6ba660 100644 --- a/xmsgrid/triangulate/TrTriangulator.h +++ b/xmsgrid/triangulate/TrTriangulator.h @@ -3,7 +3,7 @@ /// \file /// \ingroup triangulate /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Include Files ---------------------------------------------------------- diff --git a/xmsgrid/triangulate/TrTriangulatorPoints.cpp b/xmsgrid/triangulate/TrTriangulatorPoints.cpp index 015c5092..f5cbcd68 100644 --- a/xmsgrid/triangulate/TrTriangulatorPoints.cpp +++ b/xmsgrid/triangulate/TrTriangulatorPoints.cpp @@ -2,7 +2,7 @@ /// \file /// \ingroup triangulate /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/triangulate/TrTriangulatorPoints.h b/xmsgrid/triangulate/TrTriangulatorPoints.h index ed29dab9..5b3f28d1 100644 --- a/xmsgrid/triangulate/TrTriangulatorPoints.h +++ b/xmsgrid/triangulate/TrTriangulatorPoints.h @@ -3,7 +3,7 @@ /// \file /// \ingroup triangulate /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/triangulate/TrTriangulatorPoints.t.h b/xmsgrid/triangulate/TrTriangulatorPoints.t.h index 0c1ac2d0..1462eb31 100644 --- a/xmsgrid/triangulate/TrTriangulatorPoints.t.h +++ b/xmsgrid/triangulate/TrTriangulatorPoints.t.h @@ -4,7 +4,7 @@ /// \file /// \ingroup triangulate /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ // 3. Standard Library Headers diff --git a/xmsgrid/triangulate/detail/TrAutoFixFourTrianglePts.cpp b/xmsgrid/triangulate/detail/TrAutoFixFourTrianglePts.cpp index 41c3071e..428195fb 100644 --- a/xmsgrid/triangulate/detail/TrAutoFixFourTrianglePts.cpp +++ b/xmsgrid/triangulate/detail/TrAutoFixFourTrianglePts.cpp @@ -2,7 +2,7 @@ /// \file /// \ingroup triangulate_detail /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/triangulate/detail/TrAutoFixFourTrianglePts.h b/xmsgrid/triangulate/detail/TrAutoFixFourTrianglePts.h index 652ff910..9293a4a0 100644 --- a/xmsgrid/triangulate/detail/TrAutoFixFourTrianglePts.h +++ b/xmsgrid/triangulate/detail/TrAutoFixFourTrianglePts.h @@ -3,7 +3,7 @@ /// \file /// \ingroup triangulate_detail /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/triangulate/detail/TrAutoFixFourTrianglePts.t.h b/xmsgrid/triangulate/detail/TrAutoFixFourTrianglePts.t.h index c91f2545..c91db9e7 100644 --- a/xmsgrid/triangulate/detail/TrAutoFixFourTrianglePts.t.h +++ b/xmsgrid/triangulate/detail/TrAutoFixFourTrianglePts.t.h @@ -4,7 +4,7 @@ /// \file /// \ingroup triangulate_detail /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ // 3. Standard Library Headers diff --git a/xmsgrid/triangulate/detail/TrOuterTriangleDeleter.cpp b/xmsgrid/triangulate/detail/TrOuterTriangleDeleter.cpp index 0817d5a7..6d2107db 100644 --- a/xmsgrid/triangulate/detail/TrOuterTriangleDeleter.cpp +++ b/xmsgrid/triangulate/detail/TrOuterTriangleDeleter.cpp @@ -2,7 +2,7 @@ /// \file /// \ingroup triangulate_detail /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/triangulate/detail/TrOuterTriangleDeleter.h b/xmsgrid/triangulate/detail/TrOuterTriangleDeleter.h index 321333f9..a3bc0de2 100644 --- a/xmsgrid/triangulate/detail/TrOuterTriangleDeleter.h +++ b/xmsgrid/triangulate/detail/TrOuterTriangleDeleter.h @@ -3,7 +3,7 @@ /// \file /// \ingroup triangulate_detail /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/triangulate/detail/TrOuterTriangleDeleter.t.h b/xmsgrid/triangulate/detail/TrOuterTriangleDeleter.t.h index 5410b504..a8b5c2c1 100644 --- a/xmsgrid/triangulate/detail/TrOuterTriangleDeleter.t.h +++ b/xmsgrid/triangulate/detail/TrOuterTriangleDeleter.t.h @@ -4,7 +4,7 @@ /// \file /// \ingroup triangulate_detail /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ // 3. Standard Library Headers diff --git a/xmsgrid/triangulate/detail/triangulate.cpp b/xmsgrid/triangulate/detail/triangulate.cpp index 035fbcf5..32c7702d 100644 --- a/xmsgrid/triangulate/detail/triangulate.cpp +++ b/xmsgrid/triangulate/detail/triangulate.cpp @@ -3,7 +3,7 @@ /// \brief Code that creates a Delauney triangulation from points. /// \ingroup triangulate_detail /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Include Files ---------------------------------------------------------- diff --git a/xmsgrid/triangulate/detail/triangulate.h b/xmsgrid/triangulate/detail/triangulate.h index 56872d7f..736436ab 100644 --- a/xmsgrid/triangulate/detail/triangulate.h +++ b/xmsgrid/triangulate/detail/triangulate.h @@ -4,7 +4,7 @@ /// \brief Code that creates a Delauney triangulation from points. /// \ingroup triangulate_detail /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Include Files ---------------------------------------------------------- diff --git a/xmsgrid/triangulate/triangles.cpp b/xmsgrid/triangulate/triangles.cpp index cf0ae0f6..166276c9 100644 --- a/xmsgrid/triangulate/triangles.cpp +++ b/xmsgrid/triangulate/triangles.cpp @@ -3,7 +3,7 @@ /// \brief Functions dealing with triangles. /// \ingroup triangulate /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/triangulate/triangles.h b/xmsgrid/triangulate/triangles.h index abd958cb..5805af8f 100644 --- a/xmsgrid/triangulate/triangles.h +++ b/xmsgrid/triangulate/triangles.h @@ -4,7 +4,7 @@ /// \brief Functions dealing with triangles. /// \ingroup triangulate /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/ugrid/XmEdge.cpp b/xmsgrid/ugrid/XmEdge.cpp index 7d85af99..b30a02c7 100644 --- a/xmsgrid/ugrid/XmEdge.cpp +++ b/xmsgrid/ugrid/XmEdge.cpp @@ -2,7 +2,7 @@ /// \file /// \ingroup ugrid /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/ugrid/XmEdge.h b/xmsgrid/ugrid/XmEdge.h index 19fc8b13..f3727ef7 100644 --- a/xmsgrid/ugrid/XmEdge.h +++ b/xmsgrid/ugrid/XmEdge.h @@ -4,7 +4,7 @@ /// \brief Contains the XmUGrid Class and supporting data types. /// \ingroup ugrid /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/ugrid/XmEdge.t.h b/xmsgrid/ugrid/XmEdge.t.h index 4e455504..6f206f5b 100644 --- a/xmsgrid/ugrid/XmEdge.t.h +++ b/xmsgrid/ugrid/XmEdge.t.h @@ -3,7 +3,7 @@ /// \file /// \ingroup ugrid /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ #ifdef CXX_TEST diff --git a/xmsgrid/ugrid/XmUGrid.cpp b/xmsgrid/ugrid/XmUGrid.cpp index c937ec37..8a3bb4d7 100644 --- a/xmsgrid/ugrid/XmUGrid.cpp +++ b/xmsgrid/ugrid/XmUGrid.cpp @@ -2,7 +2,7 @@ /// \file /// \ingroup ugrid /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/ugrid/XmUGrid.h b/xmsgrid/ugrid/XmUGrid.h index c70d748e..0e54438c 100644 --- a/xmsgrid/ugrid/XmUGrid.h +++ b/xmsgrid/ugrid/XmUGrid.h @@ -4,7 +4,7 @@ /// \brief Contains the XmUGrid Class and supporting data types. /// \ingroup ugrid /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/ugrid/XmUGrid.t.h b/xmsgrid/ugrid/XmUGrid.t.h index 8c83100b..981bd9db 100644 --- a/xmsgrid/ugrid/XmUGrid.t.h +++ b/xmsgrid/ugrid/XmUGrid.t.h @@ -3,7 +3,7 @@ /// \file XmUGrid.t.h /// \ingroup ugrid /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ #ifdef CXX_TEST diff --git a/xmsgrid/ugrid/XmUGridUtils.h b/xmsgrid/ugrid/XmUGridUtils.h index 05ae92ef..89cf2330 100644 --- a/xmsgrid/ugrid/XmUGridUtils.h +++ b/xmsgrid/ugrid/XmUGridUtils.h @@ -4,7 +4,7 @@ /// \brief Contains IO functions as well as several utility functions for XmUGrid /// \ingroup ugrid /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/ugrid/XmUGridUtils.t.h b/xmsgrid/ugrid/XmUGridUtils.t.h index 5e5d9f52..38d45a6b 100644 --- a/xmsgrid/ugrid/XmUGridUtils.t.h +++ b/xmsgrid/ugrid/XmUGridUtils.t.h @@ -3,7 +3,7 @@ /// \file XmUGridUtils.t.h /// \ingroup ugrid /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ #ifdef CXX_TEST diff --git a/xmsgrid/ugrid/detail/UGridClipper.cpp b/xmsgrid/ugrid/detail/UGridClipper.cpp index fa881a50..01ff608a 100644 --- a/xmsgrid/ugrid/detail/UGridClipper.cpp +++ b/xmsgrid/ugrid/detail/UGridClipper.cpp @@ -2,7 +2,7 @@ /// \file /// \ingroup ugrid /// \copyright (C) Copyright Aquaveo 2022. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/ugrid/detail/UGridClipper.h b/xmsgrid/ugrid/detail/UGridClipper.h index 31584cbf..95806218 100644 --- a/xmsgrid/ugrid/detail/UGridClipper.h +++ b/xmsgrid/ugrid/detail/UGridClipper.h @@ -4,7 +4,7 @@ /// \brief Code to remove points and cells outside of a polygon. /// \ingroup ugrid /// \copyright (C) Copyright Aquaveo 2022. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/ugrid/detail/UGridClipper.t.h b/xmsgrid/ugrid/detail/UGridClipper.t.h index 9dddc3d0..bf8844aa 100644 --- a/xmsgrid/ugrid/detail/UGridClipper.t.h +++ b/xmsgrid/ugrid/detail/UGridClipper.t.h @@ -3,7 +3,7 @@ /// \file /// \ingroup ugrid /// \copyright (C) Copyright Aquaveo 2022. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ #ifdef CXX_TEST diff --git a/xmsgrid/ugrid/detail/XmGeometry.cpp b/xmsgrid/ugrid/detail/XmGeometry.cpp index 97ff9880..f6c3b442 100644 --- a/xmsgrid/ugrid/detail/XmGeometry.cpp +++ b/xmsgrid/ugrid/detail/XmGeometry.cpp @@ -2,7 +2,7 @@ /// \file /// \ingroup ugrid /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files --------------------------------------------------------- diff --git a/xmsgrid/ugrid/detail/XmGeometry.h b/xmsgrid/ugrid/detail/XmGeometry.h index e1d696d3..936f6f10 100644 --- a/xmsgrid/ugrid/detail/XmGeometry.h +++ b/xmsgrid/ugrid/detail/XmGeometry.h @@ -4,7 +4,7 @@ /// \brief Code to calculate the convex hull of a set of points in two dimensions. /// \ingroup ugrid /// \copyright (C) Copyright Aquaveo 2018. Distributed under FreeBSD License -/// (See accompanying file LICENSE or https://aqaveo.com/bsd/license.txt) +/// (See accompanying file LICENSE or https://aquaveo.com/bsd/license.txt) //------------------------------------------------------------------------------ //----- Included files ---------------------------------------------------------