<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2627" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV dir=ltr align=left><SPAN class=140465012-27042005><FONT face=Arial
color=#0000ff size=2>Jeff -</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=140465012-27042005><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=140465012-27042005><FONT face=Arial
color=#0000ff size=2>No, actually, those tools don't work that way at all
<g>.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=140465012-27042005><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=140465012-27042005><FONT face=Arial
color=#0000ff size=2>tile4ms creates a new, separate tile index shapefile.
It does not combine shapefiles into one shapefile. Each input shapefile
has its bounding box retrieved, and a rectangular polygon is created in the new
tile index shapefile. If you started with N shapefiles you now
have N+1 shapefiles - all the originals and the index file.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=140465012-27042005></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=140465012-27042005><FONT face=Arial
color=#0000ff size=2>Let's say each original shapefile contained data for a
particular country. If you wanted to create a map showing every
country, you would have to create a few hundred separate layers then group them
together. By creating a tile index layer, you can take a large number (or
small number) of separate shapefiles and treat them AS IF they were one single
large shapefile - but they're not.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=140465012-27042005></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=140465012-27042005><FONT face=Arial
color=#0000ff size=2>This is the primary benefit of a tile index. IF your
data in the separate files are relatively constrained to rectangular regions,
then the tile index also will offer you a performance
improvement. It's like a new top-level index for your
data. If you're looking at a large-scale map of Europe, the tile index
file will immediately discard any of those input
country files whose rectangular bounding boxes do not overlap
the output map area. Most of the input country files will never be
opened - only the few files that might possibly contribute to the output map are
opened and read. For large data sets this improves
performance.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=140465012-27042005></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=140465012-27042005><FONT face=Arial
color=#0000ff size=2>Steve's shp2tile utility helps to create such an
appropriate set of input files, by taking a single large input shapefile and
chopping it up into rectangular pieces.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=140465012-27042005></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=140465012-27042005><FONT face=Arial
color=#0000ff size=2>shptree creates a spatial quadtree index for a shapefile
that makes it quicker to locate objects inside that file. This is
virtually always a good idea, and easy to do.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=140465012-27042005></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=140465012-27042005><FONT face=Arial
color=#0000ff size=2>You may have to tune your data set sizes to get the right
balance. The goal is to use the tile index file to quickly
discard data that cannot possibly be needed for an output map
request. If you end up rendering all the data, or opening all the
files, it will do you no good at all.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=140465012-27042005></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=140465012-27042005><FONT face=Arial
color=#0000ff size=2> - Ed</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=140465012-27042005></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=140465012-27042005><FONT face=Arial
color=#0000ff size=2>Ed McNierney</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=140465012-27042005><FONT face=Arial
color=#0000ff size=2>TopoZone.com</FONT> </SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> UMN MapServer Users List
[mailto:MAPSERVER-USERS@LISTS.UMN.EDU] <B>On Behalf Of </B>Jeff
Portwine<BR><B>Sent:</B> Wednesday, April 27, 2005 8:30 AM<BR><B>To:</B>
MAPSERVER-USERS@LISTS.UMN.EDU<BR><B>Subject:</B> [UMN_MAPSERVER-USERS] different
tiling methods<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Hi Everybody,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I have a general question for my own education, it
doesn't directly pertain to anything I'm working on right now.
I was just wondering if anybody could explain to me the difference in different
ways of tiling map images? In my current project, I had
several large layers such as road layers and water layers that I tiled in order
to make them faster and more resource friendly... The method I used
was:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>-tile4ms <data.txt> <tile
name> </FONT></DIV>
<DIV><FONT face=Arial size=2>(where data.txt is a list of all the shapefiles
being included in the tiling, since tiger data comes in about a zillion
files)</FONT></DIV>
<DIV><FONT face=Arial size=2>-shptree <tile name></FONT></DIV>
<DIV><FONT face=Arial size=2>-cat <data.txt> | xargs -n 1
shptree</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The way I understand it, this combines all the
pieces into one shapefile, tiles them, and spatially indexes them... is
that correct? </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>In a recent post I also saw a pointer to Steve
Woodbridge's shp2tile utility which it seems does much the same thing... the
main difference being from the sounds of it that it doesn't put a lot of
shapefiles together, but rather splits a single large shapefile into tiles and
then indexes them. How is this different from the first method, and
how does it affect resources and rendering speed? Or is the only
real difference the one I noted where you are sticking multiple shapefiles
together one way and only using one original shapefile the other
way?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Are there other methods of tiling that behave
differently or that you might use for different situations?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks everybody,</FONT></DIV>
<DIV><FONT face=Arial size=2>Jeff</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>