> ## 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_area_geometry

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/filter_by_area_geometry.rs#L38-L55)
pub async fn [filter\_by\_area\_geometry](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/filter-by-area-geometry.md#method.filter_by_area_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), x\_vector: [Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[f64](https://doc.rust-lang.org/1.98.1/std/primitive.f64.html)>, y\_vector: [Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[f64](https://doc.rust-lang.org/1.98.1/std/primitive.f64.html)>, ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[FilterByAreaGeometryResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.FilterByAreaGeometryResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Filter a dataset for geospatial geometry objects intersecting a 2-D polygonCalculates which geospatial geometry objects from a table intersect a named area of interest (NAI/polygon). The operation is synchronous, meaning that a response will not be returned until all the matching objects are fully available. The response payload provides the count of the resulting set. A new resultant set (view) which satisfies the input NAI restriction specification is created with the name `view_name` passed in as part of the input.

##### Arguments

<ul>
  <li>`table_name` - Name of the table to filter, in \[schema\_name.]table\_name format, using standard name resolution rules. This may be the name of a table or a view (when chaining queries).</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 geospatial geometry column to be filtered.</li>
  <li>`x_vector` - List of x coordinates of the vertices of the polygon representing the area to be filtered.</li>
  <li>`y_vector` - List of y coordinates of the vertices of the polygon representing the area to be filtered.</li>
</ul>

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/filter_by_area_geometry.rs#L85-L109)
pub async fn [filter\_by\_area\_geometry\_with\_opts](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/filter-by-area-geometry.md#method.filter_by_area_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), x\_vector: [Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[f64](https://doc.rust-lang.org/1.98.1/std/primitive.f64.html)>, y\_vector: [Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[f64](https://doc.rust-lang.org/1.98.1/std/primitive.f64.html)>, options: [FilterByAreaGeometryRequestOptions](https://docs.kinetica.com/content/api/rust/generated/api/struct.FilterByAreaGeometryRequestOptions.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[FilterByAreaGeometryResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.FilterByAreaGeometryResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Filter a dataset for geospatial geometry objects intersecting a 2-D polygonCalculates which geospatial geometry objects from a table intersect a named area of interest (NAI/polygon). The operation is synchronous, meaning that a response will not be returned until all the matching objects are fully available. The response payload provides the count of the resulting set. A new resultant set (view) which satisfies the input NAI restriction specification is created with the name `view_name` passed in as part of the input.

##### Arguments

<ul>
  <li>`table_name` - Name of the table to filter, in \[schema\_name.]table\_name format, using standard name resolution rules. This may be the name of a table or a view (when chaining queries).</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 geospatial geometry column to be filtered.</li>
  <li>`x_vector` - List of x coordinates of the vertices of the polygon representing the area to be filtered.</li>
  <li>`y_vector` - List of y coordinates of the vertices of the polygon representing the area to be filtered.</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_area_geometry.rs#L112-L123)
pub async fn [filter\_by\_area\_geometry\_raw](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/filter-by-area-geometry.md#method.filter_by_area_geometry_raw)( \&self, request: &[FilterByAreaGeometryRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.FilterByAreaGeometryRequest.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[FilterByAreaGeometryResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.FilterByAreaGeometryResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

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

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

Sends a pre-built [`FilterByAreaGeometryRequest`](https://docs.kinetica.com/content/api/rust/generated/api/struct.FilterByAreaGeometryRequest) 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.