Returns 1 (TRUE) if this geometric object “spatially contains” anotherGeometry.

@param geometry other geometry
@return true, if contains
19190
public BooleanExpression contains(Expression<? extends Geometry> geometry) {
        return Expressions.booleanOperation(SpatialOps.CONTAINS, mixin, geometry);
    }
102252
public Coordinate getCoordinate(Geometry geometry) {
		LineString lineString = getLineString(geometry);
		if (lineString != null && coordinateIndex >= 0) {
			return lineString.getCoordinateN(coordinateIndex);
		}
		return null;
	}
1306972
private static boolean polygonContainsPolygon_(Polygon polygon_a,
			Polygon polygon_b, double tolerance,
			ProgressTracker progress_tracker) {
		Envelope2D env_a = new Envelope2D(), env_b = new Envelope2D();
		polygon_a.queryEnvelope2D(env_a);
		polygon_b.queryEnvelope2D(env_b);

		// Quick envelope rejection test for false equality.
		if (!envelopeInfContainsEnvelope_(env_a, env_b, tolerance))
			return false;

		// Quick rasterize test to see whether the the geometries are disjoint,
		// or if one is contained in the other.
		int relation = tryRasterizedContainsOrDisjoint_(polygon_a, polygon_b,
				tolerance, false);

		if (relation == Relation.disjoint || relation == Relation.within)
			return false;

		if (relation == Relation.contains)
			return true;

		return polygonContainsPolygonImpl_(polygon_a, polygon_b, tolerance,
				progress_tracker);
	}
635094
public static int getGeometryTypeFromGeometry(Geometry geometry) {
        Integer sfsGeomCode = GEOM_TYPE_TO_SFS_CODE.get(geometry.getGeometryType().toLowerCase());
        if(sfsGeomCode == null) {
            return GeometryTypeCodes.GEOMETRY;
        } else {
            return sfsGeomCode;
        }
    }
278386
public function contains(Geometry $other): bool {
        $event = new SpatialRelationshipOpEvent($this, ['other' => $other]);
        $this->fireOperationEvent(SpatialRelationshipOpEvent::CONTAINS_EVENT, $event);
        return $event->getResults();
    }
87084
public boolean intersects(Geometry geometry) {
		if (geometry == null || isEmpty() || geometry.isEmpty()) {
			return false;
		}

		if (geometry.getNumGeometries() > 1) {
			for (int n = 0; n < geometry.getNumGeometries(); n++) {
				if (intersects(geometry.getGeometryN(n))) {
					return true;
				}
			}
		} else {
			Coordinate[] coordinates = geometry.getCoordinates();
			if (coordinates.length == 1) {
				return coordinate.equals(coordinates[0]);
			} else {
				for (int i = 0; i < coordinates.length - 1; i++) {
					if (Mathlib.distance(coordinates[i], coordinates[i + 1], coordinate) < Mathlib.ZERO) {
						return true;
					}
				}
			}
		}

		return false;
	}
491179
public JTSGeometryExpression<Geometry> union(Expression<? extends Geometry> geometry) {
        return JTSGeometryExpressions.geometryOperation(SpatialOps.UNION, mixin, geometry);
    }
766379
public static boolean contains(LatLong[] latLongs, LatLong latLong) {
        boolean result = false;
        for (int i = 0, j = latLongs.length - 1; i < latLongs.length; j = i++) {
            if ((latLongs[i].latitude > latLong.latitude) != (latLongs[j].latitude > latLong.latitude)
                    && (latLong.longitude < (latLongs[j].longitude - latLongs[i].longitude) * (latLong.latitude - latLongs[i].latitude)
                    / (latLongs[j].latitude - latLongs[i].latitude) + latLongs[i].longitude)) {
                result = !result;
            }
        }
        return result;
    }
10912
def contains?( check_point )
      Util3D.check_arg_type(Vector3, check_point )
      plane = Plane.new( vertices[0], self.normal)
      distance, projected_point = plane.distance(check_point)
      return false if( distance > self.tolerance )
      g_coord = self.barycentric_coordinate(check_point)
      g_coord.each do |item|
        return false if( item < 0 or 1 < item)
      end
      return true
    end
1125108
function validGeometry (geometry) {
  return geometry.coordinates.length === 2 && (geometry.coordinates[0] && geometry.coordinates[1]) ? true : false
}
1336531
public BooleanExpression within(Expression<? extends Geometry> geometry) {
        return Expressions.booleanOperation(SpatialOps.WITHIN, mixin, geometry);
    }
59655
public boolean intersects(Geometry geometry) {
		if (isEmpty()) {
			return false;
		}
		for (Point point : points) {
			if (point.intersects(geometry)) {
				return true;
			}
		}
		return false;
	}
521746
static boolean isSimple(Geometry geometry, SpatialReference spatialReference) {
		OperatorSimplify op = (OperatorSimplify) factory
				.getOperator(Operator.Type.Simplify);
		boolean result = op.isSimpleAsFeature(geometry, spatialReference, null);
		return result;
	}
869821
public JTSGeometryExpression<Geometry> symDifference(Expression<? extends Geometry> geometry) {
        return JTSGeometryExpressions.geometryOperation(SpatialOps.SYMDIFFERENCE, mixin, geometry);
    }
140104
private static void getPunctualGeometry(ArrayList<Point> points, Geometry geometry) {
         for (int i = 0; i < geometry.getNumGeometries(); i++) {
            Geometry subGeom = geometry.getGeometryN(i);
            if(subGeom instanceof Point){
                points.add((Point) subGeom);
            }
            else if (subGeom instanceof GeometryCollection){
                getPunctualGeometry(points, subGeom);
            }
        }
    }
608235
public boolean containsRange(Range<T> otherRange) {
    if (otherRange == null) { return false; }
    return contains(otherRange.min) && contains(otherRange.max);
  }
1175763
public boolean intersects(Geometry geometry) {
		if (geometry == null || isEmpty() || geometry.isEmpty()) {
			return false;
		}

		if (geometry.getNumGeometries() > 1) {
			for (int n = 0; n < geometry.getNumGeometries(); n++) {
				if (intersects(geometry.getGeometryN(n))) {
					return true;
				}
			}
		} else {
			final Coordinate[] coords = geometry.getCoordinates();
			if (coords.length > 1 && coordinates.length > 1) {
				for (int i = 0; i < coordinates.length - 1; i++) {
					for (int j = 0; j < coords.length - 1; j++) {
						if (Mathlib.lineIntersects(coordinates[i], coordinates[i + 1], coords[j], coords[j + 1])) {
							return true;
						}
					}
					if (Mathlib.touches(geometry, coordinates[i])) {
						return true;
					}
				}
			} else {
				// TODO implement me
			}
		}

		return false;
	}