|
GeoAPI 1.0 Build 2004-05-18 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
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 of
GeometryFactory.
Factory? |
| Method Summary | |
|---|---|
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 3-point 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. |
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. |
CoordinateReferenceSystem |
getCoordinateReferenceSystem()
Returns the coordinate reference system in use for all geometries to be created through this interface. |
| Method Detail |
|---|
CoordinateReferenceSystem getCoordinateReferenceSystem()
LineSegment createLineSegment(Position startPoint,
Position endPoint)
startPoint - The start point.endPoint - The end point.
GM_LineSegment(GM_Position[2])
LineString createLineString(List<Position> points)
GM_LineString(GM_Position[2..n])
Geodesic createGeodesic(Position startPoint,
Position endPoint)
startPoint - The start point.endPoint - The end point.GeodesicString createGeodesicString(List<Position> points)
GM_GeodesicString(GM_Position[2..n])
Arc createArc(Position startPoint,
Position midPoint,
Position endPoint)
startPoint - The start point.midPoint - Some point on the arc neither at the start or end.endPoint - The end point.
GM_Arc(GM_Position[3])
Arc createArc(Position startPoint,
Position endPoint,
double bulge,
double[] normal)
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 P0 = (x0, y0) and P1 = (x1, y1), and the bulge is b, then the vector in the direction of P1 from P0 is:midPoint = ((startPoint + endPoint)/2.0) + bulge×normal
u = (u0, u1) =
(x1-x0,
y1-y0) /
sqrt((x1-x0)2 +
(y1-y0)2)
To complete a right-handed 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 = (v0, v1) = (-u1, u0)The midpoint of the arc, which is the midpoint of the chord offset by the bulge, becomes:
m = (P0 + P1)/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.
GM_Arc(GM_Position[2],Real,Vector)
ArcString createArcString(List<Position> points)
GM_ArcString(GM_Position[3,, 5,, 7...])
ArcByBulge createArcByBulge(Position startPoint,
Position endPoint,
double bulge,
double[] normal)
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.
GM_ArcByBulge(GM_Position[2],Real,Vector)
ArcStringByBulge createArcStringByBulge(List<Position> points,
double[] bulges,
List<double[]> normals)
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.
GM_ArcStringByBulge(GM_Position[2..n],Real[1..n],Vector[1..n])
|
GeoAPI 1.0 Build 2004-05-18 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
|
Symbols, terms and definitions | Copyright OpenGIS® Consortium |