[Mapserver-users] Can't locate object method "TIEHASH"

Lowell Filak lfilak at medinaco.org
Tue Jun 1 06:48:55 PDT 2004


Due to the nature of DBF files the access method can be slow but there
are a couple of things you can watch.

If you want to try and use indexes that exist on the DBF files be sure
to compile in the alpha index support for different indexing schemes (or
 alternate Xbase.pm for Foxpro idx support) - I don't know how stable
each of the individually supported index otions are.
Use XBase directly as opposed to XBase via DBI - although this can make
for considerably more coding for attribute queries.
Option - Load all the DBF records into a RDBMS, create indexes, and use DBI.
The quickest way we have found to dump & load all of the data into MySQL
is to create a Perl script to immitate the DBFDUMP utility which adds a
sequential number to the output as it prints each record to a tab
delimited file for use by 'mysql> LOAD DATA LOCAL' - if I remember right
the date format in the DBF matches what MySQL expects to load so that
doesn't need touched - this was actually faster than opening one DBF
handle and one RDBMS handle and reading & writing each record in our
limited tests.

HTH

Lowell

The following message was sent by Agneta Schick
<schick at sdac.hannover.bgr.de> on Tue, 1 Jun 2004 10:55:15 +0200 (MEST).

> Thanks for the replies. 
> 
> I have no problem using XBase but I thought I had
> read an old mail ( which I can't find now) where someone criticised
> this method as being slow and advised to use msDBF. 
> 
> A follow-up question: what is the fastest method
> for extracting information from .dbf files?
> 
> Agneta Schick 
> 
> 
> > It is best to use Perl's XBase module for querying the DBF files.
> > I'm pretty sure that isn't even documented on purpose - I'll have to
> > check the doc.
> > 
> > Lowell
> > 
> > The following message was sent by Agneta Schick
> > <schick at sdac.hannover.bgr.de> on Fri, 28 May 2004 11:54:04 +0200 (MEST).
> > 
> > > Hello mapserver-users,
> > > 
> > > I've searched the mail archive and found 2 messages on this topic,
> > > both were, however, unanswered.
> > > 
> > > So I'll try again...
> > > 
> > > Platform:
> > > 	MapServer 4.0.1
> > > 	solaris 9
> > > 	Perl 5.8.3
> > > 
> > > I want to test an application querying shape files.
> > > My perl mapscript code
> > > ...
> > >   $layer->queryByPoint($tmp_map,$pnt,$mapscript::MS_SINGLE,1000);
> > >   my $res = $layer->getResult(0);
> > >   $layer->open();
> > >   my $shape=new mapscript::shapeObj($layer->{type});
> > >   my $shape_index = $layer->getShape($shape,-1,$res->{shapeindex});
> > >   my $table = 
> > >
> >
mapscript::msDBFOpen("/space/b3sn13/webdb/htdocs/ermos/data/usgs.dbf","r+");
> > > ....
> > > is terminated with 
> > > Can't locate object method "TIEHASH" via package "_DBFHandle".
> > > 
> > > Is this a mapscript problem or is something missing in the
installation?
> > > 
> > > (I tried the same perl script on solaris 8, mapserver 3.6.5, perl 5.6
> > > and got the same error).
> > > 
> > > Thanks,
> > > Agneta Schick
> > > 
> > >
> >
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > >     Agneta Schick
> > >     
> > >     Bundesanstalt fuer Geowissenschaften und Rohstoffe
> > >     Federal Institute for Geosciences and Natural Resources
> > >     Stilleweg 2
> > >     D- 30655 Hannover                   Tel.: +49 511 643 3136
> > >     GERMANY                             FAX.: +49 511 643 3663
> > > 
> > >     schick at sdac.hannover.bgr.de         http://www.seismologie.bgr.de
> > >
> >
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > 
> > > 
> > > 
> > > 
> > > _______________________________________________
> > > Mapserver-users mailing list
> > > Mapserver-users at lists.gis.umn.edu
> > > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users




More information about the MapServer-users mailing list