TileIndexes and paths - a proposal

Brent Fraser bfraser at GEOANALYTIC.COM
Fri Oct 22 12:21:32 EDT 2004


To tileindex users,

With the addition of a new LAYER type (TYPE TILEINDEX) by Steve Lime, and
the recent posts regarding TILEIDEX paths, I thought I would revisit path
construction of tiles and make a proposal.

Here are the map file variables that we might want to affect the path
construction to a tile (any others?):

1. [Location of the map file]
2. SHAPEPATH
3. LAYER (tileindex):DATA (minus the tileindex filename)
4. LAYER (tiles):DATA
5. LAYER:TILEITEM contents

Proposed rules:
=============
1. The path to a tile is constructed using the values of the above variables
in order:

[Location of the map file]  /  SHAPEPATH  /  LAYER (tileindex):DATA  /
LAYER (tiles):DATA  /  LAYER:TILEITEM contents

2. An absolute path in any of the variables would cause those to the left of
that variable in Rule 1 not to be used in the path construction.


Some examples:
=============
A.  The Steve Woodbridge senario:
-----------------------------------------
1. [Location of the map file]  = /u/mapfiles/
2. SHAPEPATH = "/u/data"
3. LAYER (tileIndex) : DATA =  "tiger-maps/roads-tile"
4. LAYER (tiles): DATA = ""
5. LAYER: TILEITEM contents = "./data/01/001/roads.shp"

would result in a tile path of
     /u/data/tiger-maps/./data/01/001/roads.shp


B.  Everything in one directory (yikes!):
-----------------------------------------
1. [Location of the map file]  = C:\temp
2. SHAPEPATH = ""
3. LAYER (tileIndex) : DATA =  "my-tiles"  (the file is
C:\temp\my-tiles.shp)
4. LAYER (tiles): DATA = ""
5. LAYER: TILEITEM contents = "map1.shp"

would result in a tile path of
    C:\temp\map1.shp


Some Questions:
==============
Any desired data configuration where this would not work?

Do we attempt to maintain backwards compatibility with the current method of
path construction?   Is anyone happy with it?.


Thanks to all...

Brent Fraser
GeoAnalytic Inc.
Tel:(403) 213-2700
bfraser at geoanalytic.com
www.geoanalytic.com



More information about the mapserver-users mailing list