<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2873" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face="Trebuchet MS" size=2><SPAN
class=759271617-16052006>Hi Jesse-</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face="Trebuchet MS" size=2><SPAN
class=759271617-16052006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face="Trebuchet MS" size=2><SPAN
class=759271617-16052006>It sounds like you could solve this problem by creating
a tileindex that only refers to existing data. I'm guessing you're
familiar with it, but you can use tile4ms to create a tileindex (one for each
layer) based on the data in your directory structure.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face="Trebuchet MS" size=2><SPAN
class=759271617-16052006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face="Trebuchet MS" size=2><SPAN
class=759271617-16052006>If I'm still misunderstanding your setup*, I'm sure you
can add in the appropriate condition to ignore mapscript
errors.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face="Trebuchet MS" size=2><SPAN
class=759271617-16052006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face="Trebuchet MS" size=2><SPAN
class=759271617-16052006>Tim</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face="Trebuchet MS" size=2><SPAN
class=759271617-16052006></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face="Trebuchet MS" size=2><SPAN
class=759271617-16052006>* My understanding is that you are using the same
tileindex for multiple layers/datasets - despite different coverage for each
dataset. I don't know whether this is common practice or
not.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face="Trebuchet MS" size=2><SPAN
class=759271617-16052006></SPAN></FONT> </DIV><BR>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> ka-map-users-bounces@lists.maptools.org
[mailto:ka-map-users-bounces@lists.maptools.org] <B>On Behalf Of </B>Jesse
Lovelace<BR><B>Sent:</B> Tuesday, May 16, 2006 10:30 AM<BR><B>To:</B>
ka-Map-users@lists.maptools.org<BR><B>Subject:</B> Re: [ka-Map-users]
precache2 problem<BR></FONT><BR></DIV>
<DIV></DIV>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="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV>
<DIV>
<DIV dir=ltr align=left><SPAN><FONT face="Trebuchet MS" size=2>Hey
Jesse-</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face="Trebuchet MS"
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><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 dir=ltr align=left><SPAN><FONT face="Trebuchet MS"
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><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 dir=ltr align=left><SPAN><FONT face="Trebuchet MS"
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT face="Trebuchet MS"
size=2>Tim</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN></SPAN> </DIV><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(0,0,0) 2px solid; MARGIN-RIGHT: 0px">
<DIV lang=en-us dir=ltr align=left>
<HR>
<FONT face=Tahoma size=2><B>From:</B> <A
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:ka-map-users-bounces@lists.maptools.org"
target=_blank>ka-map-users-bounces@lists.maptools.org</A> [mailto:<A
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:ka-map-users-bounces@lists.maptools.org"
target=_blank>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 onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:ka-Map-users@lists.maptools.org"
target=_blank>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
</BLOCKQUOTE></BODY></HTML>