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

chore(engine): update GeometryLodFilter to allow min_lod of 0 and enhance workflow examples #646

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion engine/runtime/action-processor/src/geometry/lod_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl ProcessorFactory for GeometryLodFilterFactory {
.into());
};
let max_lod = params.max_lod.unwrap_or(4);
let min_lod = params.min_lod.unwrap_or(1);
let min_lod = params.min_lod.unwrap_or(0);
if max_lod < min_lod {
return Err(GeometryProcessorError::GeometryLodFilterFactory(
"max_lod must be greater than or equal to min_lod".to_string(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,20 @@ graphs:
env.get("__value").cityGmlPath

- id: 612d546f-e4e4-4bbe-9f4e-d47313347f00
name: LodSplitterWithDm
type: subGraph
subGraphId: 7e98d856-1438-4148-bdcb-91747ef2e405
name: GeometryLodFilterByLod0-2
type: action
action: GeometryLodFilter
with:
maxLod: 2
minLod: 0

- id: 94dded5d-ae4d-42ad-a4d1-a362882a9e09
name: GeometryLodFilterByLod3
type: action
action: GeometryLodFilter
with:
exceptSplit: true
maxLod: 3
minLod: 0

- id: 0274320c-6aad-4ea2-b4cc-b2d7fe7071d8
name: AttributeMapperLod0-2Tran
Expand Down Expand Up @@ -120,7 +129,7 @@ graphs:
minZoom: 8
maxZoom: 16
output: |
file::join_path(env.get("outputPath"), "tran_lod" + env.get("__value").lod)
file::join_path(env.get("outputPath"), "tran_lod2")

- id: 6e5ed9fc-006e-4dbe-8699-4663dba795cb
name: AttributeMapperLod3Tran
Expand All @@ -147,7 +156,7 @@ graphs:
reprojectorType: jgd2011ToWgs84

- id: 41d69f1f-2a4d-4bc1-a5d0-17569827357c
name: cesium3DTilesWriter
name: Cesium3DTilesWriter
type: action
action: Cesium3DTilesWriter
with:
Expand Down Expand Up @@ -181,27 +190,22 @@ graphs:
- id: a7b057c4-f3c7-474c-83b2-1abc0bc557ba
from: 612d546f-e4e4-4bbe-9f4e-d47313347f00
to: 0274320c-6aad-4ea2-b4cc-b2d7fe7071d8
fromPort: lod0
toPort: default
- id: f13f3dd7-5737-427a-9bbc-65ece32652f2
from: 612d546f-e4e4-4bbe-9f4e-d47313347f00
to: 0274320c-6aad-4ea2-b4cc-b2d7fe7071d8
fromPort: lod1
toPort: default
- id: 32596b7d-4074-408c-a3b8-cd1cf0f0b307
from: 612d546f-e4e4-4bbe-9f4e-d47313347f00
to: 0274320c-6aad-4ea2-b4cc-b2d7fe7071d8
fromPort: lod2
fromPort: default
toPort: default
- id: 51ed356b-73b0-4f25-8cfd-3195a47ae989
from: 0274320c-6aad-4ea2-b4cc-b2d7fe7071d8
to: bf626e6d-9559-4722-b266-af137e56498f
fromPort: default
toPort: default
- id: 0b88b15c-dc68-48b5-bced-c4d7f90ab3c4
from: ded2e272-e05c-4918-86b3-aa9f763da6e6
to: 94dded5d-ae4d-42ad-a4d1-a362882a9e09
fromPort: default
toPort: default
- id: d4c1c8a9-00a6-49c1-9735-db62a736932b
from: 612d546f-e4e4-4bbe-9f4e-d47313347f00
from: 94dded5d-ae4d-42ad-a4d1-a362882a9e09
to: 6e5ed9fc-006e-4dbe-8699-4663dba795cb
fromPort: lod3
fromPort: default
toPort: default
- id: c4955c3b-bc28-4623-994a-a4b4cc0bed9b
from: 6e5ed9fc-006e-4dbe-8699-4663dba795cb
Expand Down
6 changes: 3 additions & 3 deletions engine/tools/mvt/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
const viewer = new Cesium.Viewer("cesiumContainer", {});

const yourMvt = new CesiumMVTImageryProvider.CesiumMVTImageryProvider({
urlTemplate: "/dist/{z}/{x}/{y}.pbf",
layerName: "luse",
urlTemplate: "/tiles/{z}/{x}/{y}.pbf",
layerName: "Road",
style: feature => {
return {
fillStyle: "white" // 白で塗りつぶす
Expand All @@ -47,7 +47,7 @@
viewer.scene.imageryLayers.addImageryProvider(yourMvt);

viewer.camera.setView({
destination: Cesium.Cartesian3.fromDegrees(139.81163232,35.82450314, 5000.0)
destination: Cesium.Cartesian3.fromDegrees(139.7936871,35.7125129, 5000.0)
});
</script>
</body>
Expand Down