Ticket #2038 (closed defect: worksforme)

Opened 6 years ago

Last modified 3 years ago

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) (diff)

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

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

Change History

Changed 6 years ago by akrherz@…

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

Changed 6 years ago by fwarmerdam

  • cc steve.lime@… added
  • owner changed from sdlime to fwarmerdam
I'll try and take this one.

Changed 6 years ago by akrherz@…

small example for non-square fun

Changed 3 years ago by warmerdam

  • status changed from new to closed
  • resolution set to worksforme
  • description modified (diff)

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.