Tiger Line Data

Stephen Woodbridge woodbri at SWOODBRIDGE.COM
Sun Feb 27 19:15:23 PST 2005


Herman Teo wrote:
> Hi Stephen,
>
> Thanks for the tip. I'm now scouring through the previous list
> messages for 'tile' commands. There is not much of that going on. Is
> there a sample code where I might be able to learn how I should
> proceed with shape tiling and a sniff of a LAYER...END code in the
> map file. Also, is any of these tiger line on sale somewhere so that
> I might not have to download 300k files as you said. Thanks a lot.

Herman,

There are two different tiling commands:

1) tile4ms which is distributed as part of the mapserver source and is
documented on the mapserver utilities page of the website. It is used to
tiling shapefiles. The easiest way to use it is to putt all the data you
want to tile in a directory tree located in your SHAPEPATH directory.
Then on Linux do something like:

find data_dir -name "*.shp" > data_dir.in
tile4ms data_dir.in data-tile
shptree data-tile
cat data_dir.in | xargs -n 1 shptree

Then in your mapfile do something like:

LAYER
   NAME "my tile data"
   TYPE whatever
   TILEINDEX data-tile
   ...
   CLASS
     ...
   END
END

One of the caveats of this is that all the shapefiles in the index MUST
have the SAME attributes and order of attributes and they must be all
the same type.

2) For tiling images you should use gdaltindex which is distributed as
part of the gdal libraries and tools. The concept is similar to the
above and I documented it on the wiki at
http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?RasterHOWTO
in the Bathymetry and Topography HowTo link and others have added a lot
more info there.



More information about the MapServer-users mailing list