perl mapscript: Can't locate swig_numres.al
Lowell Filak
lfilak at MEDINACO.ORG
Wed Jul 27 05:55:37 PDT 2005
The following message was sent by Jachym Cepicky
<jachym.cepicky at CENTRUM.CZ> on Wed, 27 Jul 2005 10:50:35 +0200.
> 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
Jáchym,
As of 4.6 there is/will only be a single source for SWIG MapScript
documentation with appendices for particulars with different 'flavors'.
Please use the 'MapScript Reference' link from the main documentation
page and not the 'SWIGMapScript' link as it will not be updated. The
'MapScript Reference' has been stated as "official" for some time now.
The attributes for a shapefile are housed in xbase (dbf) files and you
can use any method you prefer to access those attributes. Such as
XBase.pm, XBase.pm+DBI, or load the attributes into a RDBMS and use DBI
to retrieve them. You are not forced to stick with
'$layerObj->getItem($k), $shapeObj->getValue($k)'.
HTH
Lowell
More information about the MapServer-users
mailing list