admin管理员组文章数量:1391987
I'm using Kepler.gl in Python to visualize trajectories on a map. Each trajectory is represented by a separate layer, where the data consists of latitude, longitude, and altitude values. Even though I have set the opacity to 100%, the outline width to 0 and the layer blending mode to "normal," I am encountering an issue when I include altitude values in the visualization.
When the altitude is added, some points display a transparent contour instead of correctly overlapping with others. It seems that when a point is positioned above another, it blends correctly in only one direction. In the following example, when a point is positioned above and to the right of another, the border is visible. However, when the point is above and to the left, the contour is not visible.
Points overlapping on a map. The z-value represents the altitude, with higher values indicating higher altitudes.
Trajectory made of points on a map.
Reproducible example code:
import pandas as pd
import numpy as np
from keplergl import KeplerGl
num_points = 100
start_lat, start_lng, start_alt = 37.77, -122.42, 0
data = {
"latitude": np.linspace(start_lat, start_lat + 0.01, num_points),
"longitude": np.linspace(start_lng, start_lng + 0.01, num_points),
"altitude": np.linspace(start_alt, start_alt + 100, num_points) + np.random.uniform(-5, 5, num_points)
}
df = pd.DataFrame(data)
map_ = KeplerGl(height=600)
config = {
"version": "v1",
"config": {
"visState": {
"layers": [
{
"id": "point_layer",
"type": "point",
"config": {
"dataId": "trajectories",
"label": "Trajectory",
"color": [255, 0, 0],
"columns": {
"lat": "latitude",
"lng": "longitude",
"altitude": "altitude"
},
"isVisible": True,
"visConfig": {
"radius": 10,
"opacity": 1.0,
"outline": False,
"strokeWidth": 0,
"blending": "normal"
}
}
}
]
}
}
}
map_.add_data(df, "trajectories")
map_.config = config
map_
Has anyone encountered a similar issue when tracing points in 3D in Kepler.gl
? How can I resolve it?
本文标签: pythonWhy does adding altitude to points in Keplergl result in rendering issuesStack Overflow
版权声明:本文标题:python - Why does adding altitude to points in Kepler.gl result in rendering issues? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744741825a2622653.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论