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

Question: how to handle 3d coordinates #714

Closed
jliebrand opened this issue Feb 7, 2019 · 5 comments
Closed

Question: how to handle 3d coordinates #714

jliebrand opened this issue Feb 7, 2019 · 5 comments

Comments

@jliebrand
Copy link

Quick question: I have GeoJSON data which is formatted slightly oddly (and I'm not even sure it's valid??). Example:

{
  "type": "Feature",
  "properties": {},
  "geometry": {
    "type": "MultiPoint",
    "coordinates": [
      [4.2986051, 51.1254047, -2.6],
      [4.3025707, 51.1202334, -3.4],
      [4.305517, 51.1223118, 7.6],
      [4.3011774, 51.1241362, 9.7],
      [4.3047621, 51.1253548, 3.0],
      [4.3076292, 51.126133, 3.4],
      [4.3138017, 51.1268111, 8.7],
      [4.3118194, 51.1274344, 4.1],
      [4.3171699, 51.1287236, 6.8],
      [4.3198019, 51.1290972, 12.1]
    ]
  }
}

Basically the third digit is the elevation. Can tippecanoe handle this, and if not, how should I reformat it (short of individual points all with elevation set in properties??)

@e-n-f
Copy link
Contributor

e-n-f commented Feb 7, 2019

The release branch of Tippecanoe doesn't handle 3-D because version 2 of the vector tile spec doesn't have a way to represent it.

The VT3 development branch (#611) does support 3-D, using the same syntax as you used above. But the tiles will be of limited use until rendering clients start to support the VT3 format.

@jliebrand
Copy link
Author

Ah ok - then for now I'll reformat the geojson to individual points with properties I guess...

@e-n-f
Copy link
Contributor

e-n-f commented Feb 8, 2019

Yes, I think that is your best option at the moment.

@e-n-f e-n-f closed this as completed Feb 8, 2019
@omrivolk
Copy link

omrivolk commented Apr 30, 2019

Hi, revisiting this issue, if I want to display the depth at each point, should formatting it like this work:

{
  "type": "Feature",
  "properties": {"name":"-2.6"},
  "geometry": {
    "type": "Point",
    "coordinates": 
      [4.2986051, 51.1254047]
  }
}

@jliebrand
Copy link
Author

Yep, I think so - creating one feature per point... quite a bit more verbose, but until 3 (or multi?) dimensional points are supported, that'll have to be the way it's done. (Where "name" could be "elevation" or whatever you then want to use in the style)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants