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
WCS Server - Map Level Projection Object Potential Bug #4079
Conversation
Author: loisg00 Another user had an issue with projection within the WCS server. It shares some similarities with mine and could have the same source. I'm adding a link to this discussion and I will invite him to add more information here himself : http://lists.osgeo.org/pipermail/mapserver-users/2011-November/070872.html |
@sdlime @dmorissette mapcache and the native mapserver tile mode both use a function called |
Yes, the possible side-effect is that projections are not required unless you plan on doing reprojections, and if you don't then the unnecessary projection blocks in all layers trigger extra tests based on msProjectionsDiffer() to decide if reprojection should kick in. While these tests should in theory not be too expensive, that would have to be verified. Plus loading init=epsg:xxxx codes for every layer is not exactly free, so that will add up as well for cases where no reprojection is needed. Also, users of MapScript may have empty layers defined in their mapfile for various purposes, or may do some stuff based on the assumption that layers do not have a projection set, and unexpectedly setting the PROJECTION in those layers may possibly lead to unexpected side-effects that they may have to work around. |
@dmorissette OK I see your point. I will check that the WCS code does something similar than what the wms code does in https://github.com/mapserver/mapserver/blob/rel-6-2-0-beta2/mapwms.c#L1374 |
cc @Schpidi : any objections concerning this patch ? |
Nope, seems reasonable and I guess you successfully run the wcs tests in msautotest ;) |
Just seen you added this in the 6.2 branch. Shouldn't this be fixed in the 6.0 too? |
msautoWHAT ??? :) On Mon, Aug 20, 2012 at 3:25 PM, Stephan Meissl notifications@github.comwrote:
|
@Schpidi The autotests seem fine (failures don't seem related to this change at all). I'll let you merge the pull request if you're ok, I'll backport to 6-0 once you're done. |
Finally found some time to look at this and run the tests. Seems fine. |
WCS Server - Map Level Projection Object Potential Bug
WCS Server - Map Level Projection Object Potential Bug
Reporter: loisg00
Date: 2011/11/14 - 15:27
Trac URL: http://trac.osgeo.org/mapserver/ticket/4079
Hi,
The issue was first described here : http://lists.osgeo.org/pipermail/mapserver-users/2011-November/070672.html
You might want to take a look if you are in need of any information I could have missed. I'll try to cover everything here, of course.
OS : Windows XP
MapServer version : 6.0.1, prebuilt from MS4W.
Faulty MapFile :
http://lists.osgeo.org/pipermail/mapserver-users/attachments/20111104/78e5fa24/2011102811-0001.obj
Some GetCoverage requests along with their result :
http://localhost/cgi-bin/mapserv.exe?SERVICE=WCS&map=D:/Guillaume/ProjetCourantsGlaces/WCSproblem/2011102811.map&COVERAGE=thelayer&VERSION=1.0.0&REQUEST=GetCoverage&BBOX=-67.5,48.922499263758255,-64.6875,50.736455137010665&CRS=EPSG:4326&WIDTH=256&HEIGHT=256&FORMAT=GTiff
(with or without "&RESPONSE_CRS=EPSG:4326", the native projection)
Gives the following error :
msWCSGetCoverage(): WCS server error. Requested BBOX (-178.835708198757,2803.05273104522,179.552848002437,2906.98474680556) is outside requested coverage BBOX (-70,45,-55,52)
Notice how the Requested BBOX in the error doesn't make sense.
Adding "&RESPONSE_CRS=EPSG:900913" (or 3857) instead to the request should logically still give an error, because the BBOX itself isn't changed (it's the response_CRS, not the CRS...). Yet, it returns a geotiff. The file is all black (0 0 0), though :
http://lists.osgeo.org/pipermail/mapserver-users/attachments/20111104/78e5fa24/wcsoutput-0001.tif
My inability to create a correct GeoTiff output was the original issue. Rahkonen Jukka found the solution :
Adding a projection object to the layer level allowed me to get a good GeoTiff, similar to the one obtained with a WMS request (http://lists.osgeo.org/pipermail/mapserver-users/attachments/20111104/78e5fa24/wmsoutput-0001.tif).
PROJECTION
'init=epsg:4326'
END
However, this is an unexpected behaviour. The Map level projection object should be used when the layer is lacking one. I've been asked to create a ticket regarding the issue.
http://lists.osgeo.org/pipermail/mapserver-users/2011-November/070700.html
Although the original problem was about GeoTiff, it can probably be extended to other output formats.
The HDF5 source file can be found here :
http://lists.osgeo.org/pipermail/mapserver-users/attachments/20111104/78e5fa24/data-0001.obj
The problem may or may not be specific to this input format. I don't know how MapServer handles this.
Logs produced by MapServer for several requests seen in this ticket are here :
http://lists.osgeo.org/pipermail/mapserver-users/attachments/20111104/78e5fa24/mapserv_errors-0001.obj
I tried to fit in as much information as I could. I'm sorry if I forgot something or haven't respected conventions I was unaware of. You can contact me if you need to at loiselle.guillaume@gmail.com .
Guillaume Loiselle
P.S. The "New Ticket" link found in the sentence "To enter an issue use the New Ticket button." from http://trac.osgeo.org/mapserver/ redirects to http://trac.osgeo.org/mapserver/mapserver/newticket, which is wrong and gives this error :
Error: Not Found
No handler matched request to /mapserver/newticket
The correct URL is http://trac.osgeo.org/mapserver/newticket. Is there a metaticket system to create tickets on ticket issues? :p