|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.model.spatialschema.GeometryFactory
public final class GeometryFactory
Factory to create geometry instances.
Method Summary | |
---|---|
static Curve |
createCurve(byte[] wkb,
CoordinateSystem crs)
creates a Curve from a wkb. |
static Curve |
createCurve(CurveSegment segment)
creates a Curve from one curve segment. |
static Curve |
createCurve(CurveSegment[] segments)
creates a Curve from an array of curve segments. |
static Curve |
createCurve(CurveSegment[] segments,
CoordinateSystem crs)
creates a Curve from an array of curve segments. |
static Curve |
createCurve(double[] ord,
int dim,
CoordinateSystem crs)
creates a GM_Curve from an array of ordinates TODO: If resources are available, think about good programming style. |
static Curve |
createCurve(java.util.List<CurveSegment> segments,
CoordinateSystem crs)
|
static Curve |
createCurve(Position[] positions,
CoordinateSystem crs)
creates a Curve from an array of Positions. |
static Curve |
createCurveAsArc(double centerX,
double centerY,
double radiusX,
double radiusY,
int nSeg,
double start,
double end,
CoordinateSystem crs)
|
static CurveSegment |
createCurveSegment(java.util.List<Position> points,
CoordinateSystem crs)
|
static CurveSegment |
createCurveSegment(Position[] points,
CoordinateSystem crs)
creates a CurveSegment from an array of points. |
static Envelope |
createEnvelope(double minx,
double miny,
double maxx,
double maxy,
CoordinateSystem crs)
creates a Envelope object out from two corner coordinates |
static Envelope |
createEnvelope(Position min,
Position max,
CoordinateSystem crs)
creates a Envelope object out from two corner coordinates |
static Envelope |
createEnvelope(java.lang.String bbox,
CoordinateSystem crs)
creates an Envelope from a comma seperated String; e.g.: 10,34,15,48 |
static MultiCurve |
createMultiCurve(byte[] wkb,
CoordinateSystem crs)
creates a MultiCurve from a wkb. |
static MultiCurve |
createMultiCurve(Curve[] curves)
creates a MultiCurve from an array of Curves. |
static MultiCurve |
createMultiCurve(Curve[] curves,
CoordinateSystem crs)
creates a MultiCurve from an array of Curves. |
static MultiGeometry |
createMultiGeometry(byte[] wkb,
CoordinateSystem crs)
Creates a MultiGeometry from an array of Geometry objects. |
static MultiGeometry |
createMultiGeometry(Geometry[] members,
CoordinateSystem crs)
Creates a MultiGeometry from an array of Geometry objects. |
static MultiPoint |
createMultiPoint(byte[] wkb,
CoordinateSystem crs)
creates a MultiPoint from a wkb. |
static MultiPoint |
createMultiPoint(Point[] points)
creates a MultiPoint from an array of Point. |
static MultiPoint |
createMultiPoint(Point[] points,
CoordinateSystem crs)
creates a MultiPoint from an array of Point. |
static MultiSurface |
createMultiSurface(byte[] wkb,
CoordinateSystem crs,
SurfaceInterpolation si)
creates a MultiSurface from a wkb |
static MultiSurface |
createMultiSurface(Surface[] surfaces)
creates a MultiSurface from an array of surfaces |
static MultiSurface |
createMultiSurface(Surface[] surfaces,
CoordinateSystem crs)
creates a MultiSurface from an array of surfaces |
static Point |
createPoint(byte[] wkb,
CoordinateSystem srs)
creates a Point from a wkb. |
static Point |
createPoint(double x,
double y,
CoordinateSystem crs)
creates a Point from two coordinates. |
static Point |
createPoint(double x,
double y,
double z,
CoordinateSystem crs)
creates a Point from two coordinates. |
static Point |
createPoint(Position position,
CoordinateSystem crs)
creates a Point from a position. |
static Position |
createPosition(double[] p)
creates a Position from an array of double. |
static Position |
createPosition(double x,
double y)
creates a Position from two coordinates. |
static Position |
createPosition(double x,
double y,
double z)
creates a Position from three coordinates. |
static Position |
createPosition(javax.vecmath.Point3d coordinates)
creates a Position from a point3d. |
static Surface |
createSurface(byte[] wkb,
CoordinateSystem crs,
SurfaceInterpolation si)
creates a Surface from a wkb. |
static Surface |
createSurface(double[] exterior,
double[][] interior,
int dim,
CoordinateSystem crs)
Creates a GM_Surface from the ordinates of the exterior ring and the the interior rings |
static Surface |
createSurface(Envelope bbox,
CoordinateSystem crs)
Creates a Surface from a Envelope. |
static Surface |
createSurface(Position[] exteriorRing,
Position[][] interiorRings,
SurfaceInterpolation si,
CoordinateSystem crs)
creates a Surface composed of one SurfacePatch from array(s) of Position |
static Surface |
createSurface(SurfacePatch patch)
creates a Surface from an array of SurfacePatch. |
static Surface |
createSurface(SurfacePatch[] patches)
creates a Surface from an array of SurfacePatch. |
static Surface |
createSurface(SurfacePatch[] patches,
CoordinateSystem crs)
creates a Surface from an array of SurfacePatch. |
static Surface |
createSurfaceAsEllipse(double centerX,
double centerY,
double radiusX,
double radiusY,
int nSeg,
CoordinateSystem crs)
creates a surface in form of an ellipse. |
static SurfacePatch |
createSurfacePatch(Curve exteriorRing,
Curve[] interiorRings,
CoordinateSystem crs)
|
static SurfacePatch |
createSurfacePatch(CurveSegment[] exteriorRing,
CurveSegment[][] interiorRings,
CoordinateSystem crs)
|
static SurfacePatch |
createSurfacePatch(Position[] exteriorRing,
Position[][] interiorRings,
SurfaceInterpolation si,
CoordinateSystem crs)
creates a SurfacePatch from array(s) of Position |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Envelope createEnvelope(double minx, double miny, double maxx, double maxy, CoordinateSystem crs)
minx
- lower x-axis coordinateminy
- lower y-axis coordinatemaxx
- upper x-axis coordinatemaxy
- upper y-axis coordinatecrs
- The coordinate system
public static Envelope createEnvelope(Position min, Position max, CoordinateSystem crs)
min
- lower pointmax
- upper pointcrs
- The coordinate system
public static Envelope createEnvelope(java.lang.String bbox, CoordinateSystem crs)
bbox
- the boundingbox of the created Envelopecrs
- The coordinate system
public static Position createPosition(double x, double y)
x
- coordinate on the x-axisy
- coordinate on the y-axis
public static Position createPosition(double x, double y, double z)
x
- coordinate on the x-axisy
- coordinate on the y-axisz
- coordinate on the z-axis
public static Position createPosition(javax.vecmath.Point3d coordinates)
coordinates
- the coordinates to create the position from.
public static Position createPosition(double[] p)
p
- list of points
public static Point createPoint(double x, double y, CoordinateSystem crs)
x
- x coordinatey
- y coordinatecrs
- spatial reference system of the point geometry
public static Point createPoint(double x, double y, double z, CoordinateSystem crs)
x
- x coordinatey
- y coordinatez
- coordinate on the z-axiscrs
- spatial reference system of the point geometry
public static Point createPoint(Position position, CoordinateSystem crs)
position
- positioncrs
- spatial reference system of the point geometry
public static Point createPoint(byte[] wkb, CoordinateSystem srs) throws GeometryException
wkb
- geometry in Well-Known Binary (WKB) formatsrs
- spatial reference system of the geometry
GeometryException
- if the wkb is not known or invalidpublic static CurveSegment createCurveSegment(Position[] points, CoordinateSystem crs) throws GeometryException
points
- array of Pointcrs
- CS_CoordinateSystem spatial reference system of the curve
GeometryException
- if the point array is emptypublic static CurveSegment createCurveSegment(java.util.List<Position> points, CoordinateSystem crs) throws GeometryException
points
- crs
-
GeometryException
public static Curve createCurve(Position[] positions, CoordinateSystem crs) throws GeometryException
positions
- positionscrs
- spatial reference system of the geometry
GeometryException
- if the point array is emptypublic static Curve createCurve(CurveSegment segment) throws GeometryException
segment
- CurveSegments
GeometryException
- if the segment is nullpublic static Curve createCurve(CurveSegment[] segments) throws GeometryException
segments
- array of CurveSegments
GeometryException
- if the segment is null or has no valuespublic static Curve createCurve(CurveSegment[] segments, CoordinateSystem crs) throws GeometryException
segments
- array of CurveSegmentscrs
-
GeometryException
- if the segment is null or has no valuespublic static Curve createCurve(java.util.List<CurveSegment> segments, CoordinateSystem crs) throws GeometryException
segments
- crs
-
GeometryException
public static Curve createCurve(double[] ord, int dim, CoordinateSystem crs) throws GeometryException
ord
- the ordinatesdim
- the dimension of the ordinatescrs
- the spatial reference system of the geometry
GeometryException
- if the ord array is emptypublic static SurfacePatch createSurfacePatch(Position[] exteriorRing, Position[][] interiorRings, SurfaceInterpolation si, CoordinateSystem crs) throws GeometryException
exteriorRing
- exterior ring of the patchinteriorRings
- interior rings of the patchsi
- SurfaceInterpolationcrs
- CS_CoordinateSystem spatial reference system of the surface patch
GeometryException
public static SurfacePatch createSurfacePatch(CurveSegment[] exteriorRing, CurveSegment[][] interiorRings, CoordinateSystem crs) throws GeometryException
exteriorRing
- interiorRings
- crs
-
GeometryException
public static SurfacePatch createSurfacePatch(Curve exteriorRing, Curve[] interiorRings, CoordinateSystem crs) throws GeometryException
exteriorRing
- interiorRings
- crs
-
GeometryException
public static Curve createCurveAsArc(double centerX, double centerY, double radiusX, double radiusY, int nSeg, double start, double end, CoordinateSystem crs) throws GeometryException
centerX
- x coordinate of the center of the ellipse the arc is part ofcenterY
- y coordinate of the center of the ellipse the arc is part ofradiusX
- radius in x-direction of the ellipse the arc is part ofradiusY
- radius in y-direction of the ellipse the arc is part ofnSeg
- number of segmentsstart
- start angle of the arcend
- end angle of the arccrs
-
Curve
representing an arc
GeometryException
public static Curve createCurve(byte[] wkb, CoordinateSystem crs) throws GeometryException
wkb
- byte stream that contains the wkb informationcrs
- CS_CoordinateSystem spatial reference system of the curve
GeometryException
- if the wkb is not known or invalidpublic static Surface createSurfaceAsEllipse(double centerX, double centerY, double radiusX, double radiusY, int nSeg, CoordinateSystem crs) throws GeometryException
radiusX
== radiusY
a circle will be created
centerX
- centerY
- radiusX
- radiusY
- nSeg
- number of segments the ellipse will havecrs
-
GeometryException
public static Surface createSurface(Position[] exteriorRing, Position[][] interiorRings, SurfaceInterpolation si, CoordinateSystem crs) throws GeometryException
exteriorRing
- exterior ring of the patchinteriorRings
- interior rings of the patchsi
- SurfaceInterpolationcrs
- CS_CoordinateSystem spatial reference system of the surface patch
GeometryException
- if the implicite orientation is not '+' or '-', or the rings aren't closedpublic static Surface createSurface(SurfacePatch patch) throws GeometryException
patch
- patches that build the surface
GeometryException
- if implicite the orientation is not '+' or '-'public static Surface createSurface(SurfacePatch[] patches) throws GeometryException
patches
- patches that build the surface
GeometryException
- if implicite the orientation is not '+' or '-'public static Surface createSurface(SurfacePatch[] patches, CoordinateSystem crs) throws GeometryException
patches
- patches that build the surfacecrs
-
GeometryException
- if implicite the orientation is not '+' or '-'public static Surface createSurface(byte[] wkb, CoordinateSystem crs, SurfaceInterpolation si) throws GeometryException
wkb
- byte stream that contains the wkb informationcrs
- CS_CoordinateSystem spatial reference system of the curvesi
- SurfaceInterpolation
GeometryException
- if the implicite orientation is not '+' or '-' or the wkb is not known or invalidpublic static Surface createSurface(Envelope bbox, CoordinateSystem crs) throws GeometryException
bbox
- envelope to be convertedcrs
- spatial reference system of the surface
GeometryException
- if the implicite orientation is not '+' or '-'public static Surface createSurface(double[] exterior, double[][] interior, int dim, CoordinateSystem crs) throws GeometryException
exterior
- ringinterior
- ringdim
- of the surfacecrs
- spatial reference system of the surface
GeometryException
- if the implicite orientation is not '+' or '-'public static MultiGeometry createMultiGeometry(Geometry[] members, CoordinateSystem crs)
MultiGeometry
from an array of Geometry
objects.
members
- member geometriescrs
- coordinate system
MultiGeometry
that contains all given memberspublic static MultiGeometry createMultiGeometry(byte[] wkb, CoordinateSystem crs) throws GeometryException
MultiGeometry
from an array of Geometry
objects.
wkb
- wkb informationcrs
- coordinate system
MultiGeometry
that contains all given members
GeometryException
- if the wkb is not known or invalidpublic static MultiPoint createMultiPoint(Point[] points)
points
- array of Points
public static MultiPoint createMultiPoint(Point[] points, CoordinateSystem crs)
points
- array of Pointscrs
-
public static MultiPoint createMultiPoint(byte[] wkb, CoordinateSystem crs) throws GeometryException
wkb
- byte stream that contains the wkb informationcrs
- CS_CoordinateSystem spatial reference system of the curve
GeometryException
- if the wkb is not known or invalidpublic static MultiCurve createMultiCurve(Curve[] curves)
curves
-
public static MultiCurve createMultiCurve(Curve[] curves, CoordinateSystem crs)
curves
- crs
-
public static MultiCurve createMultiCurve(byte[] wkb, CoordinateSystem crs) throws GeometryException
wkb
- byte stream that contains the wkb informationcrs
- CS_CoordinateSystem spatial reference system of the curve
GeometryException
- if the wkb is not known or invalidpublic static MultiSurface createMultiSurface(Surface[] surfaces)
surfaces
-
public static MultiSurface createMultiSurface(Surface[] surfaces, CoordinateSystem crs)
surfaces
- crs
-
public static MultiSurface createMultiSurface(byte[] wkb, CoordinateSystem crs, SurfaceInterpolation si) throws GeometryException
wkb
- geometry in Well-Known Binary (WKB) formatcrs
- spatial reference system of the geometrysi
- surface interpolation
GeometryException
- if the wkb is not known or invalid
|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org