Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WMS server with swapped North and East axis #19

Open
MFinkBK opened this issue Oct 20, 2023 · 4 comments
Open

WMS server with swapped North and East axis #19

MFinkBK opened this issue Oct 20, 2023 · 4 comments

Comments

@MFinkBK
Copy link

MFinkBK commented Oct 20, 2023

I'm currently trying to implement displaying single image WMS layers, and some GIS servers seem to have the X and Y axis swapped. This results in the WMS layer not displayed or displayed at the wrong location. I think the issue can be fixed with a modified bounding box where X and Y coordinates are swapped. One example WMS service: https://geodatenonline.bayern.de/geodatenonline/seiten/wms_fzw

I know that the official WMS specification says that bbox=minX,minY,maxX,maxY, and the WmsMapService class does this correctly. But would there be a possibility to also support those WMS services with swapped axes?

On a side note, in OpenLayers on the JavaScript side, I can support those WMS servers by creating a Projection from EPSG:4326, but with a different axisOrientation ("neu" instead of "enu").

@oliverheilig
Copy link
Member

I think you are referring the y-axis orientation in WMS 1.1 vs 1.3. There's also a handling in leaflet

@MFinkBK
Copy link
Author

MFinkBK commented Oct 24, 2023

Yes, and here's the handling in OpenLayers, although this one is more flexible:

https://github.com/openlayers/openlayers/blob/58fbe6f122cf9e77d11e9587a9f075a06645d412/src/ol/source/wms.js#L52-L56

Would it be possible to also implement something in the WmsLayer and WmsMapService, e.g. a SwapAxisOrientation boolean flag?

@oliverheilig
Copy link
Member

Sorry for the late response. I understand your point, but currently i have no time to work on the project. At the moment the only thing i could is to review a pull request. 😏

@MFinkBK
Copy link
Author

MFinkBK commented Nov 9, 2023

No problem, I'll prepare a pull request, but it may also take a while from my side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants