Hello!
Is it possible to calculate a more accurate footprint of a Scene Layer than the extent given? It needs to be done on the server side either using ArcGIS API for Python or any Rest Service or GP Tool. Also any ideas of a concept to calculate the footprint and writing our own GP Tool for that would be nice to have, if there is nothing available out-of-the-box.
Thank you!
BR,
Bernd
Solved! Go to Solution.
If someone is interested — I came up with a method to derive a precise ground footprint polygon for a Scene Layer / Building Scene Layer entirely on the client, without any server-side queries or a separate footprint feature layer. Afterwards the footprint can be used for automatically clip away the footprint of a BuildingSceneLayer from extruded OSM 3D Tiles or from Google 3D Tiles as IntegratedMesh3DTilesLayer.
The trick: once the SDK has streamed a scene layer into a SceneView, it caches the decoded I3S tile geometry in an IndexedDB called esri-scenelayer-cache (same origin/tab, so window.indexedDB gives you read access). Each cache entry keyed by the tile URL (ending in @ECEF) contains:
From there the approach is:
One important gotcha: the cached ECEF frame is spherical, not WGS84-ellipsoidal — the generator treats geodetic lon/lat as spherical angles. Using an ellipsoidal conversion introduces a noticeable latitude error, so the conversion is deliberately spherical.
I use the resulting polygon to clip the integrated-mesh / 3D-tiles basemap around each loaded building so the model isn't buried. Full standalone module below — no references to my own system, so feel free to adapt it. Caveat: it relies on undocumented SDK internals (the cache DB name, its single object store, and the entry shapes), so it may break between SDK versions (I'm on 4.34).
If someone is interested — I came up with a method to derive a precise ground footprint polygon for a Scene Layer / Building Scene Layer entirely on the client, without any server-side queries or a separate footprint feature layer. Afterwards the footprint can be used for automatically clip away the footprint of a BuildingSceneLayer from extruded OSM 3D Tiles or from Google 3D Tiles as IntegratedMesh3DTilesLayer.
The trick: once the SDK has streamed a scene layer into a SceneView, it caches the decoded I3S tile geometry in an IndexedDB called esri-scenelayer-cache (same origin/tab, so window.indexedDB gives you read access). Each cache entry keyed by the tile URL (ending in @ECEF) contains:
From there the approach is:
One important gotcha: the cached ECEF frame is spherical, not WGS84-ellipsoidal — the generator treats geodetic lon/lat as spherical angles. Using an ellipsoidal conversion introduces a noticeable latitude error, so the conversion is deliberately spherical.
I use the resulting polygon to clip the integrated-mesh / 3D-tiles basemap around each loaded building so the model isn't buried. Full standalone module below — no references to my own system, so feel free to adapt it. Caveat: it relies on undocumented SDK internals (the cache DB name, its single object store, and the entry shapes), so it may break between SDK versions (I'm on 4.34).