Opened 20 years ago

Closed 20 years ago

Last modified 20 years ago

#728 closed defect (fixed)

Non-square pixel support via WMS

Reported by: warmerdam Owned by: warmerdam
Priority: high Milestone:
Component: WMS Server Version: 4.3
Severity: normal Keywords:
Cc: nsavard@…

Description

MapServer WMS does not support returning images with non-square pixels.
If the aspect ratio of the BBOX is different than the aspect ratio of
the raster requested then the BBOX is grown to ensure a matching aspect
ratio. 

This violates the requirements of the WMS specification.

Attachments (1)

non_square_pixel.tgz (20.9 KB ) - added by nsavard@… 20 years ago.
non_square_pixel.tgz-compressed tarbal with tileindex problem

Download all attachments as: .zip

Change History (10)

comment:1 by fwarmerdam, 20 years ago

NOTE: This echos DMSG Bug 2585.

I have committed preliminary support for non-square pixels for use in WMS
mode.  It is enabled by adding "CONFIG MS_NONSQUARE YES" in the main map
configuration section.  It has the following affect:

 o Avoid calling msAdjustExtent() in msDrawMap().
 o Set map->cellsize to be the average of the x and y cellsize.
 o Turns on use of geotrasnform (sets map->gt.need_geotransform to TRUE),
   but only if the x and y pixelsize differ.

So, it suffers from all the side-effects of my existing rotation hackery,
plus the scale may be inaccurate.

I anticipate adding a new keyword to the mapfile to control this ability
at some point in the future ... suggestions are welcome.  I am using the
CONFIG keyword for now mainly so we can test the capability before we have
hashed out all details.

So, anyone who wants to have a WMS that can response to non-square pixel
requests, grab the latest 4.3 from CVS and try it out.

Note, there is also a test for this logic in msautotest/gdal/nonsquare.map. 

comment:2 by fwarmerdam, 20 years ago

Status: newassigned
Also note: for non-square support to work valid PROJECTION definitions
are required on all layers, and the map. 

I would add that while the bug has existed for some time, the fix is only 
in 4.3 since it depends on the new rotation code.  It cannot be practically
back ported to 4.2. 

Code changes done ... pending testing. 


comment:3 by dmorissette, 20 years ago

Cc: mapserver-bugs@… added

comment:4 by fwarmerdam, 20 years ago

Resolution: fixed
Status: assignedclosed
Bug fixed ... closing bug.

comment:5 by nsavard@…, 20 years ago

Cc: nsavard@… added

comment:6 by nsavard@…, 20 years ago

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

comment:7 by nsavard@…, 20 years ago

Resolution: fixed
Status: closedreopened
I'm echoing information found on DMSG bugzilla.

(See 7.2.3.8 article in the OGC WMS specification.)


When raster uses a tileindex the image is not stretched if the
image width/height aspect ratio is different from the BBOX aspect ratio.  I will
attached a tarball file of the data I'm using.

by nsavard@…, 20 years ago

Attachment: non_square_pixel.tgz added

non_square_pixel.tgz-compressed tarbal with tileindex problem

comment:8 by dmorissette, 20 years ago

Resolution: fixed
Status: reopenedclosed
Norm, please create a new bug. The initial issue was the support of non-square
pixels and it has been done. I think this specific instance where it doesn't
work should be seen as a new bug (with a ref to this one if you like)... if we
don't do that then bugs become so long that they are not manageable.

comment:9 by nsavard@…, 20 years ago

Verified on 4.3.
Note: See TracTickets for help on using tickets.