ios - Find Inner most Polygon using actual Area from array of nested Polygon -


i have array of gmspath , have coordinate. want find out path in coordinate falls. able find out total polygons in location falls. (using https://stackoverflow.com/a/38826411/2225439) working fine step.

the actual issue comes when 1 closed gmspath overlap closed gmspath , coordinate in overlapped area. per requirement, have 1 gmspath out of these 2 , have smaller area another.

please refer image better understanding.

enter image description here

you can find out area of gmspolygon using following method google maps ios sdk, gmsgeometryarea(), provides area of given polygon. have area, can compare different polygons , find innermost area.

double gmsgeometryarea(gmspath *path); 

as per description provided google

returns area of geodesic polygon defined |path| on earth. "inside" of polygon defined not containing south pole. if |path| not closed, implicitly treated closed path nevertheless , result same. coordinates of path must valid. if segment of path pair of antipodal points, result undefined -- because 2 antipodal points not form unique great circle segment on sphere. polygon must simple (not self-overlapping) , may concave. 

Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -