openlayers / ol-cesium

OpenLayers - Cesium integration
http://openlayers.org/ol-cesium/
BSD 2-Clause "Simplified" License
1k stars 326 forks source link

Is there support for multiple coordinate systems other than EPSG:4326 and EPSG:4327 #1123

Closed XiaofengZeng closed 8 months ago

XiaofengZeng commented 11 months ago

These days I attempted to enable OLCesium to support ESPG:4547 ArcGIS map service tile loading. It can load the display in OpenLayers, but fails to synchronize with OLCesium and throws an error.

I included the judgment of EPSG:4547 coordinate system to OLImageryProvider and utilized the Epsg4547TilingScheme class inherited from WebMercatorTilingScheme. The project and unproject methods were overwritten (not sure if the conversion was correct) and the rectangle property was reset in the instance, but it still didn't load.

I am wondering if there is a similar solution for the related coordinate conversion to load the tile service.

Thanks.

gberaudo commented 9 months ago

Hi @XiaofengZeng , have you looked at https://github.com/openlayers/ol-cesium/pull/581 ? Cesium only supports 2 projections: EPSG:4326 and EPSG:3857. This PR was relying on OL to do the reprojection work and return a tile directly usabled by Cesium. It is a long time ago, I rembember the PR mostly worked but there were some issues in some corner case and it never got merged. I would like raster reprojection automatically working in OL-Cesium and I think that PR was a good startd. If I get some time I will try to work again on that.

XiaofengZeng commented 9 months ago

@gberaudo Thank you for your response. I faced a similar situation where half of the sphere was black, but I decided to stop investigating further. Please temporarily close this issuse, and I will revisit it when I have the time.