Point Class

Summary: A Point represents a single location in coordinate space.

Module: aspose.gis.geometries

Full Name: aspose.gis.geometries.Point

Inheritance: IGeometry, IPoint, Geometry

Aspose.PSD Version: 25.9.0

Constructors

NameDescription
Point()Initializes a new instance of the Point class.
Point(other)Initializes a new instance of the Point class.
Point(x, y)Initializes a new instance of the Point class.
Point(x, y, z)Initializes a new instance of the Point class.
Point(x, y, z, m)Initializes a new instance of the Point class.

Properties

NameTypeAccessDescription
coordinate_dimensionintrGets the number of coordinate dimensions for this Geometry.
dimensionGeometryDimensionrGets the topological dimension of this Geometry.
geometry_typeGeometryTyperGets the type of the geometry.
has_curve_geometryboolrGets a value indicating whether this geometry is or contains curve (not linear) geometry.
has_mboolr/wGets a value indicating whether this instance has an M coordinate.
has_zboolr/wGets a value indicating whether this instance has Z coordinate.
is_emptyboolrGets a value indicating whether this instance is empty.
is_simpleboolrGets a value indicating whether this instance is simple from SFA point of view.
is_validboolrGets a value indicating whether this instance is valid.
mdoubler/wGets or sets a value for the m-coordinate.
null [static]IGeometryrGets an instance of null geometry.
spatial_reference_systemSpatialReferenceSystemr/wGets SpatialReferenceSystem of this instance.
This property can be , is SpatialReferenceSystem is unknown.
Assigning new SpatialReferenceSystem will not perform any coordinate transformation, only reference will change.
xdoubler/wGets or sets a value for the x-coordinate.
ydoubler/wGets or sets a value for the y-coordinate.
zdoubler/wGets or sets a value for the z-coordinate.

Methods

NameDescription
as_binary()Translates this geometry to its Well-Known Binary representation.
as_binary(variant)Translates this geometry to its Well-Known Binary representation.
as_image(output_path, width, height, renderer, symbolizer)Export this geometry to an image representation.
as_image(output_path, width, height, renderer, symbolizer)Export this geometry to an image representation.
as_image(width, height, renderer, symbolizer)Export this geometry to an image representation.
as_text()Translates this geometry to its Well-Known Text representation.
as_text(variant)Translates this geometry to its Well-Known Text representation.
as_text(variant, format)Translates this geometry to its Well-Known Text representation.
clone()Clones this instance.
covered_by(other)Determines whether this geometry is covered by a specified geometry.
covers(other)Determines whether this geometry covers a specified geometry.
crosses(other)Determines if this geometry and a specified geometry cross.
difference(other)Subtracts a specified geometry from this geometry.
disjoint(other)Determines if this geometry is disjoint from a specified geometry.
from_binary(wkb)Creates a geometry from its Well-Known Binary representation.
from_binary(wkb, spatial_reference_system)Creates a geometry from its Well-Known Binary representation.
from_text(wkt)Creates a geometry from its Well-Known Text representation.
from_text(wkt, spatial_reference_system)Creates a geometry from its Well-Known Text representation.
get_area()Computes the area of this geometry.
get_buffer(distance, quadrant_segments)Computes a buffer region around this geometry.
get_centroid()Computes the centroid of this geometry.
get_convex_hull()Computes the convex hull of this geometry.
get_distance_to(other)Computes the minimum distance between this geometry and a specified geometry.
get_extent()Computes and returns a bounding extent of this geometry.
get_length()Computes the length of this geometry.
intersection(other)Builds an intersection between this geometry and a specified geometry.
intersects(extent)Determines whether this geometry intersects a specified extent.
intersects(other)Determines if this geometry and a specified geometry intersects.
overlaps(other)Determines whether this geometry overlap with a specified geometry.
relate(other, intersection_pattern_matrix)Determines if DE-9IM intersection matrix of this geometry and a specified geometry matches provided pattern.
replace_polygons_by_lines()Gets polygons represented as lines of this geometry.
round_m(digits)Rounds M coordinate to a specified number of fractional digits.
round_xy(digits)Rounds X and Y coordinates to a specified number of fractional digits.
round_z(digits)Rounds Z coordinate to a specified number of fractional digits.
set_empty()Makes this Geometry empty.
spatially_contains(other)Determines whether this geometry spatially contains a specified geometry.
spatially_equals(other)Determines if this geometry spatially equal to a specified geometry.
sym_difference(other)Builds a symmetric difference between this geometry and a specified geometry.
to_editable()Gets an editable copy of this geometry.
to_linear_geometry()Gets approximate or equivalent non-curve version of this geometry using the default tolerance.
to_linear_geometry(tolerance)Gets approximate or equivalent non-curve version of this geometry using the specified tolerance.
to_svg(extent)Translates this geometry to Svg representation.
touches(other)Determines if this geometry and a specified geometry touch.
union(other)Unites this geometry and a specified geometry.
union(other)Unites this geometry and a specified geometry.
within(extent)Determines whether this geometry is within a specified extent.
within(other)Determines whether this geometry is within a specified geometry.

