Opened 17 years ago

Closed 14 years ago

#2038 closed defect (worksforme)

MS_NONSQUARE doesn't always work

Reported by: akrherz@… Owned by: warmerdam
Priority: high Milestone:
Component: MapServer CGI Version: 4.8
Severity: normal Keywords:
Cc:

Description (last modified by warmerdam)

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!
}}}[]

Attachments (1)

data.zip (193.1 KB ) - added by akrherz@… 17 years ago.
small example for non-square fun

Download all attachments as: .zip

Change History (4)

comment:1 by akrherz@…, 17 years ago

*** Bug 2037 has been marked as a duplicate of this bug. ***

comment:2 by fwarmerdam, 17 years ago

Cc: steve.lime@… added
Owner: changed from sdlime to fwarmerdam
I'll try and take this one.

by akrherz@…, 17 years ago

Attachment: data.zip added

small example for non-square fun

comment:3 by warmerdam, 14 years ago

Description: modified (diff)
Resolution: worksforme
Status: newclosed

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.

Note: See TracTickets for help on using tickets.