public interface PrimitiveFactory
PrimitiveFactory
.Modifier and Type  Method and Description 

Curve 
createCurve(List<CurveSegment> segments)
Takes a list of curve segments with the appropriate
endtostart relationships and creates a curve.

Point 
createPoint(double[] coordinates)
Creates a point at the specified location specified by coordinates.

Point 
createPoint(Position position)
Creates a point at the specified position.

Primitive 
createPrimitive(Envelope envelope)
Returns an envelope as a primitive.

Ring 
createRing(List<OrientableCurve> curves)
Constructs a ring out of its component curves.

Solid 
createSolid(SolidBoundary boundary)
Constructs a solid by indicating its boundary as a collection of
shells organized into a solid boundary.

Surface 
createSurface(List<SurfacePatch> surfaces)
Takes a list of surface patches with the appropriate
sidetoside relationships and creates a surface.

Surface 
createSurface(SurfaceBoundary boundary)
Constructs a surface by indicating its boundary as a collection
of curves organized into the specified surface boundary.

SurfaceBoundary 
createSurfaceBoundary(Ring exterior,
List<Ring> interiors)
Constructs a new surface boundary object
representing the boundary of a twodimensional surface.

CoordinateReferenceSystem 
getCoordinateReferenceSystem()
Returns the coordinate reference system in use for all primitive
geometric objects to be created through this interface.

CoordinateReferenceSystem getCoordinateReferenceSystem()
@UML(identifier="GM_Primitive(GM_Envelope)", obligation=MANDATORY, specification=ISO_19107) Primitive createPrimitive(Envelope envelope) throws MismatchedReferenceSystemException, MismatchedDimensionException
EXAMPLE: In the case where the envelope is totally contained in the domain of validity of its coordinate reference system object, its associated primitive is the convex hull of the various permutations of the coordinates in the corners. For example, suppose that a particular envelope in 2D is defined as:
(we ignore the CRS below, assuming that it is a global variable), then we can take the various permutations of the ordinate values to create a list of polygon corners:lowerCorner = (x1, y1) upperCorner = (x2, y2)
If we then apply the convex hull function to the multi point, we get a polygon as a surface. The extent of a polygon in 2D is totally defined by its boundary (internal surface patches are planar and do not need interior control points) which gives us a data type to represent surface in 2D:MultiPoint
= { (x1, y1), (x1, y2), (x2, y1), (x2, y2) }
So that the surface boundary record contains the abovecited exterior ring, and an empty set of interior rings (convex sets have no "interior" holes).Ring
= {LineString
= { (x1, y1), (x1, y2), (x2, y2), (x2, y1), (x1, y1)} }
MismatchedReferenceSystemException
 If geometric objects given in argument don't
use compatible coordinate reference system.MismatchedDimensionException
 If geometric objects given in argument don't have
the expected dimension.@Extension Point createPoint(double[] coordinates) throws MismatchedDimensionException
MismatchedDimensionException
 If geometric objects given in argument don't have
the expected dimension.@UML(identifier="GM_Point(GM_Position)", obligation=MANDATORY, specification=ISO_19107) Point createPoint(Position position) throws MismatchedReferenceSystemException, MismatchedDimensionException
MismatchedReferenceSystemException
 If geometric objects given in argument don't
use compatible coordinate reference system.MismatchedDimensionException
 If geometric objects given in argument don't have
the expected dimension.@UML(identifier="GM_Curve(GM_CurveSegment[1..n])", obligation=MANDATORY, specification=ISO_19107) Curve createCurve(List<CurveSegment> segments) throws MismatchedReferenceSystemException, MismatchedDimensionException
MismatchedReferenceSystemException
 If geometric objects given in argument don't
use compatible coordinate reference system.MismatchedDimensionException
 If geometric objects given in argument don't have
the expected dimension.@UML(identifier="GM_Surface(GM_SurfacePatch[1..n])", obligation=MANDATORY, specification=ISO_19107) Surface createSurface(List<SurfacePatch> surfaces) throws MismatchedReferenceSystemException, MismatchedDimensionException
MismatchedReferenceSystemException
 If geometric objects given in argument don't
use compatible coordinate reference system.MismatchedDimensionException
 If geometric objects given in argument don't have
the expected dimension.@UML(identifier="GM_Surface(GM_SurfaceBoundary)", obligation=MANDATORY, specification=ISO_19107) Surface createSurface(SurfaceBoundary boundary) throws MismatchedReferenceSystemException, MismatchedDimensionException
MismatchedReferenceSystemException
 If geometric objects given in argument don't
use compatible coordinate reference system.MismatchedDimensionException
 If geometric objects given in argument don't have
the expected dimension.@Extension SurfaceBoundary createSurfaceBoundary(Ring exterior, List<Ring> interiors) throws MismatchedReferenceSystemException, MismatchedDimensionException
exterior
 In the normal 2D case, this identifies the curve that is
the exterior curve of the surface. In cases where an exterior
cannot be unambiguously chosen (a bounded cylinder, for example),
this parameter may be null.interiors
 All of the curve components of the boundary that are not
the exterior.MismatchedReferenceSystemException
 If geometric objects given in
argument don't use a coordinate reference system compatible with the one held by this
factory.MismatchedDimensionException
 If geometric objects given in argument don't have
the expected dimension.@UML(identifier="GM_Solid(GM_SolidBoundary)", obligation=MANDATORY, specification=ISO_19107) Solid createSolid(SolidBoundary boundary) throws MismatchedReferenceSystemException, MismatchedDimensionException
MismatchedReferenceSystemException
 If geometric objects given in argument don't
use compatible coordinate reference system.MismatchedDimensionException
 If geometric objects given in argument don't have
the expected dimension.@Extension Ring createRing(List<OrientableCurve> curves) throws MismatchedReferenceSystemException, MismatchedDimensionException
curves
 The list of curves that comprise the newly created Ring.
These curves must connect to form a continuous curve whose start
point is the same as its end point.MismatchedReferenceSystemException
 If geometric objects given in argument don't
use compatible coordinate reference system.MismatchedDimensionException
 If geometric objects given in argument don't have
the expected dimension.Copyright © 1996–2017 Geotools. All rights reserved.