Constructor: Point()

 Point() 

Initializes a new instance of the Point class.

Constructor: Point(other)

 Point(other) 

Initializes a new instance of the Point class.

Parameters:

ParameterTypeDescription
otherIPointThe other IPoint to copy data from.

Constructor: Point(x, y)

 Point(x, y) 

Initializes a new instance of the Point class.

Parameters:

ParameterTypeDescription
xdoubleThe value for X coordinate.
ydoubleThe value for Y coordinate.

Constructor: Point(x, y, z)

 Point(x, y, z) 

Initializes a new instance of the Point class.

Parameters:

ParameterTypeDescription
xdoubleThe value for X coordinate.
ydoubleThe value for Y coordinate.
zdoubleThe value for Z coordinate.

Constructor: Point(x, y, z, m)

 Point(x, y, z, m) 

Initializes a new instance of the Point class.

Parameters:

ParameterTypeDescription
xdoubleThe value for X coordinate.
ydoubleThe value for Y coordinate.
zdoubleThe value for Z coordinate.
mdoubleThe value for M coordinate.

Method: as_binary()

 as_binary() 

Translates this geometry to its Well-Known Binary representation.

Returns

TypeDescription
byteWell-Known Binary representation of this geometry.

Method: as_binary(variant)

 as_binary(variant) 

Translates this geometry to its Well-Known Binary representation.

Parameters:

ParameterTypeDescription
variantWkbVariantWell-Known Binary variant to use.

Returns

TypeDescription
byteWell-Known Binary representation of this geometry.

Method: as_image(output_path, width, height, renderer, symbolizer)

 as_image(output_path, width, height, renderer, symbolizer) 

Export this geometry to an image representation.

Parameters:

ParameterTypeDescription
output_pathAbstractPathPath to the output image.
widthMeasurementWidth of the map.
heightMeasurementHeight of the map.
rendererRendererRenderer to use.
symbolizerVectorSymbolizerA symbolizer to use for rendering. If , default symbolizer is used.

Method: as_image(output_path, width, height, renderer, symbolizer)

 as_image(output_path, width, height, renderer, symbolizer) 

Export this geometry to an image representation.

Parameters:

ParameterTypeDescription
output_pathstringPath to the output image.
widthMeasurementWidth of the map.
heightMeasurementHeight of the map.
rendererRendererRenderer to use.
symbolizerVectorSymbolizerA symbolizer to use for rendering. If , default symbolizer is used.

Method: as_image(width, height, renderer, symbolizer)

 as_image(width, height, renderer, symbolizer) 

Export this geometry to an image representation.

Parameters:

ParameterTypeDescription
widthMeasurementWidth of the map.
heightMeasurementHeight of the map.
rendererRendererRenderer to use.
symbolizerVectorSymbolizerA symbolizer to use for rendering. If , default symbolizer is used.

Returns

TypeDescription
_io.BufferedRandomThe image as stream

Method: as_text()

 as_text() 

Translates this geometry to its Well-Known Text representation.

Returns

TypeDescription
stringWell-Known Text representation of this geometry.

Method: as_text(variant)

 as_text(variant) 

Translates this geometry to its Well-Known Text representation.

Parameters:

ParameterTypeDescription
variantWktVariantWell-Known Text variant to use.

Returns

TypeDescription
stringWell-Known Text representation of this geometry.

Method: as_text(variant, format)

 as_text(variant, format) 

Translates this geometry to its Well-Known Text representation.

Parameters:

