Spatial predicates — binary topology relationships between two Geometries. All predicates follow the DE-9IM model (https://en.wikipedia.org/wiki/DE-9IM). GEOS _r functions return: 1 = true, 0 = false, 2 = exception. See also: docs/operations/predicates.md.
Returns true if g is spatially equal to other (same point set). Based on the DE-9IM model.
Raises GeosGeomError if g or other is nil or GEOS returns an exception.
Returns true if g and other share any point in space. Based on the DE-9IM model.var ctx = initGeosContext() let a = ctx.fromWKT("LINESTRING (0 0, 2 2)") let b = ctx.fromWKT("LINESTRING (0 2, 2 0)") echo a.intersects(b) # true
Raises GeosGeomError if g or other is nil or GEOS returns an exception.
Returns true if other lies entirely within g. Based on the DE-9IM model.
Raises GeosGeomError if g or other is nil or GEOS returns an exception.
Returns true if g and other touch at their boundaries but do not intersect in their interiors. Based on the DE-9IM model.
Raises GeosGeomError if g or other is nil or GEOS returns an exception.
Returns true if g lies entirely within other (the inverse of contains). Based on the DE-9IM model.
Raises GeosGeomError if g or other is nil or GEOS returns an exception.
Returns true if g and other share no points in common. Based on the DE-9IM model.
Raises GeosGeomError if g or other is nil or GEOS returns an exception.
Returns true if g and other intersect at interior points but not all of one is contained in the other. Based on the DE-9IM model.
Raises GeosGeomError if g or other is nil or GEOS returns an exception.
Returns true if g and other share interior points but neither contains the other. Based on the DE-9IM model.
Raises GeosGeomError if g or other is nil or GEOS returns an exception.
Procs
proc intersects(g, other: Geometry): bool {....raises: [GeosGeomError], tags: [RootEffect], forbids: [].}