Sedona LEFT JOIN using SPATIAL INDEX #2520
Replies: 5 comments 4 replies
-
|
as mentioned by petern48 seems this functionality has been already merge here #247 but I cannot find any usage examples. Any help would be appreciated. Thanks |
Beta Was this translation helpful? Give feedback.
-
|
Thanks jiayuasu. In the attached example https://github.com/user-attachments/files/23711205/sedona-spatial-indexing.zip I already try to used the left join operator via SQL but the indexing isn't trigger. With large dataset this approach it's too slow. Could you please clarify "This support is only available via Spatial SQL / DataFrame API. Not the old RDD SpatialJoinQuery API." ? Should this Spatial SQL / DataFrame API support available for java or other languages? Any example/testcase showing up the left join usage with index? |
Beta Was this translation helpful? Give feedback.
-
|
Solved follow a working examples: The results: In logs I can see SpatialRDD has been triggered: I am correct now? |
Beta Was this translation helpful? Give feedback.
-
|
Please do And I believe your code is correct actually |
Beta Was this translation helpful? Give feedback.
-
|
Thanks jiayuasu I see |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Good morning Folks,
I'm trying to use sedona spatial index but I can't figure out how to obtain the same results as if I use a LEFT JOIN.
Given a polygon I need to determinate if a given set of points are WITHIN the polygon. The test is very simple:
1 point is inside
1 point is outside
are these points WITHIN the polygon ? Using the LEFT JOIN I obtain the correct results ( I also want points not in polygon):
If I use the spatial index the results are different ( the outside point is missing):
How to use spatial index to have the LEFT JOIN results?
Any suggestions would be appreciated.
Attaching a java maven project to show the case:
sedona-spatial-indexing.zip
Thanks in advance
Michele
P.S. without using index the "LEFT JOIN" is quite slow using a big dataset.
Beta Was this translation helpful? Give feedback.
All reactions