Geospatial Expressions¶
Ibis supports the following geospatial expression APIs
geospatial
¶
Classes¶
GeoSpatialColumn (NumericColumn, GeoSpatialValue)
¶
Methods¶
unary_union(self)
¶
Aggregate a set of geometries into a union.
This corresponds to the aggregate version of the PostGIS ST_Union. We give it a different name (following the corresponding method in GeoPandas) to avoid name conflicts with the non-aggregate version.
Returns¶
GeoSpatialScalar Union of geometries
GeoSpatialValue (NumericValue)
¶
Methods¶
as_binary(self)
¶
as_ewkb(self)
¶
as_ewkt(self)
¶
as_text(self)
¶
azimuth(self, right)
¶
buffer(self, radius)
¶
contains(self, right)
¶
contains_properly(self, right)
¶
covered_by(self, right)
¶
covers(self, right)
¶
crosses(self, right)
¶
d_fully_within(self, right, distance)
¶
d_within(self, right, distance)
¶
difference(self, right)
¶
disjoint(self, right)
¶
distance(self, right)
¶
end_point(self)
¶
Return the last point of a LINESTRING
geometry as a POINT
.
Return NULL
if the input parameter is not a LINESTRING
Returns¶
PointValue End point
envelope(self)
¶
geo_equals(self, right)
¶
geometry_n(self, n)
¶
geometry_type(self)
¶
intersection(self, right)
¶
intersects(self, right)
¶
line_locate_point(self, right)
¶
Locate the distance a point falls along the length of a line.
Returns a float between zero and one representing the location of the closest point on the linestring to the given point, as a fraction of the total 2d line length.
Parameters¶
right Point geometry
Returns¶
FloatingValue Fraction of the total line length
line_merge(self)
¶
Merge a MultiLineString
into a LineString
.
Returns a (set of) LineString(s) formed by sewing together the constituent line work of a MultiLineString. If a geometry other than a LineString or MultiLineString is given, this will return an empty geometry collection.
Returns¶
GeoSpatialValue Merged linestrings
line_substring(self, start, end)
¶
Clip a substring from a LineString.
Returns a linestring that is a substring of the input one, starting and ending at the given fractions of the total 2d length. The second and third arguments are floating point values between zero and one. This only works with linestrings.
Parameters¶
start Start value end End value
Returns¶
LineStringValue Clipped linestring
max_distance(self, right)
¶
Returns the 2-dimensional maximum distance between two geometries in projected units.
If self
and right
are the same geometry the function will return
the distance between the two vertices most far from each other in that
geometry.
Parameters¶
right Right geometry
Returns¶
FloatingValue Maximum distance
n_points(self)
¶
Return the number of points in a geometry. Works for all geometries
Returns¶
IntegerValue Number of points
n_rings(self)
¶
Return the number of rings for polygons and multipolygons.
Outer rings are counted as well.
Returns¶
IntegerValue Number of rings
ordering_equals(self, right)
¶
overlaps(self, right)
¶
perimeter(self)
¶
point_n(self, n)
¶
set_srid(self, srid)
¶
simplify(self, tolerance, preserve_collapsed)
¶
srid(self)
¶
start_point(self)
¶
Return the first point of a LINESTRING
geometry as a POINT
.
Return NULL
if the input parameter is not a LINESTRING
Returns¶
PointValue Start point
touches(self, right)
¶
transform(self, srid)
¶
union(self, right)
¶
within(self, right)
¶
x(self)
¶
Return the X coordinate of self
, or NULL if not available.
Input must be a point.
Returns¶
FloatingValue
X coordinate of self