# Perform spatial join with GeoDataFrames

**URL:** https://discourse.julialang.org/t/perform-spatial-join-with-geodataframes/86025
**Category:** New to Julia
**Tags:** dataframes, geo
**Created:** [August 19, 2022, 5:20pm UTC](https://discourse.julialang.org/t/perform-spatial-join-with-geodataframes/86025 "2022-08-19T17:20:32Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![CompulsoryCoffee](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/compulsorycoffee/32/30434_2.png) [@CompulsoryCoffee](https://discourse.julialang.org/u/CompulsoryCoffee)
#### Post date: [August 19, 2022, 5:20pm UTC](https://discourse.julialang.org/t/perform-spatial-join-with-geodataframes/86025/1 "2022-08-19T17:20:32Z")

</div>

Hi,

I want to make a spatial joint of points with polygons. I loaded both shapefiles in Julia via GeoDataFrames.

Does the library allows for spatial join?

Thanks

---

<div class="post-metadata">

### Author: ![bkamins](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bkamins/32/208538_2.png) [@bkamins](https://discourse.julialang.org/u/bkamins)
#### Post date: [January 20, 2023, 3:55am UTC](https://discourse.julialang.org/t/perform-spatial-join-with-geodataframes/86025/2 "2023-01-20T03:55:23Z")

</div>

Does [[ANN] FlexiJoins.jl: fresh take on joining datasets](https://discourse.julialang.org/t/ann-flexijoins-jl-fresh-take-on-joining-datasets/79655) meet your needs?

---

<div class="post-metadata">

### Author: ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)
#### Post date: [January 20, 2023, 10:22am UTC](https://discourse.julialang.org/t/perform-spatial-join-with-geodataframes/86025/3 "2023-01-20T10:22:49Z")

</div>

FlexiJoins support optimized spatial joins of points - as in “find pairs of points within the specified distance” or “find the closest match in B for each point from A”.  
But no optimization for polygon joins is available there, only the naive `O(n^2)` looping approach. This is potentially in scope for `FlexiJoins`, so feel free to propose an implementation that uses some optimized polygon lookup library. It shouldn’t be difficult, just isn’t in my own plans.

---

<div class="post-metadata">

### Author: ![evetion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/evetion/32/22679_2.png) [@evetion](https://discourse.julialang.org/u/evetion)
#### Post date: [January 20, 2023, 11:48am UTC](https://discourse.julialang.org/t/perform-spatial-join-with-geodataframes/86025/4 "2023-01-20T11:48:29Z")

</div>

Let’s continue this discussion in [Spatial join with dataframes](https://discourse.julialang.org/t/spatial-join-with-dataframes/93241)
