[ka-Map-users] precache2 problem

Jesse Lovelace i.mentat at gmail.com
Tue May 16 12:29:53 EDT 2006


Hi Tim,

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:

OGRFeature(tgrindex):509
  LOCATION (String) = ../48/48501/
  POLYGON ((-103.064678999999998 32.958548,-103.064678999999998 33.388489,-
102.594234 33.388489,-102.594234 32.958548,-103.064678999999998 32.958548))

OGRFeature(tgrindex):510
  LOCATION (String) = ../48/48503/
  POLYGON ((-98.954097000000004 32.9523,-98.954097000000004 33.397534,-
98.420435999999995 33.397534,-98.420435999999995 32.9523,-98.954097000000004
32.9523))

OGRFeature(tgrindex):511
  LOCATION (String) = ../48/48505/
  POLYGON ((-99.453794000000002 26.571681999999999,-99.453794000000002
27.319154999999999,-98.954176000000004 27.319154999999999,-
98.954176000000004 26.571681999999999,-99.453794000000002 26.571681999999999
))

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:

Warning: [MapServer Error]: msSHPOpenFile():
(/var/www/http/tl-map/../48/48391//water)
 in /var/www/http/tl-map/precache2.php on line 237

Warning: [MapServer Error]: msSHPOpenFile(): (/home/data/../48/48391//water)
 in /var/www/http/tl-map/precache2.php on line 237

Warning: [MapServer Error]: msSHPOpenFile():
(/var/www/http/tl-map/../48/48389//water)
 in /var/www/http/tl-map/precache2.php on line 237

Warning: [MapServer Error]: msSHPOpenFile(): (/home/data/../48/48389//water)
 in /var/www/http/tl-map/precache2.php on line 237
...

jesse

On 5/16/06, Tim Schaub <tim at commenspace.org> wrote:
>
>  Hey Jesse-
>
> 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.
>
> If you send your mapfile (just to me) - I'll see if I can help figure out
> what is going on.
>
> Tim
>
>
>  ------------------------------
> *From:* ka-map-users-bounces at lists.maptools.org [mailto:
> ka-map-users-bounces at lists.maptools.org] *On Behalf Of *Jesse Lovelace
> *Sent:* Monday, May 15, 2006 8:21 AM
> *To:* ka-Map-users at lists.maptools.org
> *Subject:* [ka-Map-users] precache2 problem
>
> Precache2 seems to have a problem when processing some directories for data:
>
> Warning: [MapServer Error]: msSHPOpenFile():
> (/var/www/http/tiger2005fe/37/37053//place)
>  in /var/www/http/tl-map/precache2.php on line 238
>
>
> Warning: [MapServer Error]: msSHPOpenFile():
> (/home/data/tiger2005fe/37/37053//place)
>  in /var/www/http/tl-map/precache2.php on line 238
>
> Fatal error: Call to a member function on a non-object in
> /var/www/http/tl-map/precache2.php on line 239
>
>
> The 37/37053 directory doesn't have a 'place' shapefile--I think precache should
> continue gracefully if it comes to a directory that is missing a layer--it could
> be that not all areas have all layers.
>
>
> 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.
>
> Many thanks.
>
> jesse
>
>
> _______________________________________________
> ka-Map-users mailing list
> ka-Map-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ka-map-users
>
>
>


-- 
Jesse Lovelace
NCSU Mathematics & Computer Science
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ka-map-users/attachments/20060516/a3dc6f73/attachment.html


More information about the ka-Map-users mailing list