public interface GeometryFactory
GeometryFactory
.Modifier and Type  Method and Description 

Arc 
createArc(Position startPoint,
Position endPoint,
double bulge,
double[] normal)
Takes two positions and the offset of the midpoint of the arc from the midpoint of
the chord, given by a distance and direction, and constructs the corresponding arc.

Arc 
createArc(Position startPoint,
Position midPoint,
Position endPoint)
Takes three positions and constructs the corresponding arc.

ArcByBulge 
createArcByBulge(Position startPoint,
Position endPoint,
double bulge,
double[] normal)
Equivalents to the second
constructor of arc, except the bulge representation is maintained.

ArcString 
createArcString(List<Position> points)
Takes a sequence of positions and constructs a sequence of
3point arcs jointing them.

ArcStringByBulge 
createArcStringByBulge(List<Position> points,
double[] bulges,
List<double[]> normals)
Equivalent to the second
constructor of arc, except the bulge representation is maintained internal to the
object.

BSplineCurve 
createBSplineCurve(int degree,
PointArray points,
List<Knot> knots,
KnotType knotSpec)
Constructs a Bspline curve.

BSplineSurface 
createBSplineSurface(List<PointArray> points,
int[] degree,
List<Knot>[] knots,
KnotType knotSpec)
Constructs a Bspline surface.

DirectPosition 
createDirectPosition()
Deprecated.
Moved to PositionFactory

DirectPosition 
createDirectPosition(double[] coordinates)
Deprecated.
Moved to PositionFactory

Envelope 
createEnvelope(DirectPosition lowerCorner,
DirectPosition upperCorner)
Creates a new Envelope with the given corners.

Geodesic 
createGeodesic(Position startPoint,
Position endPoint)
Takes two positions and creates the appropriate geodesic joining them.

GeodesicString 
createGeodesicString(List<Position> points)
Takes two or more positions, interpolates using a geodesic defined from
the geoid (or ellipsoid) of the
coordinate reference system
being used, and creates the appropriate geodesic string joining them.

LineSegment 
createLineSegment(Position startPoint,
Position endPoint)
Takes two positions and creates the appropriate line segment joining them.

LineString 
createLineString(List<Position> points)
Takes two or more positions and creates the appropriate line string joining them.

MultiPrimitive 
createMultiPrimitive()
Deprecated.
This method is temporary. It will move to some
MultiPrimitive
factory when the creation of Geometry interfaces will be completed.
See GEO1 on JIRA. 
Polygon 
createPolygon(SurfaceBoundary boundary)
Creates a polygon directly from a set of boundary curves (organized into a
surface boundary) which shall be defined using coplanar positions
as control points.

Polygon 
createPolygon(SurfaceBoundary boundary,
Surface spanSurface)
Creates a polygon lying on a spanning surface.

PolyhedralSurface 
createPolyhedralSurface(List<Polygon> tiles)
Constructs polyhedral surface from the facet polygons.

Tin 
createTin(Set<Position> post,
Set<LineString> stopLines,
Set<LineString> breakLines,
double maxLength)
Constructs a restricted Delaunay network from triangle corners (posts),
breaklines, stoplines, and maximum length of a triangle side.

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

CoordinateReferenceSystem getCoordinateReferenceSystem()
@Deprecated DirectPosition createDirectPosition()
@Deprecated DirectPosition createDirectPosition(double[] coordinates)
Envelope createEnvelope(DirectPosition lowerCorner, DirectPosition upperCorner) throws MismatchedReferenceSystemException, MismatchedDimensionException
lowerCorner
 A coordinate position consisting of all the maximal ordinates for each
dimension for all points within the envelope.upperCorner
 A coordinate position consisting of all the minimal ordinates for each
dimension for all points within the envelope.MismatchedReferenceSystemException
 If the coordinate positions don't use
compatible coordinate reference system.MismatchedDimensionException
 If the coordinate position don't have compatible dimension.@UML(identifier="GM_LineSegment(GM_Position[2])", obligation=MANDATORY, specification=ISO_19107) LineSegment createLineSegment(Position startPoint, Position endPoint) throws MismatchedReferenceSystemException, MismatchedDimensionException
startPoint
 The start point.endPoint
 The 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.@UML(identifier="GM_LineString(GM_Position[2..n])", obligation=MANDATORY, specification=ISO_19107) LineString createLineString(List<Position> points) 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.Geodesic createGeodesic(Position startPoint, Position endPoint) throws MismatchedReferenceSystemException, MismatchedDimensionException
startPoint
 The start point.endPoint
 The 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.@UML(identifier="GM_GeodesicString(GM_Position[2..n])", obligation=MANDATORY, specification=ISO_19107) GeodesicString createGeodesicString(List<Position> points) 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_Arc(GM_Position[3])", obligation=MANDATORY, specification=ISO_19107) Arc createArc(Position startPoint, Position midPoint, Position endPoint) throws MismatchedReferenceSystemException, MismatchedDimensionException
startPoint
 The start point.midPoint
 Some point on the arc neither at the start or end.endPoint
 The 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.@UML(identifier="GM_Arc(GM_Position[2],Real,Vector)", obligation=MANDATORY, specification=ISO_19107) Arc createArc(Position startPoint, Position endPoint, double bulge, double[] normal) throws MismatchedReferenceSystemException, MismatchedDimensionException
In 2D coordinate reference systems, the bulge can be given a sign and the normal can be assumed to be the perpendicular to the line segment between the start and end point of the arc (the chord of the arc), pointing left. For example if the two points are P_{0} = (x_{0}, y_{0}) and P_{1} = (x_{1}, y_{1}), and the bulge is b, then the vector in the direction of P_{1} from P_{0} is:midPoint = ((startPoint + endPoint)/2.0) + bulge×normal
u = (u_{0}, u_{1}) =
(x_{1}x_{0},
y_{1}y_{0}) /
sqrt
((x_{1}x_{0})^{2} +
(y_{1}y_{0})^{2})
To complete a righthanded local coordinate system {u,v}, the two vectors
must have a vector dot product of zero and a vector cross product of 1. By inspection,
the leftward normal to complete the pair is:
v = (v_{0}, v_{1}) = (u_{1}, u_{0})The midpoint of the arc, which is the midpoint of the chord offset by the bulge, becomes:
m = (P_{0} + P_{1})/2 + b×vThis is leftward if b > 0 and rightward if b < 0.
startPoint
 The start point.endPoint
 The end point.bulge
 The distance of the midpoint of the arc from the midpoint of the chord.normal
 A direction normal to the chord.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_ArcString(GM_Position[3, 5, 7...])", obligation=MANDATORY, specification=ISO_19107) ArcString createArcString(List<Position> points) 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_ArcByBulge(GM_Position[2],Real,Vector)", obligation=MANDATORY, specification=ISO_19107) ArcByBulge createArcByBulge(Position startPoint, Position endPoint, double bulge, double[] normal) throws MismatchedReferenceSystemException, MismatchedDimensionException
midPoint = ((startPoint + endPoint)/2.0) + bulge×normal
startPoint
 The start point.endPoint
 The end point.bulge
 The distance of the midpoint of the arc from the midpoint of the chord.normal
 A direction normal to the chord.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_ArcStringByBulge(GM_Position[2..n],Real[1..n],Vector[1..n])", obligation=MANDATORY, specification=ISO_19107) ArcStringByBulge createArcStringByBulge(List<Position> points, double[] bulges, List<double[]> normals) throws MismatchedReferenceSystemException, MismatchedDimensionException
midPoint[n] = ((points[n] + points[n+1])/2.0) + (bulge * normal)
points
 The points to use as start and
end points for each arc. This list size
must be equals to the bulge
array length plus 1.bulges
 The distances of the midpoint of the arc from the midpoint of the chord.normals
 The directions normal to the chord. This list size must be the same than
