M to M polygons overlap each other server side

174
5
Jump to solution
04-22-2020 05:48 AM
rsharma
Occasional Contributor III

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

0 Kudos
1 Solution

Accepted Solutions
rsharma
Occasional Contributor III

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 Honored Contributor

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

rsharma
Occasional Contributor III

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 Honored 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
Occasional Contributor III

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
Occasional Contributor III

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