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

Support extrusion heights over 65km #3954

Closed
lcapel opened this issue Jan 11, 2017 · 7 comments
Closed

Support extrusion heights over 65km #3954

lcapel opened this issue Jan 11, 2017 · 7 comments
Assignees

Comments

@lcapel
Copy link

lcapel commented Jan 11, 2017

Hello,
I'm trying to create a 3D hexbin map, similar to the example you showed a while ago (https://www.mapbox.com/bites/00304/). I'm trying to do this at a country level rather than city level. I tried to raise the fill-extrusion-height to an appropriate level, as this is set in meters I'd need something in the region of 300+Km but I guess I'm hitting a limitation and I can really go above ~50Km. Do you think that this could be an error on my behalf or this is indeed a limitation perhaps do to the type of Integer that is used to set the fill-extrusion-height?

@lbud
Copy link
Contributor

lbud commented Jan 12, 2017

@lcapel yes, fill-extrusion-height uses a Uint16 type, so the maximum possible value is 65535. At the moment we don't have plans to use bigger numbers as the increase in memory usage would be substantial for what seems to be a pretty limited use case — from what I've seen so far most use cases don't come near 65535 meters.

@mourner
Copy link
Member

mourner commented Jan 17, 2017

Let's keep this open — there's a chance we could add support for higher values while not sacrificing memory requirements, e.g. by introducing a multiplier spec property. That way you could control the height range at the expense of precision (e.g. have fill-extrusion-multiplier: 10 would allow going up to 655km but with 10m increments instead of 1m).

This use case seems quite common — every extrusion-based visualization that's on a bigger scale than city level (e.g. counties, countries) will need bigger values supported.

@mourner mourner reopened this Jan 17, 2017
@mourner mourner changed the title fill-extrusion-height max height is not sufficient Support extrusion heights over 65km Jan 17, 2017
@peterqliu
Copy link
Contributor

peterqliu commented Apr 27, 2017

Just adding that I'm making an earthquake map that would benefit from world-scale extrusions (65535 isn't enough), so the use case is fairly broad:

screen shot 2017-04-27 at 2 08 42 pm

May be worth revisiting adding pixel-unit support for extrusions, per #3385

@yonghah
Copy link

yonghah commented Sep 17, 2017

Is this closed? I'm still getting an error when the extrusion height exceeds 65535 in v0.40.0.

Error: layers.base-bar.paint.fill-extrusion-height.stops[1][1]: 67000 is greater than the maximum value 65535
    at Function.module.exports.emitErrors (validate_style.js:10)
    at e.i._validate (style_layer.js:374)
    at e.i.setPaintProperty (style_layer.js:159)
    at t.setPaintProperty (style.js:756)
    at e.setPaintProperty (map.js:1309)

@jfirebaugh
Copy link
Contributor

Whoops, I forgot to remove the maximum from the style specification. Fix in #5320.

@yonghah
Copy link

yonghah commented Sep 20, 2017

@jfirebaugh I believe the maximum of fill-extrusion-base also needs to be removed.

@jfirebaugh
Copy link
Contributor

@yonghah Good catch, thank you! Removing in #5338.

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

6 participants