Skip to content

Commit

Permalink
Update spatial_joins.md
Browse files Browse the repository at this point in the history
  • Loading branch information
asinghvi17 authored Sep 20, 2024
1 parent 2f1e4ec commit bd679d7
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions docs/src/tutorials/spatial_joins.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,18 @@ Spatial joins can be done between any geometry types (from geometrycollections t

In this tutorial, we will show how to perform a spatial join on first a toy dataset and then two Natural Earth datasets, to show how this can be used in the real world.

In order to perform the spatial join, we use **[FlexiJoins.jl](https://github.com/JuliaAPlavin/FlexiJoins.jl)** to perform the join, specifically using its `by_pred` joining method. This allows the user to specify a predicate in the following manner:
In order to perform the spatial join, we use **[FlexiJoins.jl](https://github.com/JuliaAPlavin/FlexiJoins.jl)** to perform the join, specifically using its `by_pred` joining method. This allows the user to specify a predicate in the following manner, for any kind of table join operation:
```julia
[inner/left/right/outer/...]join((table1, table1),
innerjoin((table1, table1),
by_pred(:table1_column, predicate_function, :table2_column) # & add other conditions here
)
leftjoin((table1, table1),
by_pred(:table1_column, predicate_function, :table2_column) # & add other conditions here
)
rightjoin((table1, table1),
by_pred(:table1_column, predicate_function, :table2_column) # & add other conditions here
)
outerjoin((table1, table1),
by_pred(:table1_column, predicate_function, :table2_column) # & add other conditions here
)
```
Expand Down

0 comments on commit bd679d7

Please sign in to comment.