Possibly incorrect winding order #5

Open
opened 7 years ago by skylarmt · 1 comments
Owner

Author: @MattBlissett

According to node-mapnik, "Vector Tile has POLYGON with first ring clockwise. It is not valid according to v2 of VT spec."

A very simple tile, decoded with the protobuf decoder:

layers {
  name: "landcover"
  features {
    tags: 0
    tags: 0
    tags: 1
    tags: 0
    type: POLYGON
    geometry: 9
    geometry: 7534
    geometry: 6334
    geometry: 26
    geometry: 406
    geometry: 42
    geometry: 42
    geometry: 201
    geometry: 429
    geometry: 43
    geometry: 15
  }
  keys: "class"
  keys: "subclass"
  values {
    string_value: "farmland"
  }
  extent: 4096
  version: 2
}

The vertices are:

3767,3167
3970,3188
3991,3087
3776,3065
3767,3167

I'm not sure I'm reading the spec correctly, but in any case it's the opposite winding order from the Feature-single-polygon.mvt tile from mvt-fixtures.

(A workaround is to change the version to 1, which doesn't have the counterclockwise requirement. They then render correctly: )

Author: @MattBlissett According to node-mapnik, "Vector Tile has POLYGON with first ring clockwise. It is not valid according to v2 of VT spec." A [very simple tile](https://tile.gbif-uat.org/4326/omt/10/1082/366.pbf), decoded with the protobuf decoder: ``` layers { name: "landcover" features { tags: 0 tags: 0 tags: 1 tags: 0 type: POLYGON geometry: 9 geometry: 7534 geometry: 6334 geometry: 26 geometry: 406 geometry: 42 geometry: 42 geometry: 201 geometry: 429 geometry: 43 geometry: 15 } keys: "class" keys: "subclass" values { string_value: "farmland" } extent: 4096 version: 2 } ``` The vertices are: ``` 3767,3167 3970,3188 3991,3087 3776,3065 3767,3167 ``` I'm not sure I'm reading the spec correctly, but in any case it's the opposite winding order from the `Feature-single-polygon.mvt` tile from mvt-fixtures. (A workaround is to change the version to 1, which doesn't have the counterclockwise requirement. They then render correctly: )
Poster
Owner

Author: @stirringhalo

Great to know Matt!

Author: @stirringhalo Great to know Matt!
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: skylarmt/postserve#5
Loading…
There is no content yet.