ParameterTypeDescription
variantWktVariantWell-Known Text variant to use.
formatNumericFormatCoordinate format for conversion to string. See the NumericFormat to get it.

Returns

TypeDescription
stringWell-Known Text representation of this geometry.

Method: clone()

 clone() 

Clones this instance.

Returns

TypeDescription
GeometryThe clone of this instance

Method: covered_by(other)

 covered_by(other) 

Determines whether this geometry is covered by a specified geometry.

Parameters:

ParameterTypeDescription
otherIGeometryA geometry.

Returns

TypeDescription
boolif this geometry is “spatially covered by” another geometry. otherwise.

Method: covers(other)

 covers(other) 

Determines whether this geometry covers a specified geometry.

Parameters:

ParameterTypeDescription
otherIGeometryA geometry.

Returns

TypeDescription
boolif this geometry is “spatially covers” another geometry. otherwise.

Method: crosses(other)

 crosses(other) 

Determines if this geometry and a specified geometry cross.

Parameters:

ParameterTypeDescription
otherIGeometryA geometry.

Returns

TypeDescription
boolif this geometry is “spatially crosses” another geometry. otherwise.

Method: difference(other)

 difference(other) 

Subtracts a specified geometry from this geometry.

Parameters:

ParameterTypeDescription
otherIGeometryA geometry to subtract.

Returns

TypeDescription
IGeometryA geometry that represents a difference of this geometry and an argument. The result geometry contains
point set that present in this geometry but not present in an argument.

Method: disjoint(other)

 disjoint(other) 

Determines if this geometry is disjoint from a specified geometry.

Parameters:

ParameterTypeDescription
otherIGeometryA geometry.

Returns

TypeDescription
boolif this geometry is “spatially disjoint” from another geometry. otherwise.

Method: from_binary(wkb) [static]

 from_binary(wkb) 

Creates a geometry from its Well-Known Binary representation.

Parameters:

ParameterTypeDescription
wkbbyteWell-Known Binary representation of a geometry.

Returns

TypeDescription
IGeometryA geometry represented by the argument.

Method: from_binary(wkb, spatial_reference_system) [static]

 from_binary(wkb, spatial_reference_system) 

Creates a geometry from its Well-Known Binary representation.

Parameters:

ParameterTypeDescription
wkbbyteWell-Known Binary representation of a geometry.
spatial_reference_systemSpatialReferenceSystemSpatial Reference System to be assigned to the geometry.

Returns

TypeDescription
IGeometryA geometry represented by the argument.

Method: from_text(wkt) [static]

 from_text(wkt) 

Creates a geometry from its Well-Known Text representation.

Parameters:

ParameterTypeDescription
wktstringWell-Known Text representation of a geometry.

Returns

TypeDescription
IGeometryA geometry represented by the argument.

Method: from_text(wkt, spatial_reference_system) [static]

 from_text(wkt, spatial_reference_system) 

Creates a geometry from its Well-Known Text representation.

Parameters:

ParameterTypeDescription
wktstringWell-Known Text representation of a geometry.
spatial_reference_systemSpatialReferenceSystemSpatial Reference System to be assigned to the geometry.

Returns

TypeDescription
IGeometryA geometry represented by the argument.

Method: get_area()

 get_area() 

Computes the area of this geometry.

Returns

TypeDescription
doubleThe area of this geometry.
Sum of areas of elements of this geometry if this geometry is a GeometryCollection.

Method: get_buffer(distance, quadrant_segments)

 get_buffer(distance, quadrant_segments) 

Computes a buffer region around this geometry.

Parameters:

ParameterTypeDescription
distancedoubleThe buffer region width.
quadrant_segmentsintNumber of segments used to approximate a 90 degree of curvature.
The larger this number is the better approximation of curves is produced.
Default is 30.

Returns

TypeDescription
IGeometryA geometry that represents all points that are within a specified distance from
this geometry.
The type of result is either Geometry.null, IPolygon or IMultiPolygon.

Method: get_centroid()

 get_centroid() 

Computes the centroid of this geometry.

Returns

TypeDescription
IPointThe centroid of this geometry. If this geometry is empty an empty point returned.
The centroid is equal to the centroid of the highest dimension geometries in this geometry
(e.g. if both points and lines are contained in the geometry, only lines contribute to centroid).

Method: get_convex_hull()

 get_convex_hull() 

Computes the convex hull of this geometry.

Returns

TypeDescription
IGeometryA geometry that represents a convex hull of this geometry.
If this geometry has no points then the result is Geometry.null.
If this geometry has only one point then the result is this point.
If this geometry has only two points then the result is ILineString with the points.
If this geometry has three or more points then the result is ILinearRing that represents a convex
hull around all geometries points.

Method: get_distance_to(other)

 get_distance_to(other) 

Computes the minimum distance between this geometry and a specified geometry.

Parameters:

ParameterTypeDescription
otherIGeometryA geometry to find distance to.

Returns

TypeDescription
doubleIf both geometries are not Geometry.is_empty - a distance between closest points of the geometries.
If at least one geometry is empty -1 is returned.

Method: get_extent()

 get_extent() 

Computes and returns a bounding extent of this geometry.

Returns

TypeDescription
ExtentA bounding extent of this geometry.

Method: get_length()

 get_length() 

Computes the length of this geometry.

Returns

TypeDescription
doubleThe length of this geometry.
Perimeter if this is a Polygon.
Sum of lengths of elements of this geometry if this geometry is a GeometryCollection.

Method: intersection(other)

 intersection(other) 

Builds an intersection between this geometry and a specified geometry.

Parameters:

ParameterTypeDescription
otherIGeometryA geometry to compute intersection with.

Returns

TypeDescription
IGeometryA geometry that represents an intersection of this geometry and an argument. The result geometry contain
point set that present in both this geometry and an argument.

Method: intersects(extent)

 intersects(extent) 

Determines whether this geometry intersects a specified extent.

Parameters:

ParameterTypeDescription
extentExtentThe extent.

Returns

TypeDescription
boolif this geometry intersects the extent; otherwise.

Method: intersects(other)

 intersects(other) 

Determines if this geometry and a specified geometry intersects.

Parameters:

ParameterTypeDescription
otherIGeometryA geometry.

Returns

TypeDescription
boolif this geometry “spatially intersects” another geometry. otherwise.

Method: overlaps(other)

 overlaps(other) 

Determines whether this geometry overlap with a specified geometry.

Parameters:

ParameterTypeDescription
otherIGeometryA geometry.

Returns

TypeDescription
boolif this geometry is “spatially overlaps” another geometry. otherwise.

Method: relate(other, intersection_pattern_matrix)

 relate(other, intersection_pattern_matrix) 

Determines if DE-9IM intersection matrix of this geometry and a specified geometry matches provided pattern.

Parameters:

ParameterTypeDescription
otherIGeometryA geometry.
intersection_pattern_matrixstringA patter to match with.
This should be a string with length equal to 9.
Each character of the string represent expected dimension of an intersection:

  • character 0 - between interiors of the geometries.

  • character 1 - between interior of this geometry and boundary of another geometry.

  • character 2 - between interior of this geometry and exterior of another geometry.

  • character 3 - between boundary of this geometry and interior of another geometry.

  • character 4 - between boundaries of the geometries.

  • character 5 - between boundary of this geometry and exterior of another geometry.

  • character 6 - between exterior of this geometry and interior of another geometry.

  • character 7 - between exterior of this geometry and boundary of another geometry.

  • character 8 - between exteriors of the geometries.


Possible values of each characters are:

  • * - any value;

  • F - no intersection;

  • T - any intersection;

  • 0 - point intersection (e.g. shared point);

  • 1 - line intersection (e.g. shared segment of line);

  • 2 - area intersection (e.g. shared part of polygon);


For example, an intersection pattern “F0*******” means, that there should not be intersection between geometries interiors
and intersection between geometries boundaries must be a point.
See OpenGIS Simple Features Specification for more details about intersection matrix pattern.

Returns

TypeDescription
boolif this intersection matrix matches patter; otherwise.

Method: replace_polygons_by_lines()

 replace_polygons_by_lines() 

Gets polygons represented as lines of this geometry.

Returns

TypeDescription
IGeometryA geometry, that has no polygon geometries. The following transformation are applied:

Method: round_m(digits)

 round_m(digits) 

Rounds M coordinate to a specified number of fractional digits.

Parameters:

ParameterTypeDescription
digitsintNumber of fractional digits.

Method: round_xy(digits)

 round_xy(digits) 

Rounds X and Y coordinates to a specified number of fractional digits.

Parameters:

ParameterTypeDescription
digitsintNumber of fractional digits.

