perl mapscript: Can't locate swig_numres.al

Jachym Cepicky jachym.cepicky at CENTRUM.CZ
Wed Jul 27 04:50:35 EDT 2005


huh,

the documentation could be better some things are on
http://mapserver.gis.umn.edu/doc44/perlmapscript-reference.html and
some ohter on http://zcologia.com/mapserver/mapscript. 
Thank you for this suggestion. 

I would only ask, if there is better way, how to get attributes from
table by point, than this:



$layerObj->queryByPoint($mapObj,$pnt,$mapscript::MS_SINGLE,0);

my $resultCacheObj = $layerObj->getResults();

if ($resultCacheObj) {
    $layerObj->open();

    for ($i = 0; $i < $resultCacheObj->{numresults}; $i++) {

        my $resultCacheMemberObj = $resultCacheObj->getResult($i);

        my $shapeObj = $layerObj->getFeature($resultCacheMemberObj->{shapeindex});

        for (my $k; $k <$shapeObj->{numvalues}; $k++) {
            printf ("$k: %s %s\n", $layerObj->getItem($k), $shapeObj->getValue($k));
        }
    }
    $layerObj->close();
} # end if $resultCacheMemberObj

have a nice day

Jáchym


On Tue, Jul 26, 2005 at 11:26:01PM -0800, Joe Bussell wrote:
> my $numResults = $layerObj->getNumResults();
> 
> :)
> 
> Joe Bussell
> On Time Systems
> 
> 
> Jachym Cepicky wrote:
> 
> >Hallo,
> >
> >I use mapserver and perl-mapscript from debian package, version 4.4.1-2.
> >
> >I can not query layers by point, I try to approach by Mapscript Query
> >HOWTO (http://zcologia.com/mapserver/querying-howto):
> >
> >       
> >$layerObj->queryByPoint($mapObj,$pntObj,$mapscript::MS_SINGLE,0);
> >
> >my $results = $layerObj->getResult(0);
> >
> >if ($results) {
> >for ($i = 0; $i < $results->{numresults}; $i++) { 
> >   
> > my $result = $results->getResult($i);
> > my 
> > $feature=$layerObj->getFeature($result->{shapeindex},$result->{tileindex});
> >   
> >}
> >}
> >
> >But I get following message from my webserver:
> >
> >Can't locate auto/mapscript/resultCacheMemberObj/swig_numres.al in @INC 
> >(@INC contains: /var/www/perl /etc/perl /usr/local/lib/perl/5.8.7 
> >/usr/local/share/perl/5.8.7 /usr/lib/perl5 /usr/share/perl5 
> >/usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl . 
> >/etc/apache/ /etc/apache/lib/perl) at /usr/lib/perl5/mapscript.pm line 29
> >
> >What am I doing wrong?
> >
> >Is there some other howto, which would show me, what to do?
> >
> >Thank you for any help
> >
> >Jachym
> > 
> >
> 

-- 
Jachym Cepicky
e-mail: jachym.cepicky at centrum.cz
URL: http://les-ejk.cz
GPG: http://les-ejk.cz/gnupg_public_key/



More information about the mapserver-users mailing list