11.
tile4ms
Up one level
| Purpose: | Creates a tile index shapefile for use with MapServer's TILEINDEX feature. The program creates a shapefile of rectangles from extents of all the shapefiles listed in [metafile] (one shapefile name per line) and the associated DBF with the filename for each shape tile in a column called LOCATION as required by mapserv. |
|---|---|
| Description: | This utility creates a shapefile containing the MBR (minimum bounding rectangle) of all shapes in the files provided, which can then be used in the LAYER object’s TILEINDEX parameter of the mapfile. The new filed created with this command is used by MapServer to only load the files assocated with that extent (or tile). |
| Syntax: |
tile4ms <meta-file> <tile-file> [-tile-path-only]
<meta-file> INPUT file containing list of shapefile names
(complete paths 255 chars max, no extension)
<tile-file> OUTPUT shape file of extent rectangles and names
of tiles in <tile-file>.dbf
-tile-path-only Optional flag. If specified then only the path to the
shape files will be stored in the LOCATION field
instead of storing the full filename.
|
| Short Example: | create tileindex.shp for all tiles under the /path/to/data directory: <on Unix> cd /path/to/data find . -name "/*.shp" -print > metafile.txt tile4ms metafile.txt tileindex <on Windows> dir /b /s *.shp > metafile.txt tile4ms metafile.txt tileindex |
| Long Example: | This example uses TIGER Census data, where the data contains files divided up by county (in fact there are over 3200 counties, a very large dataset indeed). In this example we will show how to display all lakes for the state of Minnesota. (note that here we have already converted the TIGER data into shapefile format, but you could keep the data in TIGER format and use the ogrtindex utility instead) The TIGER Census data for Minnesota is made up of 87 different counties, each containing its own lakes file (‘wp.shp’).
|