CityJSON loader and renderer for Three.js, React-three-fiber, and Jupyter Notebook / JupyterLab.
Supports CityJSON format and CityJSONSeq format.
Package Name | Description | Registry |
---|---|---|
cityview (top-level package) | Python package | |
three-cityjson | JavaScript / TypeScript package |
pip install cityview
import cityview as cv
view = cv.VirtualView(theme="light")
with open("./packages/three-cityjson/public/sample/daiba_sta.city.jsonl", "r") as f:
data = f.read()
view.layers = [
cv.CityJSONLayer(data=data, format="cityjsonseq")
]
view.update()
view
import cityview as cv
view = cv.MapView(theme="dark")
with open("./packages/three-cityjson/public/sample/daiba_sta.city.jsonl", "r") as f:
data = f.read()
view.layers = [
cv.CityJSONLayer(data=data, format="cityjsonseq")
]
view.update()
view
import cityview as cv
view = cv.VirtualView(theme="light")
with open("./packages/three-cityjson/public/sample/daiba_sta.city.jsonl", "r") as f:
data = f.read()
def handler(change):
print(change["new"])
view.observe(handler, names="click")
view.layers = [
cv.CityJSONLayer(data=data, format="cityjsonseq")
]
view.update()
view
- Online viewer
MIT