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

Possibility to draw lines and points with specific elevation/altitude #360

Open
txaiwieser opened this issue May 18, 2021 · 29 comments
Open

Comments

@txaiwieser
Copy link

New Feature

We need a way to draw lines on 3d maps that have specific elevation/altitude. Currently, it seems that every path is only defined by lat/long and is always glued to the terrain.

This is what we want to achieve:

image

Why

The value is that now paths, points, and possibility annotations wouldn't be bound to the terrain anymore.

Not sure if there's a workaround to make this possible with the current beta sdk or if there's a plan to support this soon!

Thanks!

@frabarbo
Copy link

Did you find a solution?

@txaiwieser
Copy link
Author

Not yet :(

@richardpineo
Copy link

We have the same need for our application - showing trajectories of flights. Are there any updates for implementing this feature or potential workarounds?

@bambubr
Copy link

bambubr commented May 11, 2022

Same need here - showing trajectories of flights. Any news on this feature?

@amiratsita
Copy link

Same need here. We at SITA also want to display trajectories that have different altitudes. Could you please let us know when this feature will be implemented?
Thank you

@jeradhoy
Copy link

jeradhoy commented Jan 8, 2023

Any update on if this is a feature in the works, or if there are no plans for such a feature?

@frabarbo
Copy link

up

@entioentio
Copy link

Just peeking around. Some of you guys my find this usful: https://deck.gl/examples/mapbox/

@entioentio
Copy link

Or actually this demo: https://codesandbox.io/s/jolly-fast-ouoxgx

@codeversed
Copy link

@entioentio both great examples but I think what we need is LineString to support altitude. Height doesn't work well for flight paths and rendering webgl doesn't seem like the right solution for populating the map as a flight occurs.

The renderings do look great though! 👏

@entioentio
Copy link

Shoot, just now I've noticed we're in mapbox-maps-ios repo 😂 sorry!

@frabarbo
Copy link

@knov

@john-work-ios
Copy link

Anyone found a solution/workaround to achieve this?

@jeradhoy
Copy link

Upvote!

@john-work-ios
Copy link

Any news about this crucial missing feature?

@andrew-hossack
Copy link

Bump, any updates?

@astojilj
Copy link
Contributor

astojilj commented May 20, 2024

Thanks for your interest in this feature, and I hope you can help to clarify the requirements.
For now, the way to achieve this is with a Metal (iOS) / OpenGL (Android) powered Custom layer.

An example from our internal test code (color encodes distance to ground)...

Untitled.mov

Custom layer code here, samples the elevation (ground elevation) for all the points along the route and elevates bottom of the wall and and calculates the top.

@codeversed :
@entioentio both great examples but I think what we need is LineString to support altitude. Height doesn't work well for flight paths and rendering webgl doesn't seem like the right solution for populating the map as a flight occurs.

@codeversed could you please explain the issue in some more details, to avoid missunderstanding?

@txaiwieser @richardpineo @bambubr @amiratsita

I'd like to verify if the altitude information height is always relative to sea level—or does it require combining (ground level offset used for landing?

@john-work-ios
Copy link

@astojilj thank you for the update. Is the sample code supposed to be behind a link somewhere?
The result looks good enough, can the line be updated live? Example: following a plane flight live.

@samYnsat
Copy link

samYnsat commented Aug 6, 2024

@astojilj is there any updates on this feature?

@astojilj
Copy link
Contributor

astojilj commented Aug 6, 2024

Thanks for your patience. We are working on it, and the first experimental support for a non-draped elevated line has been integrated.

https://docs.mapbox.com/ios/maps/api/11.6.0-rc.1/documentation/mapboxmaps/linelayer/linezoffset

E.g. one of the render tests:

https://github.com/mapbox/mapbox-gl-js/blob/fcfe0894e662be52e74689b2e004fbe2cf97841c/test/integration/render-tests/terrain/lines-elevated/style.json#L187-L191

Screenshot 2024-08-06 at 10 38 54

However, the z-offset is an offset from terrain, not the mean sea level offset. So, this is not fitting the requested flight route feature here with constant line altitude.
Also, globe support is not implemented yet, line cross slope for now follows terrain slope. This is experimental code and the current state that we are extending in the following releases.

Also, already available is partial line occlusion behind terrain:

Untitled.7.mov

Let us first provide some examples of how to use this and what could already be achieved in the following days.

@samYnsat
Copy link

samYnsat commented Aug 6, 2024

Thank you for your reply.

However, the z-offset is an offset from terrain, not the mean sea level offset. So, this is not fitting the requested flight route feature here with constant line altitude. Also, globe support is not implemented yet, line cross slope for now follows terrain slope. This is experimental code and the current state that we are extending in the following releases.

As you say in my case I need a thick line that is stable with respect to sea level and can be seen from the globe projection. Thanks for the progress and I'll keep an eye out for any updates.

@john-work-ios
Copy link

Thank you for this update and for your work, much appreciated.

However, the z-offset is an offset from terrain, not the mean sea level offset. So, this is not fitting the requested flight route feature here with constant line altitude.
Also, globe support is not implemented yet, line cross slope for now follows terrain slope. This is experimental code and the current state that we are extending in the following releases.

This is a very important remark, and currently a dealbreaker. For all flight-related activities (and there are a lot, planes, hot-air balloons, gliders, ...), the altitude above sea level is used.

Thank you for considering this very important aspect.

@maxmclau
Copy link

However, the z-offset is an offset from terrain, not the mean sea level offset. So, this is not fitting the requested flight route feature here with constant line altitude.

Happy to see someone working on this though! Our company would switch from ArcGIS to Mapbox in a heartbeat if this feature was added.

@astojilj
Copy link
Contributor

Thanks for your messages. It is good to see all the interest.

However, the z-offset is an offset from terrain, not the mean sea level offset. So, this is not fitting the requested flight route feature here with constant line altitude.
Also, globe support is not implemented yet, line cross slope for now follows terrain slope. This is experimental code and the current state that we are extending in the following releases.

We're working on this.

@jeradhoy
Copy link

Just to chime in with our use case, it's for plotting the flight path of a free-flight aircraft, such as a hang glider, where each coordinate point has a gps altitude (msl altitude) attribute with it. Offset from terrain would require us to do a comparison with a DEM for each point in our flight track to derive height above terrain, adding a lot of error and jumpiness w/ the resolution of the DEM.

@bevan667
Copy link

I concur with @jeradhoy - it needs to be (or have the option of) an altitude AMSL and not AGL

@imedl
Copy link

imedl commented Oct 23, 2024

Any updates?

@astojilj
Copy link
Contributor

Stay tuned please, it is under work.

@astojilj
Copy link
Contributor

astojilj commented Dec 11, 2024

I've provided a short update to mapbox/mapbox-gl-js#3993 (comment). The feature is also available on Mobile. We still need to work on examples and globe support.
Sea level reference, allowing flight paths over terrain, should be already supported.

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