QGeoShape

The QGeoShape class defines a geographic area. More

Inheritance diagram of PySide6.QtPositioning.QGeoShape

Inherited by: QGeoRectangle, QGeoPolygon, QGeoPath, QGeoCircle

Synopsis

Functions

Detailed Description

This class is the base class for classes which specify a geographic area.

For the sake of consistency, subclasses should describe the specific details of the associated areas in terms of QGeoCoordinate instances and distances in meters.

This class is a Q_GADGET since Qt 5.5. It can be directly used from C++ and QML .

class PySide6.QtPositioning.QGeoShape

PySide6.QtPositioning.QGeoShape(other)

Parameters

otherPySide6.QtPositioning.QGeoShape

Constructs a new invalid geo shape of UnknownType .

Constructs a new geo shape which is a copy of other.

PySide6.QtPositioning.QGeoShape.ShapeType

Describes the type of the shape.

Constant

Description

QGeoShape.UnknownType

A shape of unknown type

QGeoShape.RectangleType

A rectangular shape

QGeoShape.CircleType

A circular shape

QGeoShape.PathType

A path type

QGeoShape.PolygonType

A polygon type

PySide6.QtPositioning.QGeoShape.boundingGeoRectangle()
Return type

PySide6.QtPositioning.QGeoRectangle

Returns a QGeoRectangle representing the geographical bounding rectangle of the geo shape, that defines the latitudinal/longitudinal bounds of the geo shape.

PySide6.QtPositioning.QGeoShape.center()
Return type

PySide6.QtPositioning.QGeoCoordinate

Returns the coordinate located at the geometric center of the geo shape.

PySide6.QtPositioning.QGeoShape.contains(coordinate)
Parameters

coordinatePySide6.QtPositioning.QGeoCoordinate

Return type

bool

Returns whether the coordinate coordinate is contained within this geo shape.

PySide6.QtPositioning.QGeoShape.isEmpty()
Return type

bool

Returns whether this geo shape is empty.

An empty geo shape is a region which has a geometrical area of 0.

PySide6.QtPositioning.QGeoShape.isValid()
Return type

bool

Returns whether this geo shape is valid.

PySide6.QtPositioning.QGeoShape.__ne__(rhs)
Parameters

rhsPySide6.QtPositioning.QGeoShape

Return type

bool

PySide6.QtPositioning.QGeoShape.__eq__(rhs)
Parameters

rhsPySide6.QtPositioning.QGeoShape

Return type

bool

PySide6.QtPositioning.QGeoShape.toString()
Return type

str

Returns a string representation of this geo shape.

PySide6.QtPositioning.QGeoShape.type()
Return type

ShapeType

Returns the type of this geo shape.