Fix #11258 :For clipping/masking 3D tiles and terrain removed ClippingPlaneCollection and introduced ClippingPolygonCollection#11352
Merged
allyoucanmap merged 5 commits intogeosolutions-it:masterfrom Aug 28, 2025
Conversation
…eCollection and introduced ClippingPolygonCollection
1 task
Member
Author
|
@allyoucanmap As discussed, I have changed the logic of clipping terrain with |
allyoucanmap
requested changes
Aug 21, 2025
| import isNaN from 'lodash/isNaN'; | ||
| import { getProxyUrl } from "../../../../utils/ProxyUtils"; | ||
| import { getStyleParser } from '../../../../utils/VectorStyleUtils'; | ||
| import { polygonToClippingPlanes } from '../../../../utils/cesium/PrimitivesUtils'; |
Contributor
There was a problem hiding this comment.
Please check if polygonToClippingPlanes is not used anymore, if that the case remove it, all the dependent private function not used anymore and related unit tests.
Comment on lines
+66
to
+78
| const polygons = []; | ||
| const geojson_ = options.clippingPolygon; | ||
| const coordinates_ = geojson_?.geometry?.coordinates?.[0] || []; // Outer ring for the polygon | ||
| if (coordinates_.length > 0) { | ||
| const positions = coordinates_.map((coord) => { | ||
| const [lng, lat, height = 0] = coord; | ||
| return Cesium.Cartesian3.fromDegrees(lng, lat, height); | ||
| }); | ||
| const clippingPolygon = new Cesium.ClippingPolygon({ | ||
| positions: positions | ||
| }); | ||
| polygons.push(clippingPolygon); | ||
| } |
Contributor
There was a problem hiding this comment.
is it possoble to create a utils function to centralize common logic between 3D Tiles and Globe (eg. polygons computation from the GeoJSON)
…pletely the usage of clippingPlaneCollection and related dependencies
…x_tileclipping3d_11258
allyoucanmap
approved these changes
Aug 28, 2025
Contributor
|
@ElenaGallo please test this improvement on dev, thanks |
dsuren1
added a commit
to dsuren1/MapStore2
that referenced
this pull request
Sep 9, 2025
…tinerary * commit 'ea419127df12f794a56f234f5660632511df7484': Update README.md Proj4 upgrade and include support for "Grid Based Datum Adjustments" geosolutions-it#11423 (geosolutions-it#11424) Bom versions for maven-war-plugin in all POMs.xml (geosolutions-it#11413) Fix geosolutions-it#11419 fixed group translation files (geosolutions-it#11420) Update geoserver.md (geosolutions-it#11399) Bump org.apache.tomcat:tomcat-coyote from 9.0.105 to 9.0.108 in /binary (geosolutions-it#11384) Update on the Swedish translation file for MapStore (geosolutions-it#11412) Fix geosolutions-it#11258 :For clipping/masking 3D tiles and terrain removed ClippingPlaneCollection and introduced ClippingPolygonCollection (geosolutions-it#11352) Fix : geosolutions-it#11400 Added quickFilters also when exporting data from TableWidget (geosolutions-it#11401) Fix geosolutions-it#11404 Problem with user permissions still involving the "Save As" (geosolutions-it#11408) Fix geosolutions-it#11406 Pending changes prompt shows up after save as (geosolutions-it#11407) Fix geosolutions-it#11374 Improve the Street Smart plugin view for 3D maps visualization (geosolutions-it#11375) Update i18n showEmptyMessageGFI (geosolutions-it#11392) geosolutions-it#11369: Enhance non hyperlink query field to have spacing (geosolutions-it#11370) Bump org.apache.tomcat:tomcat-util from 9.0.105 to 9.0.107 in /binary (geosolutions-it#11305) chore: Remove element-closest dependency (geosolutions-it#11251) Fix the widget support for the WFS layer with no geom (geosolutions-it#11379) Support of widget in map even when layer have no geometry and fix time dependencies for the widget (geosolutions-it#11377) Performace Lag when there is a layer with very large geomerty geosolutions-it#11358 (geosolutions-it#11359) skip click on layer should return intersected features test on Cesium tests (geosolutions-it#11365)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Since the update to Cesium 1.131.0 (latest stable version), support for clipping 3D Tiles using polygons has been introduced.
This significantly reduces the effort compared to our previous approach, where we manually created clipping planes from positions and had to carefully align them with the 3D Tiles by updating their transformation.
Internally, ClippingPolygon also generates clipping planes, but this implementation is more efficient and streamlined.
ClippingPlaneCollectionand addedClippingPolygonCollectionfor clipping/masking 3D tiles.ClippingPlaneCollectionand addedClippingPolygonCollectionfor clipping/masking terrain.Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x", remove the others)
Issue
What is the current behavior?
#11258
What is the new behavior?
Clip

Clip Inverse

Breaking change
Does this PR introduce a breaking change? (check one with "x", remove the other)
Other useful information