Get line and line points

Ryan Feagin ryan.feagin at PEACHTREEGEOGRAPHICS.COM
Mon Aug 8 15:03:21 EDT 2005


Hi. I've just recently started using mapserver with PHP mapscript.

I'm trying to find a specific line segment from a shapefile, and then find
a point x distance on the line to be able create a geocoded point.  Can
someone give me an example in php of how get to the line segment and how
to access its node points?  I have started unsuccessfully playing around
with the following:

  $shapefile = ms_newShapefileObj($streetFile, -1);
  $s = ms_newShapeObj(-1);
  $shapefile->getShape(1, $s);

  $line = ms_NewLineObj();
  $line = $s->{line};

  echo $line->numpoints;

I get nothing back.

Thanks for you help



More information about the mapserver-users mailing list