Opened 14 years ago

Closed 14 years ago

#1438 closed defect (fixed)

WMS or Raster - Request image with size > 2047 pixel results map with poor image quality

Reported by: liuar Owned by: liuar
Priority: low Milestone:
Component: Rendering Service Version:
Severity: trivial Keywords:
Cc: brucedechant External ID: 1335217

Description

  1. connect to a WMS server (http://osm.wheregroup.com/cgi-bin/osm_basic.xml?)
  1. create a map and add the WMS layer
  1. in MapAgent web tier test, send a GetMapImage request in order to render the map, set map image size < 2047x2047
  1. in MapAgent web tier test, send a GetMapImage request in order to render the map, set map image size where either height or width > 2047pixel
  1. compare both maps

Result: image quality drops significantly if map image size width or height is higher than 2047 pixel

Expected: image quality should be same

Attachments (1)

patch.patch (9.0 KB ) - added by liuar 14 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 by liuar, 14 years ago

Following code in rendering service results this issue

RasterAdapter::Stylize()
{
  ...
  while (imgW >= 2048 || imgH >= 2048)
  {
      imgW >>= 1;
      imgH >>= 1;
  }
  ...
}

After the discussion with Walt, Zac and Bruce, it would be a better idea to make the max width and height be configurable via serverconfig.ini.

comment:2 by liuar, 14 years ago

Version: 2.1.0

by liuar, 14 years ago

Attachment: patch.patch added

comment:3 by brucedechant, 14 years ago

Cc: brucedechant added

Added Walt's comments:

Hi Arthur,

I looked at the patch, and it looks fine. The names for the new settings also sound reasonable to me. I only have minor / nitpicking comments:

  • In ServerRenderingService.cpp, move the newly added calls to pConf->GetIntValue to before the "there should be only one instance of this class" comment. Otherwise it looks like the comment applies to your new calls as well and it doesn't make sense.
  • Throughout your patch you declare height before width, e.g.:

# MaxRasterImageHeight The max height of raster image in pixels # 0 < Value <= 2147483647 # MaxRasterImageWidth The max width of raster image in pixels # 0 < Value <= 2147483647

I think most people like to see it the other way around - width then height - just like for point coordinates we prefer X then Y. So switch the order throughout your patch to width then height.

Thanks, Walt

comment:4 by liuar, 14 years ago

Hello Walt,

I updated the patch according to your comments. Thanks for your review.

Regards,
Arthur

comment:5 by liuar, 14 years ago

Resolution: fixed
Status: newclosed

Changeset [5135] by liuar

Note: See TracTickets for help on using tickets.