Method: round_z(digits)

 round_z(digits) 

Rounds Z coordinate to a specified number of fractional digits.

Parameters:

ParameterTypeDescription
digitsintNumber of fractional digits.

Method: spatially_contains(other)

 spatially_contains(other) 

Determines whether this geometry spatially contains a specified geometry.

Parameters:

ParameterTypeDescription
otherIGeometryA geometry.

Returns

TypeDescription
boolif this geometry is “spatially contains” another geometry. otherwise.

Method: spatially_equals(other)

 spatially_equals(other) 

Determines if this geometry spatially equal to a specified geometry.

Parameters:

ParameterTypeDescription
otherIGeometryA geometry.

Returns

TypeDescription
boolif this geometry “spatially equals” to specified geometry. otherwise.

Method: sym_difference(other)

 sym_difference(other) 

Builds a symmetric difference between this geometry and a specified geometry.

Parameters:

ParameterTypeDescription
otherIGeometryA geometry to compute symmetric difference with.

Returns

TypeDescription
IGeometryA geometry that represents a symmetric difference of this geometry and an argument. The result geometry contains
point set that present in one of the geometries but not present in both of them.

Method: to_editable()

 to_editable() 

Gets an editable copy of this geometry.

Returns

TypeDescription
PointAn editable copy of this geometry.

Method: to_linear_geometry()

 to_linear_geometry() 

Gets approximate or equivalent non-curve version of this geometry using the default tolerance.

Returns

TypeDescription
IGeometryA geometry that has no curve geometries. This is the equivalent of <DOM Element: class at 0x2a1791a70d0>.IGeometry.to_linear_geometry()(float) with
default tolerance. Default tolerance is defined by IGeometry.spatial_reference_system
of this geometry:

  • For projected SRS Tolerance is 0.001 meters (in SRS units)

  • For geographic SRS Tolerance is 1e-5 degrees (in SRS units)

  • For unknown SRS Tolerance is 1e-5


For more details on what transformations are applied refer to <DOM Element: class at 0x2a1791a70d0>.IGeometry.to_linear_geometry()(float) specification.

Method: to_linear_geometry(tolerance)

 to_linear_geometry(tolerance) 

Gets approximate or equivalent non-curve version of this geometry using the specified tolerance.

Parameters:

ParameterTypeDescription
tolerancedoubleThe tolerance to use. The result is guaranteed to be less than tolerance away from the
curved geometry, unless the number of points needed to linearize the geometry exceeds the per-quadrant maximum
which is currently equal to 10000 points.

Returns

TypeDescription
IGeometryA geometry, that has no curve geometries. The following transformations are applied:

As a result, IGeometry.has_curve_geometry of output geometry is .

Method: to_svg(extent)

 to_svg(extent) 

Translates this geometry to Svg representation.

Parameters:

ParameterTypeDescription
extentExtentExtent for translation this geometry to Svg

Returns

TypeDescription
stringThe Svg representation.

Method: touches(other)

 touches(other) 

Determines if this geometry and a specified geometry touch.

Parameters:

ParameterTypeDescription
otherIGeometryA geometry.

Returns

TypeDescription
boolif this geometry is “spatially touches” another geometry. otherwise.

Method: union(other)

 union(other) 

Unites this geometry and a specified geometry.

Parameters:

ParameterTypeDescription
otherIGeometryA geometry to unite with.

Returns

TypeDescription
IGeometryA geometry that represents a union of this geometry and an argument. The result geometry contains
point set that present in this geometry or in an argument.

Method: union(other)

 union(other) 

Unites this geometry and a specified geometry.

Parameters:

ParameterTypeDescription
otherIGeometry[]A geometry to unite with.

Returns

TypeDescription
IGeometryA geometry that represents a union of this geometry and an argument. The result geometry contains
point set that present in this geometry or in an argument.

Method: within(extent)

 within(extent) 

Determines whether this geometry is within a specified extent.

Parameters:

ParameterTypeDescription
extentExtentThe extent.

Returns

TypeDescription
boolif this geometry is within extent; otherwise.

Method: within(other)

 within(other) 

Determines whether this geometry is within a specified geometry.

Parameters:

ParameterTypeDescription
otherIGeometryA geometry.

Returns

TypeDescription
boolif this geometry is “spatially within” another geometry. otherwise.