Good time of day, fellows.
I’m trying to parse shapefile with country boundaries (50m cultural admin0 countries).
I use PHP with some libraries. All is ok, file contains some geometries of type Polygon, sometimes consisting of multiple parts. For some countries they represent mainland and island territories or exclaves. And sometimes I can see they should represent holes in other polygon.
Please, help me destinguish this holes from regular outer parts, so I can build OpenGIS MULTIPOLYGONs from data. Can’t find a clue except of checking which poly fits one into another, and this is complicated. What is common way to do this?
Thanks.
Sorry, after some googling I’ve found an answer.
For those who encounter the same problem, the answer is:
Outer rings should have their vertexes ordered clockwise, inner – counterclockwise.