Skip to content

1st ring is negative area #92

Open

Description

@Savvkin

Hello.
I'm trying to parse tile 20524.vector.pbf.zip (mapbox streets v6) and one of the polygon feature has the first ring with negative area.

Layer: id=2, name=building
Feature: id=4
Geometry: 0x0009 0x153E 0x058C 0x001A 0x00C9 0x00BB 0x04BC 0x050F 0x017A 0x0000 0x000F
Ring: (2719 710) (2618 616) (3224 -32) (3413 -32)
Area: -126149

What does it mean? How should I handle that?
Vector Tile Spec says that 1st ring of polygon (ExteriorRing) must have a positive area.

Activity

  1. Savvkin commented on Oct 26, 2016

    @Savvkin
    Author

    Seems like NetTopologySuite signed area code and Mapbox GL JS signed area code provide different result, but both declare that they are based on the Shoelace formula (as required by the Spec)

  2. flippmoke commented on Oct 26, 2016

    @flippmoke
    Member

    I think this might be related to #80

  3. Savvkin commented on Oct 27, 2016

    @Savvkin
    Author

    Could you explain the difference between NTS Signed Area implementation and Mapbox Signed Area implementation of the same algorythm? They both declare to be based on Shoelace formula, but returns completely different result.

    Also, it might be good idea to include reference pseudocode/c++/c#/js implementation in the spec document.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions