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

Unnecessary reprojection in drawing when processing WMS 1.3.0 GetMap request with CRS=EPSG:4326 #6467

Open
qianxiaoming opened this issue Feb 1, 2022 · 5 comments

Comments

@qianxiaoming
Copy link

qianxiaoming commented Feb 1, 2022

When processing WMS 1.3.0 GetMap request, the CRS and extent in parameters will be assigned to mapObj. WMS 1.3.0 states that “EPSG:4326” refers to WGS 84 geographic latitude, then longitude. That is, in this CRS the x axis corresponds to latitude, and the y axis to longitude. This would cause there are 2 arguments in projectionObj of drawing map:

  • init=epsg:4326
  • +epsgaxis=ne

At this time, even the CRS of the layer is EPSG:4326, but since it has only one argument, it is judged to be different with the CRS of drawing map. So there are unnecessary reprojections in msLayerIsVisible and drawing each shape object.

Steps to reproduce the problem.

mapserv -nh "QUERY_STRING=SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=18.1632471876408,73.4510046356224,53.5319431522177,134.976797646506&CRS=EPSG:4326&WIDTH=600&HEIGHT=345&LAYERS=country&FORMAT=image/png&TRANSPARENT=TRUE&MAP=/path/to/map/file.map"
The map file has no real impact on this issue.

Operating system

Ubunut 20.04.3 64bit

MapServer version and installation method

The 7.6.4 version built from source.

@jratike80
Copy link

What this test should show me?

@qianxiaoming
Copy link
Author

The result of test is correct, this issue is about performance of map drawing. Because of additional argument(“+epsgaxis=ne“) in map’s projection, every shape to be drawn has to be reprojected even though the map and layers in it are both EPSG:4326.

@jratike80
Copy link

jratike80 commented Feb 2, 2022

Could you show metrics about the severity of the issue? Perhaps it could be tested by making same requests with WMS 1.1.1 and 1.3.0. Naturally with the required changes to BBOX order and CRS/SRS. I am not sure if Mapserver 1.3.0 supports &CRS=CRS:84, that would probably be the most direct way to test.

@qianxiaoming
Copy link
Author

qianxiaoming commented Mar 7, 2022

@jratike80
I test MapServer 7.6.4 build on Ubuntu 20.04 with gcc 9.3.0 in EC2 instance(x86_64) on AWS. The test data is about 400000 points stored in PostgreSQL 12.4. Here is the result for WMS 1.1.0 and WMS 1.3.0 GetMap request with same parameters:
WMS1.1.0 GetMap execution time:

  • 3.134s
  • 3.115s
  • 3.091s
  • 3.105s

WMS1.3.0 GetMap execution time:

  • 3.718s
  • 3.702s
  • 3.698s
  • 3.667s

All points are drawed with simple circle symbol. Hope this test result will be helpful.

@sdlime
Copy link
Member

sdlime commented Sep 14, 2022

I thought this was resolved (at least in main), can someone confirm?

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

3 participants