the bulge
array length.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_BSplineCurve(Integer,GM_PointArray,Sequence,GM_KnotType)", obligation=MANDATORY, specification=ISO_19107) BSplineCurve createBSplineCurve(int degree, PointArray points, List<Knot> knots, KnotType knotSpec) throws MismatchedReferenceSystemException, MismatchedDimensionException
knotSpec
is null
, then the
KnotType
is uniform and the knots are evenly spaced, and except for the
first and last have multiplicity = 1. At the ends the knots are of multiplicity =
degree
+1. If the knotType
is uniform they need not be specified.
NOTE: If the Bspline curve is uniform and degree = 1, the Bspline
is equivalent to a polyline (LineString
). If the knotType
is
piecewise Bezier, then the knots are
defaulted so that they are evenly spaced, and except for the first and last
have multiplicity equal to degree. At the ends the knots are of multiplicity =
degree
+1.
degree
 The algebraic degree of the basis functions.points
 An array of points that are used in the interpolation in this spline curve.knots
 The sequence of distinct knots used to define the spline basis functions.knotSpec
 The type of knot distribution used in defining this spline.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_BSplineSurface(Sequence,Integer,Sequence ,GM_KnotType)", obligation=MANDATORY, specification=ISO_19107) BSplineSurface createBSplineSurface(List<PointArray> points, int[] degree, List<Knot>[] knots, KnotType knotSpec) throws MismatchedReferenceSystemException, MismatchedDimensionException
knotSpec
is not present, then the
knotType
is uniform and the knots are evenly spaced, and, except for the
first and last, have multiplicity = 1. At the ends the knots are of multiplicity
= degree+1. If the knotType
is uniform they need not be specified.points
 Arrays of points that are used in the interpolation in this spline surface.degree
 The algebraic degree of the basis functions for the first and second parameter,
as an array of length 1 or 2. If only one value is given, then the two degrees
are equal.knots
 The sequence of knots as an array of length 2, or null
if unspecified.knotSpec
 The type of knot distribution used in defining this spline, or
null
if unspecified.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_Polygon(GM_SurfaceBondary)", obligation=MANDATORY, specification=ISO_19107) Polygon createPolygon(SurfaceBoundary boundary) throws MismatchedReferenceSystemException, MismatchedDimensionException
NOTE: The meaning of exterior in the surface boundary is consistent with the plane of the constructed planar polygon.
boundary
 The surface boundary.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_Polygon(GM_SurfaceBondary,GM_Surface)", obligation=MANDATORY, specification=ISO_19107) Polygon createPolygon(SurfaceBoundary boundary, Surface spanSurface) throws MismatchedReferenceSystemException, MismatchedDimensionException
NOTE: It is important that the boundary components be oriented properly for this to work. It is often the case that in bounded manifolds, such as the sphere, there is an ambiguity unless the orientation is properly used.
boundary
 The surface boundary.spanSurface
 The spanning surface.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_Tin(Set,Set ,Set ,Number)", obligation=MANDATORY, specification=ISO_19107) Tin createTin(Set<Position> post, Set<LineString> stopLines, Set<LineString> breakLines, double maxLength) throws MismatchedReferenceSystemException, MismatchedDimensionException
post
 The corners of the triangles in the TIN.stopLines
 lines where the local continuity or regularity of the surface is questionable.breakLines
 lines of a critical nature to the shape of the surface.maxLength
 Maximal length for retention.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_PolyhedralSurace(GM_Polygon)", obligation=MANDATORY, specification=ISO_19107) PolyhedralSurface createPolyhedralSurface(List<Polygon> tiles) throws MismatchedReferenceSystemException, MismatchedDimensionException
tiles
 The facet polygons. Must contains at least one polygon.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.@Deprecated MultiPrimitive createMultiPrimitive()
MultiPrimitive
factory when the creation of Geometry interfaces will be completed.
See GEO1 on JIRA.Copyright © 19962014 Geotools. All Rights Reserved.