How to distinguish between outer rings and inner rings in shapes

Home Forums Advice & Tutorials General Cartography Advice How to distinguish between outer rings and inner rings in shapes

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #3474

    geostranger
    Participant

    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.

    #4246

    geostranger
    Participant

    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.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.