Opened 19 years ago
Last modified 19 years ago
#1295 new enhancement
use native boundingbox instead of reprojecting latlonboundingbox
Reported by: | Owned by: | mapserverbugs | |
---|---|---|---|
Priority: | high | Milestone: | FUTURE |
Component: | WMS Client | Version: | 4.4 |
Severity: | minor | Keywords: | |
Cc: |
Description
Hi list, today we ran into a strange problem with Mapserver WMS client, when zooming into a Demis WMS layer, Mapserver WMS client did not want to render a layer, it did not even try to request the layer. Our application operates in EPSG:28992 (Netherlands). This is the important part of the WMS capabilities: <LatLonBoundingBox minx="-180" miny="-90" maxx="180" maxy="90"/> <BoundingBox SRS="EPSG:28992" minx="48443.3472125024" miny="404023.309341862" maxx="144763.347212502" maxy="484658.309341862"/> After a little digging in the code, I found something strange in mapwmslayer.c: // Reproject latlonboundingbox to the selected SRS for the layer and // check if it overlaps the bbox that we calculated for the request msProjectRect(&(map->latlon), &(lp->projection), &ext); So what it is gonna do, is reproject -180,-90,180,90 into the Dutch RD system, which is not valid outside of Netherlands :) This is strange since it could easily use the other BoundingBox specified in the WMS capabilities. It should only try to reproject if a WMS service would not provide that one in my opinion. But ofcourse one can argue that the Demis WMS service did not provide correct/precise values for the LatLonBoundingBox. This is the MAP file definition used (I needed to comment the wms_latlonboundingbox to get it to work, but ofcourse when dynamically added this metadata gets written all the time): LAYER CONNECTION "http://myserver/wms/wms.asp?wms=TOPOFOTO&" CONNECTIONTYPE WMS DEBUG ON DUMP TRUE METADATA "wms_srs" "EPSG:28992" #"wms_latlonboundingbox" "-180 -90 180 90" "wms_name" "Luchtfoto" "wms_formatlist" "image/png,image/jpeg,image/gif,image/bmp,image/swf" "wms_format" "image/png" "wms_boundingbox" "EPSG:28992 48443.34766 404023.3125 144763.34375 484658.3125" "wms_server_version" "1.1.1" "wms_title" "Luchtfoto" END NAME "demis-Luchtfoto" PROJECTION "init=epsg:28992" END SIZEUNITS PIXELS STATUS ON TEMPLATE "blank.html" TOLERANCE 0 TOLERANCEUNITS PIXELS TYPE RASTER UNITS METERS END
Change History (2)
Note:
See TracTickets
for help on using tickets.