ShapeResultObj->shape ?
Doyon, Jean-Francois
Jean-Francois.Doyon at CCRS.NRCan.gc.ca
Mon Sep 11 13:25:50 PDT 2000
Ahhhh ok :)
Could you post the necessary bit of code to change ? I'd rather keep a
stable version, since my app should go into production soon.
but I also want to make sure the code is compatible forward, so I'd like to
change that "point" to a "line" as it should be :)
And now, I'm having another problem, this time with the getshape() funtion
...
It seems to allways return the SAME shape (The first one), regardless of th
eindex value I give it !
Here's the code affected :
$queryres =
$reslay->queryusingpoint($querypoint,MS_SINGLE,-1);
$shapendx = $queryres->next();
$ndx = $shapendx->shape;
echo $ndx."<BR>";
$shpfile =
ms_newshapefileobj("/home/mapdata/common/shapefiles/tmp/".$shpname,-1);
$shpres = $shpfile->getshape($ndx);
$lineres = $shpres->point(0); <- Note the
current workaround :)
$pointres = $lineres->point(0);
echo $pointres->y."<BR>";
echo $pointres->x."<BR>";
The $ndx value is set correctly, but the getshape function and the rest of
the code allways return the same shape !
I even tried harcoding an index value in there instead of $ndx, but same
deal ... (As mentionned the FIRST shape)
The shape value of the ShapeResultObj is the INDEX of the shape , right ?
This and other values for the object
should probably be better described in the docs ...
Or is the value returned something else ?
Thanks,
J.F.
> ----------
> From: Daniel Morissette[SMTP:danmo at videotron.ca]
> Sent: Monday, September 11, 2000 12:57 PM
> To: Doyon, Jean-Francois
> Cc: mapserver-users at lists.gis.umn.edu
> Subject: Re: shape->line() ?
>
> "Doyon, Jean-Francois" wrote:
> >
> > I'm getting :
> >
> > Fatal error: Call to unsupported or undefined function line() in
> > /home/httpd/html/ccatlas/search/map.php3 on line 224
> >
> > I checked the code (php_mapscript.c) and the function does seem to be
> there
> > ... and $shpres IS an Object.
> >
> > What am I missing ?
> >
>
> You're missing the latest version of the code ;-)
>
> The function was there but was registered as being called "point"
> (Copy/Paste error!), so accessing $shpres->point(0) should do what you
> want with the version of the PHP MapScript that you have. I've fixed it
> last week at the same time as a couple of other problems...
> unfortunetely there is some areas of MapScript that we have implemented
> wrappers for but haven't used yet, and you've found one!
>
> The version that's currently in CVS is pretty stable (it behaves well
> for me at least!), so you could probably update if you want. This would
> also give you the setProjection() function that you needed.
>
> Unfortunately the nightly build on the UMN web site seems to date from
> the end of July. Did you intentionnally stop it, Steve?
>
> Later,
> --
> ------------------------------------------------------------
> Daniel Morissette danmo at videotron.ca
> http://pages.infinit.net/danmo/
> ------------------------------------------------------------
> Don't put for tomorrow what you can do today, because if
> you enjoy it today you can do it again tomorrow.
>
More information about the MapServer-users
mailing list