Ticket #2369 (closed defect: fixed)
Make default raster image path relative to tileindex file
| Reported by: | sdlime | Owned by: | pramsey |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.2 release |
| Component: | MapServer C Library | Version: | unspecified |
| Severity: | normal | Keywords: | |
| Cc: | dfuhry@…, dmorissette, jmckenna |
Description
--- From mapserver-dev ---
The attached path makes the path of image files for a TILEINDEX layer relative to the directory of the TILEINDEX shapefile, if the map's SHAPEPATH is not set.
I prefer having the path fall back to the TILEINDEX file's directory rather than the mapfile directory, because the tile index file and the raster imagery tend to be colocated, on a large volume separate from the mapfile. Maybe there are some good reasons for relative-to-mapfile behavior too, but I couldn't think of any. Behavior is unchanged if the SHAPEPATH is set.
The patch also removes an unused variable from msDrawRaster() and prints out the full (instead of relative) path of a raster file if that file could not be opened. Printing the full path helped me with error resolution; some might consider it less secure to be displaying it though.
-Dave Fuhry

