Personal tools
You are here: Home Documentation References PHP/Mapscript Class Reference Classes LineObj Class

4.10. LineObj Class

Document Actions
Up one level
Constructor, members, and methods.
  • Constant names and class member variable names are case-sensitive in PHP.
  • Several MapScript functions (all those that access files in the back end such as ms_newMapObj(), drawMap(), etc.) will affect the value of the current working directory (CWD) in the PHP environment. This will be fixed eventually but in the meantime you should be careful about these side-effects.
Constructor:

  LineObj ms_newLineObj()

Members:

  int    numpoints  (read-only)

Methods:

  int add(pointObj point)
       Add a point to the end of line.

  int addXY(double x, double y [, double m])
       Add a point to the end of line.
       Note : the 3rd parameter m is used for measured shape files only. 
       It is not mandatory.

  int addXYZ(double x, double y, double z [, double m])
       Add a point to the end of line.
       Note : the 4th parameter m is used for measured shape files only. 
       It is not mandatory.

  PointObj point(int i)
       Returns a reference to point number i.  Reference is valid only
       during the life of the lineObj that contains the point.

  int project(projectionObj in, projectionObj out)
       Project the line from "in" projection (1st argument) to "out" 
       projection (2nd argument).  Returns MS_SUCCESS/MS_FAILURE.

  void free()
       Destroys resources used by a line object.     
by Jeff McKenna last modified 2008-07-15 10:11

Powered by Plone