Opened 17 years ago
Closed 14 years ago
#2038 closed defect (worksforme)
MS_NONSQUARE doesn't always work — at Version 3
Reported by: | Owned by: | fwarmerdam | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | MapServer CGI | Version: | 4.8 |
Severity: | normal | Keywords: | |
Cc: |
Description (last modified by )
I've been trying to get MS_NONSQUARE to work this evening and have encountered some strange behaviour. This may be related to bug http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=998 1. I set CONFIG MS_NONSQUARE YES in the mapfile 2. I set an EXTENT which is not square with the image size selected 3. Make map with PHP -> square pixels Make map with shp2imp -> non-square Make map with CGI mapserv and no BBOX specified -> square Make map with CGI and BBOX specified -> non-square I would like non-square for all of the above :) thanks! }}}[]
Change History (4)
comment:3 by , 14 years ago
Description: | modified (diff) |
---|---|
Resolution: | → worksforme |
Status: | new → closed |
I find shp2img works fine as reported.
I have found that WMS GetMap with a BBOX works fine as reported.
I find that mapserver no longer allows GetMap requests without a BBOX so that error cannot be simply reproduced. I tried disabling the BBOX requirement in mapwms.c and I did reproduce the problem.
It is caused by a call to msAdjustExtent() in msWMSLoadGetMapParams() which modifies the map extent to force square parameters. I am not clear why it is called at this point, and I do not know what to do about it. But it does not seem relavent to make changes since the missing-BBOX case no longer occurs with WMS GetMap.
I also tried to reproduce the problem with php and python scripts unsuccessfully. For instance the following php script produces the expected non-square pixel result:
<?php //phpinfo(); dl("php_mapscript.so"); $map = ms_newMapObj("test.map"); // print $map->numlayers; $img = $map->draw(); $img->saveImage("out.png",$map); ?>
At this point I don't think there are any obvious relavent issues with MapServer trunk.