ST_INTERSECTS error with ST_CIRCLE

30 views
Skip to first unread message

Ryan Bessey

unread,
Dec 19, 2018, 11:35:34 AM12/19/18
to GeoSpark Discussion Board
I am attempting to run this query to find points intersecting with circles:

SELECT a.*,b.* FROM tableA a, tableB b WHERE ST_INTERSECTS(ST_POINT(a.LONG,a.LAT),ST_CIRCLE(ST_POINT(b.LONG,b.LAT),b.RADIUS)))

but I get this error message:

java.lang.UnsupportedOperationException: org.datasyslab.geospark.geometryObjects.Circle

Does the ST_INTERSECTS function have support for Circle geometries on the right?  Interestingly, the query does work when the Circle geometry is on the left, but doesn't work when the Circle geometry is on the right.  I'm trying to get it to work when the Circle is on the right, because I've found that the INTERSECTS function runs faster when the larger dataset is on the left. 
 

Jia Yu

unread,
Dec 20, 2018, 3:20:00 PM12/20/18
to Ryan Bessey, GeoSpark Discussion Board
Hi Ryan,

You should use distance join instead. Don't use ST_Circle.
Example is here:

Thanks,
Jia

------------------------------------

Jia Yu,

Ph.D. Student in Computer Science



--
You received this message because you are subscribed to the Google Groups "GeoSpark Discussion Board" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geospark-discussio...@googlegroups.com.
To post to this group, send email to geospark-dis...@googlegroups.com.
Visit this group at https://groups.google.com/group/geospark-discussion-board.
To view this discussion on the web visit https://groups.google.com/d/msgid/geospark-discussion-board/52a969d0-4017-44f4-bca2-58972747c715%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ryan Bessey

unread,
Jan 3, 2019, 9:40:54 AM1/3/19
to GeoSpark Discussion Board
Hi Jia,

Thank you very much.  Slightly related question: What is the most efficient way using GeoSpark SQL to query for points that are excluded from polygons?  

Thanks,
Ryan


On Thursday, December 20, 2018 at 3:20:00 PM UTC-5, Jia Yu wrote:
Hi Ryan,

You should use distance join instead. Don't use ST_Circle.
Example is here:

Thanks,
Jia

------------------------------------

Jia Yu,

Ph.D. Student in Computer Science



On Wed, Dec 19, 2018 at 9:35 AM Ryan Bessey <rdbe...@gmail.com> wrote:
I am attempting to run this query to find points intersecting with circles:

SELECT a.*,b.* FROM tableA a, tableB b WHERE ST_INTERSECTS(ST_POINT(a.LONG,a.LAT),ST_CIRCLE(ST_POINT(b.LONG,b.LAT),b.RADIUS)))

but I get this error message:

java.lang.UnsupportedOperationException: org.datasyslab.geospark.geometryObjects.Circle

Does the ST_INTERSECTS function have support for Circle geometries on the right?  Interestingly, the query does work when the Circle geometry is on the left, but doesn't work when the Circle geometry is on the right.  I'm trying to get it to work when the Circle is on the right, because I've found that the INTERSECTS function runs faster when the larger dataset is on the left. 
 

--
You received this message because you are subscribed to the Google Groups "GeoSpark Discussion Board" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geospark-discussion-board+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages