[mapserver-dev] MapServer 5.2 Beta 3 Available

Jim Klassen Jim.Klassen at ci.stpaul.mn.us
Mon Jun 30 12:08:39 EDT 2008


Paul,
 
This patch does fix the error for me.
Jim
 
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.

>>> On 6/27/2008 at 4:33 PM, David Fuhry <dfuhry at acm.org> wrote:
Paul,

    I'm under the impression the discussion is about raster tileindexes, 
not shapefile tileindexes.  I'm more ignorant about the latter, and its 
patch was riskier and more invasive, so I have no problem with whatever 
compromises have to be made with the shapefile tileindexes patch 
(including not merging for 5.2).

    With raster tileindexes however, I think the changes are realistic; 
I attached a two-line patch to 
http://trac.osgeo.org/mapserver/ticket/2369 (also attached here).

     Jim, does the attached patch fix the Image handling error for you?

Thanks,

Dave


Paul Ramsey wrote:
> David, I agree, it's the relative shapepath case that is failing.
> 
> You may not like this but I replicated the old logic and just added
> yours to the top. I think that your idea that in general things are
> either absolute paths or work is correct, so this ugly code should not
> be too slow. And I like that it actually falls back: if the file is
> missing in one place, it'll check another.
> 
> Patch attached.
> 
> On Fri, Jun 27, 2008 at 1:53 PM, David Fuhry <dfuhry at acm.org> wrote:
>> Paul,
>>
>>   For an absolute shapepath, the shapepath clobbers tiFileAbsDir (the
>> absolute path of the tileindex file's directory), and I think things work
>> correctly.
>>
>>   But the relative shapepath case is not handled correctly.  I'm thinking
>> that the correct logic needs a branch, and should look like this:
>>
>>    if(layer->tileindex) {
>>      if (map->shapepath)
>>      {
>>        msBuildPath(szPath, map->shapepath, filename);
>>      } else {
>>        msBuildPath(tiAbsFilePath, map->mappath, layer->tileindex); /*
>> absolute path to tileindex file */
>>        tiAbsDirPath = msGetPath(tiAbsFilePath); /* tileindex file's
>> directory */
>>        msBuildPath(szPath, tiAbsDirPath, filename);
>>        free(tiAbsDirPath);
>>      }
>>    } else {
>>      msBuildPath3(szPath, map->mappath, map->shapepath, filename);
>>    }
>>
>>
>>   Is the lower else clause still ok?
>>
>> Thanks,
>>
>> Dave
>>
>> Paul Ramsey wrote:
>>> This doesn't seem right to me:
>>>
>>>      msBuildPath3(szPath, tiFileAbsDir, layer->map->shapepath, filename);
>>>
>>> If shapepath isn't set, you get the right answer, but if it *is* set,
>>> you get something very odd indeed.
>>>
>>> P.
>>>
>>> On Fri, Jun 27, 2008 at 12:50 PM, Jeff McKenna
>>> <jmckenna at gatewaygeomatics.com> wrote:
>>>> Jim,
>>>>
>>>> There was indeed a change in beta3 regarding TILEINDEX layers, but it
>>>> should
>>>> not affect any existing indexes with SHAPEPATH set, which is your case.
>>>>  I
>>>> can duplicate your error with a file structure exactly like yours: with
>>>> beta2 no error, with beta3 i get your exact errors.  Would you mind
>>>> reporting this in the associated ticket?
>>>> http://trac.osgeo.org/mapserver/ticket/2369  Also please include what OS
>>>> you
>>>> are testing on (I am testing on Windows).
>>>>
>>>> Good find!
>>>>
>>>>
>>>>
>>>> ---
>>>> Jeff McKenna
>>>> FOSS4G Consulting and Training Services
>>>> http://www.gatewaygeomatics.com/ 
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On 27-Jun-08, at 11:54 AM, Jim Klassen wrote:
>>>>
>>>>> All,
>>>>>
>>>>> Beta3 seems to have broken my tiled raster layers. These layers all
>>>>> worked
>>>>> fine up through 5.2.0-beta2. Is there something I need to change in my
>>>>> config?
>>>>>
>>>>> The error I get is "msDrawMap(): Image handling error. Failed to draw
>>>>> layer named 'L10'. msDrawRaster(): Unable to access file.
>>>>> L10/512000_0-1024000_512000.jpg using full path
>>>>> L10/512000_0-1024000_512000.jpg"
>>>>>
>>>>> In map I have SHAPEPATH set to "PWTS/2006_00"
>>>>> In the layers I have TILEINDEX "L10/TILEINDEX"
>>>>> In the tileindex I have Locations such as
>>>>> "L10/512000_0-1024000_512000.jpg"
>>>>>
>>>>> The file system layout is:
>>>>>
>>>>> ./AERIAL_2006/ramsey_2006.map
>>>>> ./AERIAL_2006/PWTS/2006_00/L10/TILEINDEX.{shp,shx,dbf}
>>>>> ./AERIAL_2006/PWTS/2006_00/L10/*.jpg
>>>>>
>>>>> Jim Klassen
>>>>> City of St. Paul
>>>>>
>>>>>>>> "Steve Lime" <Steve.Lime at dnr.state.mn.us> 06/26/08 10:00 PM >>>
>>>>> - mapshape.c: Applied patch to make the location of tiled data relative
>>>>> to
>>>>> the
>>>>>  tileindex directory if SHAPEPATH is not set. (#2369)
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> mapserver-dev mailing list
>>>>> mapserver-dev at lists.osgeo.org 
>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-dev 
>>>> _______________________________________________
>>>> mapserver-dev mailing list
>>>> mapserver-dev at lists.osgeo.org 
>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-dev 
>>>>
>>> _______________________________________________
>>> mapserver-dev mailing list
>>> mapserver-dev at lists.osgeo.org 
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20080630/7189e408/attachment.html


More information about the mapserver-dev mailing list