-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[BUGFIX][Server] WMS compliance: stretched, distort, increase, decrease #3906
Conversation
7bf5ddc
to
6586bc5
Compare
Since this seems to be a tricky calculation I'd suggest adding unit tests to protect this logic. |
@nyalldawson, this commit comes from this discussion d44f1eb#commitcomment-20259007 |
b86cc73
to
48835dd
Compare
As the ms calculation uses a mixture of both ratios, I don't think it is 100% correct. |
@rldhont you read my mind, I've just built your branch ... :) |
@rldhont tested this PR with QGIS server and QGIS client and there is exactly the same problem we noticed in Lyon, in the attached image you can see the same layer (world shapefile EPSG:4326) rendered directly into QGIS (grey outline) and served through QGIS Server (the coloured polygons). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rldhont, I've tested master again without this PR and it seems to me the right behavior. This PR re-introduces the bug that we've seen in Lyon.
hi @elpaso, can you provide the URL to the data and the URL generated by QGIS desktop to reprodiuce the issue? |
@rldhont you can easily reproduce it:
then ...
I checked the QGIS Desktop created URLs and they seems correct: both the BBOX and Example URL generated by QGIS WMS provider (untiled): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why should we change the width and height, shouldn't they simply be unchanged?
@sbrunner the image has to be stretched by the server to be WMS 1.3.0 compliant |
I don't see that's scaled back here: https://github.com/rldhont/Quantum-GIS/blob/48835dd6f7fbc4a13fe1e598652cbffa7ab45380/src/server/qgswmsserver.cpp#L1496 |
48835dd
to
50ef9ee
Compare
if ( crs.compare( "CRS:84", Qt::CaseInsensitive ) == 0 ) | ||
{ | ||
crs = QString( "EPSG:4326" ); | ||
mapExtent.invert(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you have unwanted double invert? (with the line 1991)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no crs84 is an invertion of EPSG:4326.
This code has been copy from the copyMapSettings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, thanks :-)
@elpaso and @mhugent the code has been updated to take account of axis invertion. So with a world countries data we have: And I have tested with the OGC CITE ratio-aspect request and we have: Are you agree with the code now ? |
The commit d44f1eb seems to break some WMS 1.3.0 client and WMS compliancy.
The commit d44f1eb has been written to fix an issue with QGIS WMS Client and to render image like other WMS Server.
This commit has been written to fix issue introduce by d44f1eb.
It is based on MapServer code: