[mapserver-users] mismatches tiling images produced by mapserver

Ed McNierney ed at topozone.com
Thu Oct 25 20:53:40 EDT 2001


Brian -

Sorry - now I see the defect in the image.  I think you are having
trouble because the extents of your requested images do not have the
same aspect ratio as the images themselves.

That is, you ask for images that have a width of 0.30412 degrees and a
height of 0.22572 degrees (wid=0.30412&ht=0.22572) or a width/height
ratio of 1.34733, while your tiles are 821x771 pixels or a ratio of
1.06485.

These ratios don't seem right for a Mercator projection, but I'm being
lazy and not doing the math.  Are you indeed using a Mercator
projection, or are you using a "geographic" projection (i.e. not
projecting lat/lon at all)?

Sorry about the earlier reference to tile4ms - that's obviously not
relevant here.  I guess I'm being lazy AND not paying attention <g>.

	- Ed

Ed McNierney
Chief Mapmaker
TopoZone.com


-----Original Message-----
From: Brian Hill [mailto:bhill at nextbus.com]
Sent: Thursday, October 25, 2001 8:09 PM
To: mapserver-users at lists.gis.umn.edu
Subject: [mapserver-users] mismatches tiling images produced by
mapserver


I am still wringing the bugs out of a new 3.3.012 installation, and am 
hoping someone on the list will have experience with this one.

Our application needs to tile images produced by the mapserver.  I.e., 
if an image is produced with extent,

(lon - delta_lon / 2, lat), (lon + delta_lon / 2, lat),

then it should fit very neatly to the left of an image with extent,

(lon + delta_lon / 2, lat), (lon + 3 * delta_lon / 2, lat).

Here is an example of four tiles which should fit together:

http://skip.nextbus.com/tile-skip.html

The .html file hits a perl wrapper for the map server four times.  As 
you can see by scrolling to the center of the image, the four panes do 
not fit together neatly.  The projection is Mercator, so tiles bounded 
by lines of constant latitude and constant longitude should fit.

If there are rounding errors or some other problem down in the C 
libraries that is partly or completely understood and could explain 
this, please let me know.

Wading directly into the sources is a bit daunting, especially given 
that any of three layers could be involved (perl/mapscript, 
mapserver-3.3.012 or proj-4.4.4), but it is critical for our application

that the tiling come out neatly, so with some pointers, I am motivated 
and might be able to track it down.  It is possible the bug is in the 
perl file that makes all the mapscript calls, but I think it is lower 
down, and therefore that fixing it might be of general interest.

Brian Hill
Sr. Software Engineer
NextBus Information Systems




More information about the mapserver-users mailing list