Hi, All,
WebMapServiceImageryProvider uses EPSG:4326 to get image. But my raster data is under EPSG:3785. They seem the same thing, or I misunderstanding the two. So, my question is, shall I send my 3785 raster image for 4326 request? Or, what utility should i use to do the convertion?
Regards,
Shawn
Hi Shawn,
EPSG:3785 is what Cesium calls the Web Mercator projection. It’s definitely different from EPSG:4326, so if you serve 3785 images as if they’re 4326, the imagery alignment on the globe will shift as you zoom in. The good news is, Cesium natively supports the Web Mercator projection. The bad news is, WebMapServiceImageryProvider does not. The reason it doesn’t is because WMS servers are usually capable of performing this transformation themselves, so there’s no reason for Cesium to do it on the client side.
So help me understand: are you implementing your own WMS server, or at least trying to serve your tiles using the WMS server without the benefit of a real WMS server? If so, can you use something other than WMS? The Tile Map Service (TMS) and OpenStreetMap protocols are much simpler and can be configured within Cesium to use either the GeographicTilingScheme or the WebMercatorTilingScheme. I’d use them if possible.
If you must use WMS, then I’d suggest changing Cesium’s WebMapServiceImageryProvider class to support specifying the tiling scheme. It should be a straightforward change, and I’d welcome a pull request.
Kevin