
public interface GeometryFactory
A factory of geometries. All geometries created through this interface will use the factory's coordinate reference system. Creating geometries in a different CRS may requires a different instance ofGeometryFactory
. Since:
 GeoAPI 1.0


Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method 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 PositionFactoryDirectPosition
createDirectPosition(double[] coordinates)
Deprecated.Moved to PositionFactoryEnvelope
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.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.



Method Detail

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

createDirectPosition
@Deprecated DirectPosition createDirectPosition()
Deprecated.Moved to PositionFactoryCreate a direct position with empty coordinates.

createDirectPosition
@Deprecated DirectPosition createDirectPosition(double[] coordinates)
Deprecated.Moved to PositionFactoryCreate a direct position at the specified location specified by coordinates.

createEnvelope
Envelope createEnvelope(DirectPosition lowerCorner, DirectPosition upperCorner) throws MismatchedReferenceSystemException, MismatchedDimensionException
Creates a new Envelope with the given corners. Parameters:
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. Throws:
MismatchedReferenceSystemException
 if the coordinate positions don't use compatible coordinate reference system.MismatchedDimensionException
 if the coordinate position don't have compatible dimension.

createLineSegment
@UML(identifier="GM_LineSegment(GM_Position[2])", obligation=MANDATORY, specification=ISO_19107) LineSegment createLineSegment(Position startPoint, Position endPoint) throws MismatchedReferenceSystemException, MismatchedDimensionException
Takes two positions and creates the appropriate line segment joining them. Parameters:
startPoint
 The start point.endPoint
 The end point. Throws:
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.

createLineString
@UML(identifier="GM_LineString(GM_Position[2..n])", obligation=MANDATORY, specification=ISO_19107) LineString createLineString(List<Position> points) throws MismatchedReferenceSystemException, MismatchedDimensionException
Takes two or more positions and creates the appropriate line string joining them. Throws:
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.

createGeodesic
Geodesic createGeodesic(Position startPoint, Position endPoint) throws MismatchedReferenceSystemException, MismatchedDimensionException
Takes two positions and creates the appropriate geodesic joining them. Parameters:
startPoint
 The start point.endPoint
 The end point. Throws:
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.

createGeodesicString
@UML(identifier="GM_GeodesicString(GM_Position[2..n])", obligation=MANDATORY, specification=ISO_19107) GeodesicString createGeodesicString(List<Position> points) throws MismatchedReferenceSystemException, MismatchedDimensionException
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. Throws:
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.

createArc
@UML(identifier="GM_Arc(GM_Position[3])", obligation=MANDATORY, specification=ISO_19107) Arc createArc(Position startPoint, Position midPoint, Position endPoint) throws MismatchedReferenceSystemException, MismatchedDimensionException
Takes three positions and constructs the corresponding arc. Parameters:
startPoint
 The start point.midPoint
 Some point on the arc neither at the start or end.endPoint
 The end point. Throws:
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.

createArc
@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
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. The midpoint of the resulting arc is given by:
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₀ = (x₀, y₀) and P₁ = (x₁, y₁), and the bulge is b, then the vector in the direction of P₁ from P₀ is:midPoint = ((startPoint + endPoint)/2.0) + bulge×normal
u = (u₀, u₁) = (x₁x₀, y₁y₀) /
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:sqrt
((x₁x₀)² + (y₁y₀)²)v = (v₀, v₁) = (u₁, u₀)
The midpoint of the arc, which is the midpoint of the chord offset by the bulge, becomes:m = (P₀ + P₁)/2 + b×v
This is leftward if b > 0 and rightward if b < 0. Parameters:
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. Throws:
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.

createArcString
@UML(identifier="GM_ArcString(GM_Position[3, 5, 7...])", obligation=MANDATORY, specification=ISO_19107) ArcString createArcString(List<Position> points) throws MismatchedReferenceSystemException, MismatchedDimensionException
Takes a sequence of positions and constructs a sequence of 3point arcs jointing them. By the nature of an arc string, the sequence must have an odd number of positions. Throws:
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.

