From a6a533b84e943b3b06f16c09f06a58e25ec285ef Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Mon, 25 Sep 2017 23:30:21 -0700 Subject: [PATCH] Destroyed cesium integration (markdown) --- cesium-integration.md | 99 ------------------------------------------- 1 file changed, 99 deletions(-) delete mode 100644 cesium-integration.md diff --git a/cesium-integration.md b/cesium-integration.md deleted file mode 100644 index 7a9d397..0000000 --- a/cesium-integration.md +++ /dev/null @@ -1,99 +0,0 @@ -# Work packages -## Synchronize views -Idea: A vector on the 2D map displays the view point and the view direction: -* When moving the 3D view, it adjusts the 2D vector. -* When moving the 2D vector, the 3D view is adjusted. - -See example with OpenLayers 2 and Google Earth plugin: http://plan.epfl.ch/?lang=en, click in the right menu on 3d. 2D and 3D are snychronized. - -Question: How to get the same control feeling when manipulating the Ol3 view / the Cesium view? - -2D view can be in local projection or in Spherical Mercator. - -## Smooth transition between 2d and 3d -Idea: A la google map, share the bottom line and tilt. Forward and Backward. - -2D view can be in local projection or in Spherical Mercator. - -Some thoughts about the camera movement: https://gist.github.com/tonio/750dbc843ef95601c4be (might be outdated with the experience of the following POCs) - -Ongoing work: -* 1. POC: http://bl.ocks.org/tonio/raw/9759909/ -* To be developed further: http://bl.ocks.org/gberaudo/raw/51f050326d91d4e9c09a/1b55ad64a1f3de2dcba5673ecb52f976104a4592/# - -Remarks: -* all directions must be handled (not just NS and EW); -* all tilted situations must be handled (starting from an arbitrary tilted angle); -* always keep center of bottom line fixed in general, whole line for NS and EW. - -## Sync raster data sources -Idea: If a user adds a WMS/TMS/WMTS layer to ol3.js map it should also be added to the cesium globe. - -Known limitations: for now, ol3js and cesium don't support the same layer type: - * ol3js: WMTS, WMS, OSM, Bing - * cesiumjs: - * WMS (this is not a single request, but multiple WMS tiled requests, but no WMS-C, can't specify the grid) - * TMS, - * OSM, - * Bing, - * ESRI - -WMTS issue, see: https://github.com/AnalyticalGraphicsInc/cesium/issues/1890 - -## Share vector data -Idea: Bring vector data the user interact with in 2d into 3d. Allow same styling, labels and tooltip information. - -Cesium supported format: - * GeoJSON, OK! - * KML is an ongoing work: https://github.com/AnalyticalGraphicsInc/cesium/tree/kml & https://github.com/AnalyticalGraphicsInc/cesium/issues/873 - -Cesium examples: -* Styling: - * Points/Billboards: http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Billboards.html&label=Showcases - * Polylines: http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Polylines.html&label=Showcases - * Polygons: http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Polygons.html&label=Showcases - * Geometries: http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Geometry%20and%20Appearances.html&label=Showcases -* Labels: http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Labels.html&label=Showcases -* Tooltips? - -Notes - * Cesium places the 2D GeoJSON on the terrain according to following rules: - * Vertexes are precisely placed on the terrain - * Segments go straight (in 3D) between the 2 Vertexes - * Heights must be manually set to have a 3D GeoJSON. - -## Share edit -Idea: use cesium picking information to get the coordinates in 3D. and send them back to the traditionnal transactional webservice -http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Picking.html&label=Showcases - -## Share the same user interaction -Idea: same keyboard shortcut to rotate a map in ol3 as to rotate the globe in cesium. - -For now, we have: -* rotation: - * ol3js: `shift` - drag - * cesiumjs: `control` - drag - * Google Earth (2D+3D) webmap: `control` - drag - - -# Architecture -This integration is developed in an open source layer built ontop of ol3js as ol3js is not bound to a specific 3D globe. This layer should allow to provide a common and efficient way to have ol3js and cesium working closely together. - -As 2D view can be in local projection or in Spherical Mercator and Cesium is always in WGS84, it might be needed to hook a reprojection tool (proj4js) in order to reproject the vector data between the views. - -In case 2 different prohections, the backend should support the different projections. IE a WMS layer displayed in a local projection in 2D should also be avilable in WGS84 for integration in Cesium - -## Technical issues -* How to keep both ol3js and cesium synchronized? - * Apply vector transformations (diff from current state) each time a context change? - * Compute from scratch a new state from the new context? -* Save computing resources - * disable rendering of the underlying map or globe if it's hidden by the overlayed one - * still preserve context synchronization -* Smooth transition needs to know the elevation of the destination point of the camera - * cesium provides an asynchronous method, synchronous planned for August - * cesium provides in a dev branch a specific method. TDB: WHERE? -* Cesium camera entering the terrain - - > In regards to the camera falling through the terrain, you will want to upgrade to Cesium 1.0 in August, which will include Camera/terrain interaction (see https://github.com/AnalyticalGraphicsInc/cesium/pull/1817 and https://github.com/AnalyticalGraphicsInc/cesium/issues/1670). - \ No newline at end of file