Пространственные операции ============================= .. function:: Disjoint(geometry1, geometry2) Возвращает True, если геометрии не пересекаются и не соприкасаются :param geometry1: первая геометрия :type geometry1: :class:`~axioma.core.geometry.GeometryInterface` :param geometry2: вторая геометрия :type geometry2: :class:`~axioma.core.geometry.GeometryInterface` :rtype: :class:`bool` .. function:: Touches(geometry1, geometry2) Возвращает True, если геометрии соприкасаются :param geometry1: первая геометрия :type geometry1: :class:`~axioma.core.geometry.GeometryInterface` :param geometry2: вторая геометрия :type geometry2: :class:`~axioma.core.geometry.GeometryInterface` :rtype: :class:`bool` .. function:: Intersects(geometry1, geometry2) Возвращает True, если геометрии пересекаются :param geometry1: первая геометрия :type geometry1: :class:`~axioma.core.geometry.GeometryInterface` :param geometry2: вторая геометрия :type geometry2: :class:`~axioma.core.geometry.GeometryInterface` :rtype: :class:`bool` .. function:: Crosses(geometry1, geometry2) Возвращает True, если у геометрий некоторые, но не все внутренние точки являются общими :param geometry1: первая геометрия :type geometry1: :class:`~axioma.core.geometry.GeometryInterface` :param geometry2: вторая геометрия :type geometry2: :class:`~axioma.core.geometry.GeometryInterface` :rtype: :class:`bool` .. function:: Within(geometry1, geometry2) Возвращает True, если первая геометрия находится полностью внутри второй геометрии :param geometry1: первая геометрия :type geometry1: :class:`~axioma.core.geometry.GeometryInterface` :param geometry2: вторая геометрия :type geometry2: :class:`~axioma.core.geometry.GeometryInterface` :rtype: :class:`bool` .. function:: Contains(geometry1, geometry2) Возвращает True, если первая геометрия полностью содержит вторую геометрию :param geometry1: первая геометрия :type geometry1: :class:`~axioma.core.geometry.GeometryInterface` :param geometry2: вторая геометрия :type geometry2: :class:`~axioma.core.geometry.GeometryInterface` :rtype: :class:`bool` .. function:: ContainsCentroid(geometry1, geometry2) Возвращает True, если первая геометрия содержит центроид второй геометрии :param geometry1: первая геометрия :type geometry1: :class:`~axioma.core.geometry.GeometryInterface` :param geometry2: вторая геометрия :type geometry2: :class:`~axioma.core.geometry.GeometryInterface` :rtype: :class:`bool` .. function:: Overlaps(geometry1, geometry2) Возвращает True, если пересечение геометрий отличается от обеих геометрий :param geometry1: первая геометрия :type geometry1: :class:`~axioma.core.geometry.GeometryInterface` :param geometry2: вторая геометрия :type geometry2: :class:`~axioma.core.geometry.GeometryInterface` :rtype: :class:`bool` .. function:: Equals(geometry1, geometry2) Возвращает True, если геометрии равны :param geometry1: первая геометрия :type geometry1: :class:`~axioma.core.geometry.GeometryInterface` :param geometry2: вторая геометрия :type geometry2: :class:`~axioma.core.geometry.GeometryInterface` :rtype: :class:`bool` .. function:: EqualsExact(geometry1, geometry2, tolerance) Возвращает True, если геометрии равны в пределах заданного отклонения :param geometry1: первая геометрия :type geometry1: :class:`~axioma.core.geometry.GeometryInterface` :param geometry2: вторая геометрия :type geometry2: :class:`~axioma.core.geometry.GeometryInterface` :param tolerance: отклонения :type tolerance: float :rtype: :class:`bool` .. .. function:: Covers(geometry1, geometry2) .. .. !!! .. .. :param geometry1: первая геометрия .. :type geometry1: :class:`~axioma.core.geometry.GeometryInterface` .. :param geometry2: вторая геометрия .. :type geometry2: :class:`~axioma.core.geometry.GeometryInterface` .. :rtype: :class:`bool` .. .. .. function:: CoveredBy(geometry1, geometry2) .. .. !!! .. .. :param geometry1: первая геометрия .. :type geometry1: :class:`~axioma.core.geometry.GeometryInterface` .. :param geometry2: вторая геометрия .. :type geometry2: :class:`~axioma.core.geometry.GeometryInterface` .. :rtype: :class:`bool` .. function:: Intersects(geometry1, rect) Возвращает True, если геометрия и прямоугольник пересекаются :param geometry1: геометрия :type geometry1: :class:`~axioma.core.geometry.GeometryInterface` :param rect: прямоугольник :type rect: :class:`~PyQt5.QtCore.QRectF` :rtype: :class:`bool` .. function:: Envelope(geometry) Получить полигон, описывающий заданную геометрию :param geometry: геометрия :type geometry: :class:`~axioma.core.geometry.GeometryInterface` :rtype: :class:`~axioma.core.geometry.GeometryInterface` .. function:: Centroid(geometry) Получить центроид :param geometry: геометрия :type geometry: :class:`~axioma.core.geometry.GeometryInterface` :rtype: :class:`~axioma.core.geometry.GeometryInterface` .. function:: UnaryUnion(geometry) Объединить геометрию или коллекцию геометрий :param geometry: геометрия :type geometry: :class:`~axioma.core.geometry.GeometryInterface` :rtype: :class:`~axioma.core.geometry.GeometryInterface` .. function:: ConvexHull(geometry) Получить минимальный окаймляющий полигон со всеми выпуклыми углами :param geometry: геометрия :type geometry: :class:`~axioma.core.geometry.GeometryInterface` :rtype: :class:`~axioma.core.geometry.GeometryInterface` .. function:: Boundary(geometry) Получить границу геометрии в виде полилинии :param geometry: геометрия :type geometry: :class:`~axioma.core.geometry.GeometryInterface` :rtype: :class:`~axioma.core.geometry.GeometryInterface` .. function:: Intersection(geometry1, geometry2) Область пересечения :param geometry1: первая геометрия :type geometry1: :class:`~axioma.core.geometry.GeometryInterface` :param geometry2: вторая геометрия :type geometry2: :class:`~axioma.core.geometry.GeometryInterface` :rtype: :class:`~axioma.core.geometry.GeometryInterface` .. function:: Difference(geometry1, geometry2) Область первой геометрии, которая не пересечена второй геометрией :param geometry1: первая геометрия :type geometry1: :class:`~axioma.core.geometry.GeometryInterface` :param geometry2: вторая геометрия :type geometry2: :class:`~axioma.core.geometry.GeometryInterface` :rtype: :class:`~axioma.core.geometry.GeometryInterface` .. function:: SymDifference(geometry1, geometry2) Логический XOR областей геометрий :param geometry1: первая геометрия :type geometry1: :class:`~axioma.core.geometry.GeometryInterface` :param geometry2: вторая геометрия :type geometry2: :class:`~axioma.core.geometry.GeometryInterface` :rtype: :class:`~axioma.core.geometry.GeometryInterface` .. function:: Union(geometry1, geometry2) Объединение двух геометрий; логический OR :param geometry1: первая геометрия :type geometry1: :class:`~axioma.core.geometry.GeometryInterface` :param geometry2: вторая геометрия :type geometry2: :class:`~axioma.core.geometry.GeometryInterface` :rtype: :class:`~axioma.core.geometry.GeometryInterface` .. function:: PolylineSplit(geometry1, geometry2) Геометрия, полученная в результате разрезания исходной геометрии полилинией :param geometry1: геометрия :type geometry1: :class:`~axioma.core.geometry.GeometryInterface` :param geometry2: полилиния :type geometry2: :class:`~axioma.core.geometry.GeometryInterface` :rtype: :class:`~axioma.core.geometry.GeometryInterface` .. .. function:: Project() .. .. !!! .. .. :param : !!! .. :type : !!! .. :return: !!! .. :rtype: !!! .. function:: Buffer(geometry, width, quadsegs, end_caps_style=1, join_style=1, mitre_limit=0) Построение буфера :param geometry1: геометрия :type geometry1: :class:`~axioma.core.geometry.GeometryInterface` :param width: ширина буфера :type width: :class:`float` :param quadsegs: количество сегментов на кавдрант :type quadsegs: :class:`int` :param end_caps_style: стиль окончания :type end_caps_style: :class:`int` :param join_style: стиль соединения :type join_style: :class:`int` :param mitre_limit: предел среза :type mitre_limit: :class:`float` :rtype: :class:`~axioma.core.geometry.GeometryInterface` .. function:: Area(geometry) Площадь геометрии :param geometry: геометрия :type geometry: :class:`~axioma.core.geometry.GeometryInterface` :rtype: :class:`float` .. function:: Length(geometry) Длина :param geometry: геометрия :type geometry: :class:`~axioma.core.geometry.GeometryInterface` :rtype: :class:`float` .. function:: Distance(geometry1, geometry2) Расстояние между двумя геометриями :param geometry: первая геометрия :type geometry: :class:`~axioma.core.geometry.GeometryInterface` :param geometry: вторая геометрия :type geometry: :class:`~axioma.core.geometry.GeometryInterface` :rtype: :class:`float` .. function:: normalizedGeometry(geometry) Метод для удаления самопересечений геометрии :param geometry: геометрия :type geometry: :class:`~axioma.core.geometry.GeometryInterface` :rtype: :class:`~axioma.core.geometry.GeometryInterface` .. function:: intersectionFindAdd(geometry1, geometry2) Метод для определения пересечений двух геометрий и добавления точек пересечения :param geometry1: первая геометрия :type geometry1: :class:`~axioma.core.geometry.GeometryInterface` :param geometry2: вторая геометрия :type geometry2: :class:`~axioma.core.geometry.GeometryInterface` :return: первая геометрия с добавленными точками пересечений :rtype: :class:`~axioma.core.geometry.GeometryInterface` .. function:: clearGeometryWithTolerance(geometry, tolerance) Удаляет точки геометрии в случае если они расположены в пределах допустимого отклонения :param geometry: геометрия :type geometry: :class:`~axioma.core.geometry.GeometryInterface` :param tolerance: отклонение :type tolerance: :class:`float` :rtype: :class:`~axioma.core.geometry.GeometryInterface` .. function:: snapGeometry(geometry, tolerance) Метод для сглаживания геометрии :param geometry: геометрия :type geometry: :class:`~axioma.core.geometry.GeometryInterface` :param tolerance: отклонение :type tolerance: :class:`float` :rtype: :class:`~axioma.core.geometry.GeometryInterface` .. function:: getNumPoints(geometry) Количество узлов :param geometry: геометрия :type geometry: :class:`~axioma.core.geometry.GeometryInterface` :rtype: :class:`~axioma.core.geometry.GeometryInterface` .. function:: isValid(geometry) Проверка валидности геометрии. :param geometry: геометрия :type geometry: :class:`~axioma.core.geometry.GeometryInterface` :rtype: :class:`bool`