コード例 #1
0
 @operator(value = {"add_z"})
 @doc(
     deprecated = "use set location instead",
     value = "add_z",
     comment =
         "Return a geometry with a z value"
             + "The add_z operator set the z value of the whole shape."
             + "For each point of the cell the same z value is set.",
     examples = {@example("set shape <- shape add_z rnd(100);")},
     see = {"add_z_pt"})
 @Deprecated
 public static IShape add_z(final IShape g, final Double z) {
   GamaPoint p = new GamaPoint(g.getLocation().getX(), g.getLocation().getY(), z);
   g.setLocation(p);
   /*
    * final Coordinate[] coordinates = g.getInnerGeometry().getCoordinates();
    * ((GamaPoint) g.getLocation()).z = z;
    * for ( int i = 0; i < coordinates.length; i++ ) {
    * coordinates[i].z = z;
    * }
    */
   return g;
 }
コード例 #2
0
 @Deprecated
 @operator(
     value = {"add_z_pt"},
     category = {IOperatorCategory.SPATIAL, IOperatorCategory.THREED})
 @doc(
     deprecated = "Use 'set_z' instead",
     value = "add_z_pt",
     comment = "Return a geometry with a z value",
     examples = {
       @example(
           "loop i from: 0 to: length(shape.points) - 1{"
               + "shape <- shape add_z_pt {i,valZ};"
               + "}")
     },
     see = {"add_z"})
 public static IShape add_z_pt(final IShape geom, final GamaPoint data) {
   geom.getInnerGeometry().getCoordinates()[(int) data.x].z = data.y;
   return geom;
 }