public static MultiPoint narrowToMultiPoint(JSObject multiPoint) { return (multiPoint == null) ? null : new MultiPoint(multiPoint); }
/** * Add a point to the MultiPoint * * @param point The point to add * @param index */ public void addPoint(Point point, int index) { addComponent(point, index); }
/** * Removes a point from this MultiPoint * * @param point The point to remove */ public void removePoint(Point point) { removeComponent(point); }
public Point[] getComponents() { int max = getNumberOfComponents(); Point[] components = new Point[max]; for (int i = 0; i < max; i++) { components[i] = Point.narrowToPoint(getComponent(i)); } return components; }
public double[][] getCoordinateArray() { Point[] components = getComponents(); int max = components.length; double[][] coordinateArray = new double[max][]; for (int i = 0; i < max; i++) { coordinateArray[i] = components[i].getXY(); } return coordinateArray; }
@Override public Geometry buildGeometry(String geomClassName, JSObject geomElement) throws IllegalStateException { return (isCompatibleGeometry(geomClassName) ? MultiPoint.narrowToMultiPoint(geomElement) : super.forwardBuildGeometry(geomClassName, geomElement)); }
public Point[] getComponents(){ int max = getNumberOfComponents(); Point[] components = new Point[max]; for(int i = 0; i < max; i++){ components[i] = Point.narrowToPoint(getComponent(i)); } return components; }
public double[][] getCoordinateArray() { Point[] components = getComponents(); int max = components.length; double[][] coordinateArray = new double[max][]; for(int i = 0; i < max; i++){ coordinateArray[i] = components[i].getXY(); } return coordinateArray; } }