Hi all,

I am struggling with a slight offset in a new application we are developing which is a flash application (global risk mapping) and which will take in overlaid WMS layers served by MapServer in Winkel Triple. I have reprojected the base data (shapes, rasters) so that MapServer does not have to reproject on the fly, and performance seems to be good.

However, I am having a problem when zooming in and new WMS request are being made. The more you zoom in, the more offset becomes visible between the base (flash) layer (generated by exporting an ai file of the same shapefile) and the overlaid MapServer png. Perhaps this has to do with the spatial extent of my data and the width/height ratio (SIZE)?! I used ogrinfo shape.shp -al -summary to generate the extent of my shape, which I then used as the extent of the map file. For the SIZE parameters I used the width I need for my png and calculated the height based on the width/height ratio in the above mentioned extent. Is this the right way to do so?! Or am I missing something here?

The image looks fine, except when zooming in and new requests are made using an adjusted bounding box (dimensions divided by a factor), the offset becomes slightly bigger with each zoom factor, as if a slight skewing is taking place.

Unlike the case in unprojected (lat/long) data, I cannot change these parameters much at all (about 2 pixels) before MapServer gives me an empty image. Is there a way in which MapServer will more flexibly allow me to change the range of these parameters? I also noticed that WMS requests give me bitmaps with dimensions consisting of whole integers. A rounding off takes place. This could result in some potential inaccuracies along borders too of course.

Some of these problems wouldn't occur if we were just using a MapServer based mapping application, however we do need to combine and line it up with the flash layer for other purposes.

I will now play around with the limited range in which I can change these parameters, but maybe I am missing a more obvious thing?!

Any help/advice on this issue would be greatly appreciated! I have included part of the map file below.

Regards,
Mark de Blois
Maplecroft

#
#Start of map file, created by AmeiN! for ArcGis 13/09/2006, 15:20:54
#

MAP
NAME 'MaplecroftWMS'
STATUS ON

PROJECTION
 "proj=wintri"
 "ellps=WGS84"
 "lat_1=45"
END

SIZE 697.8 401.31
EXTENT -16707480.310734 -10018754.171395 16920780.652974 9320947.177797
UNITS meters

LAYER
NAME 'Countries_WT'
DATA './admin/maplecroft_countries_winkel_45'
STATUS off
TYPE Polygon
TOLERANCE 7
TOLERANCEUNITS pixels

METADATA
 WMS_TITLE 'Countries_WT'
 WMS_FEATURE_INFO_MIME_TYPE 'text/html'
END #METADATA

PROJECTION
 "proj=wintri"
 "ellps=WGS84"
 "lat_1=45"
END

CLASS
 NAME 'Countries'

 STYLE
  #COLOR 255 255 212
  OUTLINECOLOR 255 0 0
 END #STYLE
END #CLASS

TEMPLATE "winkel_query.html"

END #LAYER

Reply via email to