createArcByBulge
@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
Equivalents to the second constructor of arc, except the bulge representation is maintained. The midpoint of the resulting arc is given by:midPoint = ((startPoint + endPoint)/2.0) + bulge×normal
 Parameters:
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. Throws:
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.

createArcStringByBulge
@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
Equivalent to the second constructor of arc, except the bulge representation is maintained internal to the object. The midpoints of the resulting arc is given by:midPoint[n] = ((points[n] + points[n+1])/2.0) + (bulge * normal)
 Parameters:
points
 The points to use as start and end points for each arc. This list size shall be equal to thebulge
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 shall be the same than thebulge
array length. Throws:
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.

createBSplineCurve
@UML(identifier="GM_BSplineCurve(Integer,GM_PointArray,Sequence<GM_Knot>,GM_KnotType)", obligation=MANDATORY, specification=ISO_19107) BSplineCurve createBSplineCurve(int degree, PointArray points, List<Knot> knots, KnotType knotSpec) throws MismatchedReferenceSystemException, MismatchedDimensionException
Constructs a Bspline curve. If theknotSpec
isnull
, then theKnotType
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 theknotType
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 theknotType
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. Parameters:
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. Throws:
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.

createBSplineSurface
@UML(identifier="GM_BSplineSurface(Sequence<GM_PointArray>,Integer,Sequence<GM_Knot>,GM_KnotType)", obligation=MANDATORY, specification=ISO_19107) BSplineSurface createBSplineSurface(List<PointArray> points, int[] degree, List<Knot>[] knots, KnotType knotSpec) throws MismatchedReferenceSystemException, MismatchedDimensionException
Constructs a Bspline surface. If theknotSpec
is not present, then theknotType
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 theknotType
is uniform they need not be specified. Parameters:
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, ornull
if unspecified.knotSpec
 The type of knot distribution used in defining this spline, ornull
if unspecified. Throws:
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.

createPolygon
@UML(identifier="GM_Polygon(GM_SurfaceBondary)", obligation=MANDATORY, specification=ISO_19107) Polygon createPolygon(SurfaceBoundary boundary) throws MismatchedReferenceSystemException, MismatchedDimensionException
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.Note: The meaning of exterior in the surface boundary is consistent with the plane of the constructed planar polygon. Parameters:
boundary
 The surface boundary. Throws:
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.

createPolygon
@UML(identifier="GM_Polygon(GM_SurfaceBondary,GM_Surface)", obligation=MANDATORY, specification=ISO_19107) Polygon createPolygon(SurfaceBoundary boundary, Surface spanSurface) throws MismatchedReferenceSystemException, MismatchedDimensionException
Creates a polygon lying on a spanning surface. There is no restriction of the types of interpolation used by the composite curves used in the surface boundary, but they must all be lie on the spanning surface for the process to succeed.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. Parameters:
boundary
 The surface boundary.spanSurface
 The spanning surface. Throws:
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.

createTin
@UML(identifier="GM_Tin(Set<GM_Position>,Set<GM_LineString>,Set<GM_LineString>,Number)", obligation=MANDATORY, specification=ISO_19107) Tin createTin(Set<Position> post, Set<LineString> stopLines, Set<LineString> breakLines, double maxLength) throws MismatchedReferenceSystemException, MismatchedDimensionException
Constructs a restricted Delaunay network from triangle corners (posts), breaklines, stoplines, and maximum length of a triangle side. Parameters:
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. Throws:
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.

createPolyhedralSurface
@UML(identifier="GM_PolyhedralSurace(GM_Polygon)", obligation=MANDATORY, specification=ISO_19107) PolyhedralSurface createPolyhedralSurface(List<Polygon> tiles) throws MismatchedReferenceSystemException, MismatchedDimensionException
Constructs polyhedral surface from the facet polygons. Parameters:
tiles
 The facet polygons. Must contains at least one polygon. Throws:
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.

createMultiPrimitive
@Deprecated MultiPrimitive createMultiPrimitive()
Deprecated.This method is temporary. It will move to someMultiPrimitive
factory when the creation of Geometry interfaces will be completed. See GEO1 on JIRA.Placeholder to create a MultiPrimitive (or derivatives).

