[mapserver-users] Strategies for creating Google Map tiles...

John Jameson jjmapping at gmail.com
Thu Dec 4 10:07:50 EST 2008


I'm progressing well with my MapServer learning and experimentation.  I'm now
at the point where I have to start doing some real development but have some
"strategy" questions and could use advice from you all with much more
experience.  I'm not looking for code, script, or anything other than basic
strategy and ideas at solving my problem.  Figuring out the code part of
this will be the fun part!  Of course, any existing examples would be
wonderful to peek at.

I have a variety of raster and shapefile maps in different scales.  They
overlap each other and do not fit well in a seamless way (like many DRG topo
maps do).  The borders aren't rectangular.  Some of the maps are not in a
north up direction either.

I need to make tiles compatible with Google maps out of this mess.  The
outcome needs to be the typical pyramid of tiles where each detailed zoom
level has 4x the number of tiles than the level above.

Here are the things I've considered strategy-wise:

1. Combine everything into a single map file and then let MapServer serve
the tiles (through TileCache).  I can then go through the area of data I'm
interested in and collect the tiles and save them.  The super advantage of
this strategy is that I can test it by having it serve the tiles live. 
It'll be slower than having them pre-computed and that isn't ultimately
acceptable because I'll need offline use of the tiles and won't have
MapServer.  Still, it allows for great testing before the tile collection
begins.  The disadvantage is that I fear I'll run out of space with hundreds
of raster maps and another hundred shapefiles (each with 20-30 layers).  I
fear I'd have to re-gen MapServer with all of the layers needed.  Back on
the plus side, it seems like MapServer will "quilt" the maps together
nicely.  This strategy has me scared about resource size and speed needed.

2. Turn each map file into its own set of tiles (perhaps a few zoom layers
on both sides of the natural scale of the map).  Tiles would need to be
transparent where they cut their border on the map.  Then write a separate
script (ImageMagick) to go through and merge together tiles from the same
locations to "quilt" them.  For each zoom level, the lower resolution tiles
would be drawn with the higher resolution tiles drawn over.  That would
create a final quilted tile for areas of shared location.

3. Create shapefiles of just the borders of each map.  Use MapServer to
serve up the tiles of those simple rectangles.  The result would show which
maps are actually in the individual tiles.  Then those maps could be tiled
and quilted (ImageMagick).  The trick is in figuring out a way to encode the
rectangles to point back to the original map data file of the source.  The
advantage of this is that it would seem to take advantage of the quilting
aspecs of MapServer but allow for quicker performance.  The disadvantage is
that it would be more complex.


Are there other strategies that I'm missing?  Certainly with so much map
data being overlaid on Google Maps, these issues must have been dealt with
before.  What else am I forgetting about?

Thanks for this forum.  I've learned a tremendous amount from all of the
postings.  Now I have to stop learning and start working!

-- 
View this message in context: http://n2.nabble.com/Strategies-for-creating-Google-Map-tiles...-tp1613836p1613836.html
Sent from the Mapserver - User mailing list archive at Nabble.com.



More information about the mapserver-users mailing list