Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow non-string properties #3

Open
vincentsarago opened this issue Apr 11, 2019 · 0 comments
Open

Allow non-string properties #3

vincentsarago opened this issue Apr 11, 2019 · 0 comments

Comments

@vincentsarago
Copy link
Member

The vtzero docs says we could pass any value to feature.add_property but right now when doing it, the module set the value to true

tile = Tile()
points = Layer(tile, b'points')
feature = Point(points)
feature.set_id(1)
feature.add_points(1)
feature.set_point(10, 10)
feature.add_property(b'foo', b'bar')
feature.add_property(b'x', 1)
feature.add_property(b'y', 1.5)
feature.commit()
$ vt2geojson test.pbf -z 17 -x 38754 -y 46891
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [
          -73.55895325541496,
          45.50056724165691
        ]
      },
      "properties": {
        "foo": true,
        "x": true,
        "y": true
      },
      "id": 1
    }
  ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant