-
Notifications
You must be signed in to change notification settings - Fork 62
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
Make a first experiment with 3d tiles #569
base: main
Are you sure you want to change the base?
Conversation
SonarCloud Quality Gate failed. |
@javagl I had a good time working with JglTF, even if this is a very raw and basic example. I see that you have been actively contributing to 3d-tiles as well. Thank you so much for all of your hard work and your contributions to the 3d-tiles community. I hope we'll be able to improve this example in the future to make a better use of all the amazing features of these specifications. |
Thanks for the heads-up. I'll definitely have a closer look at the implementation (and the broader context of baremaps) here. |
e987d6e
to
d934b19
Compare
SonarCloud Quality Gate failed. 1 Bug No Coverage information |
e4522b0
to
41506a0
Compare
SonarCloud Quality Gate failed. 1 Bug No Coverage information Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
baremaps-server/src/main/java/org/apache/baremaps/server/TdTilesResources.java
Fixed
Show fixed
Hide fixed
String buildingLevels = resultSet.getString(4); | ||
float finalHeight = 10; | ||
if (buildingHeight != null) { | ||
finalHeight = Float.parseFloat(buildingHeight.replaceAll("[^0-9]", "")); |
Check notice
Code scanning / CodeQL
Missing catch of NumberFormatException Note
if (buildingHeight != null) { | ||
finalHeight = Float.parseFloat(buildingHeight.replaceAll("[^0-9]", "")); | ||
} else if (height != null) { | ||
finalHeight = Float.parseFloat(height.replaceAll("[^0-9]", "")); |
Check notice
Code scanning / CodeQL
Missing catch of NumberFormatException Note
} else if (height != null) { | ||
finalHeight = Float.parseFloat(height.replaceAll("[^0-9]", "")); | ||
} else if (buildingLevels != null) { | ||
finalHeight = Float.parseFloat(buildingLevels.replaceAll("[^0-9]", "")) * 3; |
Check notice
Code scanning / CodeQL
Missing catch of NumberFormatException Note
baremaps-server/src/main/java/org/apache/baremaps/server/TdTilesResources.java
Fixed
Show fixed
Hide fixed
baremaps-server/src/main/java/org/apache/baremaps/server/TdTilesResources.java
Fixed
Show fixed
Hide fixed
7e6528a
to
0dd52e9
Compare
41506a0
to
a3b5729
Compare
} | ||
|
||
@Get("regex:^/subtrees/(?<level>[0-9]+).(?<x>[0-9]+).(?<y>[0-9]+).json") | ||
public HttpResponse getSubtree(@Param("level") int level, @Param("x") int x, @Param("y") int y) { |
Check notice
Code scanning / CodeQL
Useless parameter Note
} | ||
|
||
@Get("regex:^/subtrees/(?<level>[0-9]+).(?<x>[0-9]+).(?<y>[0-9]+).json") | ||
public HttpResponse getSubtree(@Param("level") int level, @Param("x") int x, @Param("y") int y) { |
Check notice
Code scanning / CodeQL
Useless parameter Note
Quality Gate failedFailed conditions See analysis details on SonarCloud Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
3dbe1b7
to
7502fb1
Compare
As described in #568. We should start to experiment generating 3d tiles from OSM data to apply extrusion on buildings and render them in Cesium.
I have made a first experiment with the most simple setup:
tileset.json
which defines an implicit tiling in a quad tree.On the JAX-RS server, I serve a simple
index.html
file that uses Cesium to render the 3d tiles.Here is a preview:
Screencast.from.05-01-23.14_50_02.mp4
Any input or improvement is welcome. The goal of this work is to make experimentations to discover the 3d tiles and GLTF specifications. I have learnt a lot of interesting things by working on this example and there is so much more that could be done.
One thing that would be interesting to explore is to use the
ADD
refinement type instead of theREPLACE
refinement type. See here. This way we could additively load new buildings instead of overwriting them at each tile level.Other possibilities include:
There are endless possibilities and optimisations. If anyone is interested, I would be happy to discuss it.