> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# filter_by_geometry

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/filter_by_geometry.rs#L33-L50)
pub async fn [filter\_by\_geometry](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/filter-by-geometry.md#method.filter_by_geometry)( \&self, table\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), view\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), column\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), input\_wkt: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), operation: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[FilterByGeometryResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.FilterByGeometryResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Filter a dataset for records in relation to a given WKT geometry’s boundaryApplies a geometry filter against a geospatial geometry column in a given table or view. The filtering geometry is provided by `input_wkt`.

##### Arguments

<ul>
  <li>`table_name` - Name of the table on which the filter by geometry will be performed, in \[schema\_name.]table\_name format, using standard name resolution rules. Must be an existing table or view containing a geospatial geometry column.</li>
  <li>`view_name` - If provided, then this will be the name of the view containing the results, in \[schema\_name.]view\_name format, using standard name resolution rules and meeting table naming criteria. Must not be an already existing table or view.</li>
  <li>`column_name` - Name of the column to be used in the filter. Must be a geospatial geometry column.</li>
  <li>`input_wkt` - A geometry in WKT format that will be used to filter the objects in `table_name`.</li>
  <li>`operation` - The geometric filtering operation to perform.</li>
</ul>

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/filter_by_geometry.rs#L75-L99)
pub async fn [filter\_by\_geometry\_with\_opts](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/filter-by-geometry.md#method.filter_by_geometry_with_opts)( \&self, table\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), view\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), column\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), input\_wkt: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), operation: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), options: [FilterByGeometryRequestOptions](https://docs.kinetica.com/content/api/rust/generated/api/struct.FilterByGeometryRequestOptions.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[FilterByGeometryResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.FilterByGeometryResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Filter a dataset for records in relation to a given WKT geometry’s boundaryApplies a geometry filter against a geospatial geometry column in a given table or view. The filtering geometry is provided by `input_wkt`.

##### Arguments

<ul>
  <li>`table_name` - Name of the table on which the filter by geometry will be performed, in \[schema\_name.]table\_name format, using standard name resolution rules. Must be an existing table or view containing a geospatial geometry column.</li>
  <li>`view_name` - If provided, then this will be the name of the view containing the results, in \[schema\_name.]view\_name format, using standard name resolution rules and meeting table naming criteria. Must not be an already existing table or view.</li>
  <li>`column_name` - Name of the column to be used in the filter. Must be a geospatial geometry column.</li>
  <li>`input_wkt` - A geometry in WKT format that will be used to filter the objects in `table_name`.</li>
  <li>`operation` - The geometric filtering operation to perform.</li>
  <li>`options` - The optional parameters; any left unset take the server’s defaults.</li>
</ul>

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/filter_by_geometry.rs#L102-L113)
pub async fn [filter\_by\_geometry\_raw](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/filter-by-geometry.md#method.filter_by_geometry_raw)( \&self, request: &[FilterByGeometryRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.FilterByGeometryRequest.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[FilterByGeometryResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.FilterByGeometryResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Sends a pre-built [`FilterByGeometryRequest`](https://docs.kinetica.com/content/api/rust/generated/api/struct.FilterByGeometryRequest) to the `/filter/bygeometry` endpoint.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/filter_by_geometry.rs#L117-L129)
pub async fn [filter\_by\_geometry\_from\_url](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/filter-by-geometry.md#method.filter_by_geometry_from_url)( \&self, url: &[str](https://doc.rust-lang.org/1.98.1/std/primitive.str.html), request: &[FilterByGeometryRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.FilterByGeometryRequest.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[FilterByGeometryResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.FilterByGeometryResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Sends a pre-built [`FilterByGeometryRequest`](https://docs.kinetica.com/content/api/rust/generated/api/struct.FilterByGeometryRequest) to a specific worker URL, bypassing HA head-node selection. Used for multi-head access.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.