Hi Tim,<br>
<br>
There is looping through directories going on--in mapserver/mapscript.
Mapserver is looking at the tileindex and going through the areas in
it, each area pointing to a directory. Looking at the tileindex
shapefile in ogrinfo:<br>
<br>
OGRFeature(tgrindex):509<br>
LOCATION (String) = ../48/48501/<br>
POLYGON ((-103.064678999999998 32.958548,-103.064678999999998
33.388489,-102.594234 33.388489,-102.594234
32.958548,-103.064678999999998 32.958548))<br>
<br>
OGRFeature(tgrindex):510<br>
LOCATION (String) = ../48/48503/<br>
POLYGON ((-98.954097000000004 32.9523,-98.954097000000004
33.397534,-98.420435999999995 33.397534,-98.420435999999995
32.9523,-98.954097000000004 32.9523))<br>
<br>
OGRFeature(tgrindex):511<br>
LOCATION (String) = ../48/48505/<br>
POLYGON ((-99.453794000000002
26.571681999999999,-99.453794000000002
27.319154999999999,-98.954176000000004
27.319154999999999,-98.954176000000004
26.571681999999999,-99.453794000000002 26.571681999999999))<br>
<br>
When the layer defs are passed to the mapscript object it always tries
to open all layers in each directory referenced by the tile
index--mapserver fails to load those layer shapefiles that do not
exists in the tiger data and gives a warning. Unfortunately, the
script (or mapscript itself rather) returns nothing from
$oMap->draw(); (~line 237) and so the script dies when it tries to
call a method on a non-object. From the errors reported from
precache2 when I run it, it seems clear that not finding a certain
layer file in a dir is killing it:<br><br>
Warning: [MapServer Error]: msSHPOpenFile(): (/var/www/http/tl-map/../48/48391//water)<br>
in /var/www/http/tl-map/precache2.php on line 237<br>
<br>
Warning: [MapServer Error]: msSHPOpenFile(): (/home/data/../48/48391//water)<br>
in /var/www/http/tl-map/precache2.php on line 237<br>
<br>
Warning: [MapServer Error]: msSHPOpenFile(): (/var/www/http/tl-map/../48/48389//water)<br>
in /var/www/http/tl-map/precache2.php on line 237<br>
<br>
Warning: [MapServer Error]: msSHPOpenFile(): (/home/data/../48/48389//water)<br>
in /var/www/http/tl-map/precache2.php on line 237<br>
...<br>
<br>
jesse<br>
<br><div><span class="gmail_quote">On 5/16/06, <b class="gmail_sendername">Tim Schaub</b> <<a href="mailto:tim@commenspace.org">tim@commenspace.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<div>
<div align="left" dir="ltr"><span><font face="Trebuchet MS" size="2">Hey Jesse-</font></span></div>
<div align="left" dir="ltr"><span><font face="Trebuchet MS" size="2"></font></span> </div>
<div align="left" dir="ltr"><span><font face="Trebuchet MS" size="2">I don't fully understand your setup. If mapserver can render your
mapfile, then precache2 should work on it as well. There is no looping
through directories going on, so I can't make an exception for directories that
don't have certain data. It could be that your mapfile has an error that
you don't know about because you can't tell that the images aren't being
returned in ka-Map.</font></span></div>
<div align="left" dir="ltr"><span><font face="Trebuchet MS" size="2"></font></span> </div>
<div align="left" dir="ltr"><span><font face="Trebuchet MS" size="2">If you send your mapfile (just to me) - I'll see if I can help figure out
what is going on.</font></span></div>
<div align="left" dir="ltr"><span><font face="Trebuchet MS" size="2"></font></span> </div>
<div align="left" dir="ltr"><span><font face="Trebuchet MS" size="2">Tim</font></span></div>
<div align="left" dir="ltr"><span></span> </div><br>
<blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-left: 5px; margin-left: 5px; margin-right: 0px;" dir="ltr">
<div align="left" dir="ltr" lang="en-us">
<hr>
<font face="Tahoma" size="2"><b>From:</b> <a href="mailto:ka-map-users-bounces@lists.maptools.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">ka-map-users-bounces@lists.maptools.org</a>
[mailto:<a href="mailto:ka-map-users-bounces@lists.maptools.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">ka-map-users-bounces@lists.maptools.org</a>] <b>On Behalf Of </b>Jesse
Lovelace<br><b>Sent:</b> Monday, May 15, 2006 8:21 AM<br><b>To:</b>
<a href="mailto:ka-Map-users@lists.maptools.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">ka-Map-users@lists.maptools.org</a><br><b>Subject:</b> [ka-Map-users] precache2
problem<br></font><br></div></blockquote></div><div><span class="q">
<div></div><pre>Precache2 seems to have a problem when processing some directories for data:<br><br>Warning: [MapServer Error]: msSHPOpenFile():<br>(/var/www/http/tiger2005fe/37/37053//place)<br> in /var/www/http/tl-map/precache2.php on line 238
<br><br><br>Warning: [MapServer Error]: msSHPOpenFile():<br>(/home/data/tiger2005fe/37/37053//place)<br> in /var/www/http/tl-map/precache2.php on line 238<br><br>Fatal error: Call to a member function on a non-object in<br>
/var/www/http/tl-map/precache2.php on line 239<br><br><br>The 37/37053 directory doesn't have a 'place' shapefile--I think precache should<br>continue gracefully if it comes to a directory that is missing a layer--it could
<br>be that not all areas have all layers.<br><br><br>This should be an easy fix, but I'm not sure what all is going on in precache2 so I hesitate to make to many changes.<br><br>Many thanks.<br><br>jesse<br></pre></span>
</div><div></div>
</div><br>_______________________________________________<br>ka-Map-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:ka-Map-users@lists.maptools.org">ka-Map-users@lists.maptools.org
</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.maptools.org/mailman/listinfo/ka-map-users" target="_blank">http://lists.maptools.org/mailman/listinfo/ka-map-users</a><br><br><br></blockquote>
</div><br><br clear="all"><br>-- <br>Jesse Lovelace<br>NCSU Mathematics & Computer Science