org.gvsig.fmap.geom.aggregate.impl
Class MultiPoint2D

java.lang.Object
  extended by org.gvsig.fmap.geom.primitive.impl.AbstractPrimitive
      extended by org.gvsig.fmap.geom.aggregate.impl.BaseMultiPrimitive
          extended by org.gvsig.fmap.geom.aggregate.impl.MultiPoint2D
All Implemented Interfaces:
Shape, Serializable, Comparable, Aggregate, MultiPoint, MultiPrimitive, Geometry, FShape, Primitive
Direct Known Subclasses:
MultiPoint2DZ

public class MultiPoint2D
extends BaseMultiPrimitive
implements MultiPoint

Multipunto 2D.

Author:
Vicente Caballero Navarro
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.gvsig.fmap.geom.Geometry
Geometry.DIMENSIONS, Geometry.OPERATIONS, Geometry.SUBTYPES, Geometry.TYPES
 
Field Summary
 
Fields inherited from class org.gvsig.fmap.geom.aggregate.impl.BaseMultiPrimitive
geometries
 
Fields inherited from class org.gvsig.fmap.geom.primitive.impl.AbstractPrimitive
geometryType, geomManager, id, projection
 
Fields inherited from interface org.gvsig.fmap.geom.Geometry
BEST, E, EXTENDED_GEOMSUBTYPE_OFFSET, EXTENDED_GEOMTYPE_OFFSET, N, NE, NW, S, SE, SELECTHANDLER, STRETCHINGHANDLER, SW, W
 
Constructor Summary
MultiPoint2D(GeometryType geometryType)
          The constructor with the GeometryType like and argument is used by the GeometryType#create() to create the geometry
MultiPoint2D(GeometryType geometryType, String id, org.cresques.cts.IProjection projection, Point2D[] points)
           
 
Method Summary
 void addPoint(Point point)
          Adds a new point to the multipoint
 FShape cloneFShape()
          Creates and returns a shape equal and independent of this one.
 Geometry cloneGeometry()
          Creates a clone of this geometry.
 Rectangle getBounds()
           
 Rectangle2D getBounds2D()
          Returns this geometry's boundary rectangle.
 Envelope getEnvelope()
           Returns the minimum bounding box for this Geometry.
 int getNumgeometries()
          Deprecated. use getPrimitivesNumber
 int getNumPoints()
          Deprecated. use getPrimitivesNumber
 Point2D getPoint(int i)
           
 Point getPointAt(int index)
          Gets the point that is on a concrete position inside the multi point
 void setPoints(double[] x, double[] y)
           
 void transform(AffineTransform at)
          It applies an affine transformation to the geometry.
 
Methods inherited from class org.gvsig.fmap.geom.aggregate.impl.BaseMultiPrimitive
addPrimitive, contains, contains, contains, contains, fastIntersects, getDimension, getGeneralPath, getGeometries, getHandlers, getInternalShape, getPathIterator, getPathIterator, getPrimitiveAt, getPrimitivesNumber, getSelectHandlers, getStretchingHandlers, intersects, intersects, isSimple, reProject
 
Methods inherited from class org.gvsig.fmap.geom.primitive.impl.AbstractPrimitive
area, buffer, centroid, compareTo, contains, containsPoint, containsRectangle, convertToWKB, convertToWKT, convexHull, coveredBy, crosses, difference, disjoint, distance, equals, getGeometryType, getId, getShape, getShape, getShapeType, getSRS, getType, intersection, intersects, intersectsRectangle, invokeOperation, invokeOperation, moveGeom, overlaps, perimeter, rotateGeom, scaleGeom, toString, touches, transform, union, within
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.gvsig.fmap.geom.aggregate.MultiPrimitive
addPrimitive
 
Methods inherited from interface org.gvsig.fmap.geom.aggregate.Aggregate
getPrimitiveAt, getPrimitivesNumber
 
Methods inherited from interface org.gvsig.fmap.geom.Geometry
area, buffer, centroid, contains, convertToWKB, convertToWKT, convexHull, coveredBy, crosses, difference, disjoint, distance, fastIntersects, getDimension, getGeneralPath, getGeometryType, getHandlers, getInternalShape, getPathIterator, getPathIterator, getShape, getShape, getType, intersection, intersects, intersects, invokeOperation, invokeOperation, isSimple, overlaps, perimeter, reProject, touches, union, within
 
Methods inherited from interface java.awt.Shape
contains, contains, contains, contains, intersects
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

MultiPoint2D

public MultiPoint2D(GeometryType geometryType)
The constructor with the GeometryType like and argument is used by the GeometryType#create() to create the geometry

Parameters:
type - The geometry type

MultiPoint2D

public MultiPoint2D(GeometryType geometryType,
                    String id,
                    org.cresques.cts.IProjection projection,
                    Point2D[] points)
Parameters:
geometryType -
id -
projection -
points -
Method Detail

cloneGeometry

public Geometry cloneGeometry()
Description copied from interface: Geometry
Creates a clone of this geometry.

Specified by:
cloneGeometry in interface Geometry
Overrides:
cloneGeometry in class AbstractPrimitive
Returns:
A clone of this geometry.

getBounds

public Rectangle getBounds()
Specified by:
getBounds in interface Shape
Overrides:
getBounds in class BaseMultiPrimitive

getBounds2D

public Rectangle2D getBounds2D()
Description copied from interface: Geometry
Returns this geometry's boundary rectangle.

Specified by:
getBounds2D in interface Shape
Specified by:
getBounds2D in interface Geometry
Overrides:
getBounds2D in class BaseMultiPrimitive
Returns:
Boundary rectangle.

cloneFShape

public FShape cloneFShape()
Description copied from interface: FShape
Creates and returns a shape equal and independent of this one.

Specified by:
cloneFShape in interface FShape
Overrides:
cloneFShape in class BaseMultiPrimitive
Returns:
the new shape.

getNumgeometries

public int getNumgeometries()
Deprecated. use getPrimitivesNumber

Returns:
the numbre of points

getNumPoints

public int getNumPoints()
Deprecated. use getPrimitivesNumber

Returns:
the numbre of points

getPoint

public Point2D getPoint(int i)

transform

public void transform(AffineTransform at)
Description copied from interface: Geometry
It applies an affine transformation to the geometry.

Specified by:
transform in interface Geometry
Specified by:
transform in interface FShape
Overrides:
transform in class BaseMultiPrimitive
Parameters:
at - The transformation to apply.
See Also:
AffineTransform

getEnvelope

public Envelope getEnvelope()
Description copied from interface: Geometry

Returns the minimum bounding box for this Geometry. This shall be the coordinate region spanning the minimum and maximum value for each ordinate taken on by DirectPositions in this Geometry. The simplest representation for an envelope consists of two DirectPositions, the first one containing all the minimums for each ordinate, and second one containing all the maximums.

Specified by:
getEnvelope in interface Geometry
Overrides:
getEnvelope in class BaseMultiPrimitive
Returns:
The minimum bounding box for this Geometry.

addPoint

public void addPoint(Point point)
Description copied from interface: MultiPoint
Adds a new point to the multipoint

Specified by:
addPoint in interface MultiPoint
Parameters:
point - The point to add

setPoints

public void setPoints(double[] x,
                      double[] y)

getPointAt

public Point getPointAt(int index)
Description copied from interface: MultiPoint
Gets the point that is on a concrete position inside the multi point

Specified by:
getPointAt in interface MultiPoint
Parameters:
index - The position
Returns:
The selected point


Copyright © 2004-2012 gvSIG. All Rights Reserved.