<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-15">
<META content="MSHTML 6.00.2900.3354" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Microsoft Sans Serif">
<DIV>Paul,</DIV>
<DIV> </DIV>
<DIV>This patch does fix the error for me.<BR></DIV>
<DIV>Jim</DIV>
<DIV> </DIV>
<DIV>BTW: we use relative paths because it provides a lot more flexibility in being able to change the server config and/or move our apps to another server without having to update hundreds of map files.</DIV>
<DIV><BR>>>> On 6/27/2008 at 4:33 PM, David Fuhry <dfuhry@acm.org> wrote:<BR></DIV>
<DIV style="PADDING-LEFT: 7px; MARGIN: 0px 0px 0px 15px; BORDER-LEFT: #050505 1px solid; BACKGROUND-COLOR: #f3f3f3">Paul,<BR><BR> I'm under the impression the discussion is about raster tileindexes, <BR>not shapefile tileindexes. I'm more ignorant about the latter, and its <BR>patch was riskier and more invasive, so I have no problem with whatever <BR>compromises have to be made with the shapefile tileindexes patch <BR>(including not merging for 5.2).<BR><BR> With raster tileindexes however, I think the changes are realistic; <BR>I attached a two-line patch to <BR><A href="http://trac.osgeo.org/mapserver/ticket/2369">http://trac.osgeo.org/mapserver/ticket/2369</A> (also attached here).<BR><BR> Jim, does the attached patch fix the Image handling error for you?<BR><BR>Thanks,<BR><BR>Dave<BR><BR><BR>Paul Ramsey wrote:<BR>> David, I agree, it's the relative shapepath case that is failing.<BR>> <BR>> You may not like this but I replicated the old logic and just added<BR>> yours to the top. I think that your idea that in general things are<BR>> either absolute paths or work is correct, so this ugly code should not<BR>> be too slow. And I like that it actually falls back: if the file is<BR>> missing in one place, it'll check another.<BR>> <BR>> Patch attached.<BR>> <BR>> On Fri, Jun 27, 2008 at 1:53 PM, David Fuhry <dfuhry@acm.org> wrote:<BR>>> Paul,<BR>>><BR>>> For an absolute shapepath, the shapepath clobbers tiFileAbsDir (the<BR>>> absolute path of the tileindex file's directory), and I think things work<BR>>> correctly.<BR>>><BR>>> But the relative shapepath case is not handled correctly. I'm thinking<BR>>> that the correct logic needs a branch, and should look like this:<BR>>><BR>>> if(layer->tileindex) {<BR>>> if (map->shapepath)<BR>>> {<BR>>> msBuildPath(szPath, map->shapepath, filename);<BR>>> } else {<BR>>> msBuildPath(tiAbsFilePath, map->mappath, layer->tileindex); /*<BR>>> absolute path to tileindex file */<BR>>> tiAbsDirPath = msGetPath(tiAbsFilePath); /* tileindex file's<BR>>> directory */<BR>>> msBuildPath(szPath, tiAbsDirPath, filename);<BR>>> free(tiAbsDirPath);<BR>>> }<BR>>> } else {<BR>>> msBuildPath3(szPath, map->mappath, map->shapepath, filename);<BR>>> }<BR>>><BR>>><BR>>> Is the lower else clause still ok?<BR>>><BR>>> Thanks,<BR>>><BR>>> Dave<BR>>><BR>>> Paul Ramsey wrote:<BR>>>> This doesn't seem right to me:<BR>>>><BR>>>> msBuildPath3(szPath, tiFileAbsDir, layer->map->shapepath, filename);<BR>>>><BR>>>> If shapepath isn't set, you get the right answer, but if it *is* set,<BR>>>> you get something very odd indeed.<BR>>>><BR>>>> P.<BR>>>><BR>>>> On Fri, Jun 27, 2008 at 12:50 PM, Jeff McKenna<BR>>>> <jmckenna@gatewaygeomatics.com> wrote:<BR>>>>> Jim,<BR>>>>><BR>>>>> There was indeed a change in beta3 regarding TILEINDEX layers, but it<BR>>>>> should<BR>>>>> not affect any existing indexes with SHAPEPATH set, which is your case.<BR>>>>> I<BR>>>>> can duplicate your error with a file structure exactly like yours: with<BR>>>>> beta2 no error, with beta3 i get your exact errors. Would you mind<BR>>>>> reporting this in the associated ticket?<BR>>>>> <A href="http://trac.osgeo.org/mapserver/ticket/2369">http://trac.osgeo.org/mapserver/ticket/2369</A> Also please include what OS<BR>>>>> you<BR>>>>> are testing on (I am testing on Windows).<BR>>>>><BR>>>>> Good find!<BR>>>>><BR>>>>><BR>>>>><BR>>>>> ---<BR>>>>> Jeff McKenna<BR>>>>> FOSS4G Consulting and Training Services<BR>>>>> <A href="http://www.gatewaygeomatics.com/">http://www.gatewaygeomatics.com/</A><BR>>>>><BR>>>>><BR>>>>><BR>>>>><BR>>>>><BR>>>>> On 27-Jun-08, at 11:54 AM, Jim Klassen wrote:<BR>>>>><BR>>>>>> All,<BR>>>>>><BR>>>>>> Beta3 seems to have broken my tiled raster layers. These layers all<BR>>>>>> worked<BR>>>>>> fine up through 5.2.0-beta2. Is there something I need to change in my<BR>>>>>> config?<BR>>>>>><BR>>>>>> The error I get is "msDrawMap(): Image handling error. Failed to draw<BR>>>>>> layer named 'L10'. msDrawRaster(): Unable to access file.<BR>>>>>> L10/512000_0-1024000_512000.jpg using full path<BR>>>>>> L10/512000_0-1024000_512000.jpg"<BR>>>>>><BR>>>>>> In map I have SHAPEPATH set to "PWTS/2006_00"<BR>>>>>> In the layers I have TILEINDEX "L10/TILEINDEX"<BR>>>>>> In the tileindex I have Locations such as<BR>>>>>> "L10/512000_0-1024000_512000.jpg"<BR>>>>>><BR>>>>>> The file system layout is:<BR>>>>>><BR>>>>>> ./AERIAL_2006/ramsey_2006.map<BR>>>>>> ./AERIAL_2006/PWTS/2006_00/L10/TILEINDEX.{shp,shx,dbf}<BR>>>>>> ./AERIAL_2006/PWTS/2006_00/L10/*.jpg<BR>>>>>><BR>>>>>> Jim Klassen<BR>>>>>> City of St. Paul<BR>>>>>><BR>>>>>>>>> "Steve Lime" <Steve.Lime@dnr.state.mn.us> 06/26/08 10:00 PM >>><BR>>>>>> - mapshape.c: Applied patch to make the location of tiled data relative<BR>>>>>> to<BR>>>>>> the<BR>>>>>> tileindex directory if SHAPEPATH is not set. (#2369)<BR>>>>>><BR>>>>>><BR>>>>>> _______________________________________________<BR>>>>>> mapserver-dev mailing list<BR>>>>>> mapserver-dev@lists.osgeo.org<BR>>>>>> <A href="http://lists.osgeo.org/mailman/listinfo/mapserver">http://lists.osgeo.org/mailman/listinfo/mapserver</A>-dev<BR>>>>> _______________________________________________<BR>>>>> mapserver-dev mailing list<BR>>>>> mapserver-dev@lists.osgeo.org<BR>>>>> <A href="http://lists.osgeo.org/mailman/listinfo/mapserver">http://lists.osgeo.org/mailman/listinfo/mapserver</A>-dev<BR>>>>><BR>>>> _______________________________________________<BR>>>> mapserver-dev mailing list<BR>>>> mapserver-dev@lists.osgeo.org<BR>>>> <A href="http://lists.osgeo.org/mailman/listinfo/mapserver">http://lists.osgeo.org/mailman/listinfo/mapserver</A>-dev<BR></DIV></BODY></HTML>