Select to view content in your preferred language

M to M polygons overlap each other server side

748
5
Jump to solution
04-22-2020 05:48 AM
rsharma
Frequent Contributor

Hi i want to check if 2 polygons overlap each other from any of its side

0 Kudos
1 Solution

Accepted Solutions
rsharma
Frequent Contributor

working on this link these days... please share your experience with mysql functions 

database - How can I handle MySQL polygon overlap queries? - Stack Overflow 

View solution in original post

0 Kudos
5 Replies
KenBuja
MVP Esteemed Contributor

You can use the geometryEngine's intersects method to test the two polygons.

rsharma
Frequent Contributor

Hi Ken,

I would like to know , that if i get an array of polygons from db (assume constant) and match it with current map graphicslayer graphics geomtery, in that case how intersect will work. to match 2 arrays of geometries

0 Kudos
KenBuja
MVP Esteemed Contributor

The intersects method only compares one geometry with another. So you'd have to loop through your array, comparing each polygon with your graphic.

rsharma
Frequent Contributor

don't it make my app very slow, to retrieve all users polygons(more than 1000) from db and then check on browser side with this method. one by one.

Is their any method to check it on server side.

As i have to show also that overlaped polygon, so i think it makes my app very slow

0 Kudos
rsharma
Frequent Contributor

working on this link these days... please share your experience with mysql functions 

database - How can I handle MySQL polygon overlap queries? - Stack Overflow 

0 Kudos