Skip to content

WMTS layer with custom EPSG projection fails in Cesium #771

@bampakoa

Description

@bampakoa

Hi,

I am trying to render a WMTS layer from URL http://geoportal.cuzk.cz/WMTS_ORTOFOTO/WMTService.aspx using the projection EPSG:5221 (here are the specs of the projection). The layer is correctly rendered in OpenLayers but that is not the same for Cesium. However, network requests seem to fire and respond correctly. I can actually see the tiles in the responses of the network tab.

I have put in place an example of what I am trying to achieve here:

  • I have dumbed the capabilities file locally so that I can pass tileMatrixSet and extent properties in the source layer.
  • I am using proj4 to define the EPSG projection and register it with OpenLayers.
  • I also apply a transformation between 4326 and 3857 projections.

After some debugging I came to the conclusion that the tileLayerToImageryLayer function returns null because the 5221 projection fails to pass the isCesiumProjection function here.
Alternatively, I tried to add an if statement so that I can check whether the source is of type WMTS, before the check here and create the provider inside my statement. In this scenario, Cesium reported logs in the console that it could not find tile coordinates.

I have searched through the repository about similar problems and I think that Cesium cannot handle custom projections but I am not 100% sure. I would appreciate it if you could help me.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions