Using Mapserver to generate google like tiles

Blammo bob.basques at CI.STPAUL.MN.US
Wed May 4 00:10:38 EDT 2005


Stephen Woodbridge wrote:

>Hi,
>
>Is anyone out there writing a Perl or PHP/mapscript utility to generate
>google like tiles using mapserver? What are the problems and issues you
>have run into? What is the status of your work?
>
>On the surface it seems pretty straight forward. Just iterate a bounding
>box for your tile size over your map extents and save the tiles based on
>row/column index as its name. Do this for each zoom scale you need.
>
>You need to deal with labels across tile boundaries.
>Should this be done using a projection? Which?
>Projections probably make this more complicated? How?
>
>
What about makin larger images and then, then use them as a raster
source for a new layer from behind MapServer tha would simply cut the
larger images into smaller ones.  You would need to discard the edge
tiles in this method.

Another route might be to make the image tiles gernerate larger than the
final version, possibly much larger to rid yourself of any label
anomolies at the edges.  You might only keep the center thrid of the
image for the tile for example.  I wonder how difficult it would be to
generate a large tile and then use this tile a a dynamic layer source
for clipping via the MAPserv engine.  Interesting Idea, hmmm. .. . .

>I was thinking that generating BIG image files and then generating tiles
>from the raster images might be better, because it will reduce the
>number of tile edge artifacts. I was think that Perl and the ImageMagic
>might work well for this?
>
>
Same here.  Although I think MapServer has all the required capabilities
to do the work for you.  You could generate all the images up front, and
then run a seperate script on them with MapServ to clip out the center
of the tile for edge matching the tiles.  I would still be interested in
a way to loop the larger tile back behind MapServer as a raster source
that could be clipped from via a MapServer CGI request.  Maybe all it
amounts to is replacing the source file and recalling Mapserver with the
same CGI,  hmm, this could be a really short PER script.

Just send the Source Extentst, the tile size and the Temp location . . .
.   I think I need to think about this a little . .

Dang you, now you got me going . . . .  :c)

bobb


>Any thoughts?
>
>-Steve W.
>
>
>
>



More information about the mapserver-users mailing list