|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectArcSDEGeometryBuilder
public abstract class ArcSDEGeometryBuilder
Creates propper JTS Geometry objects from SeShape
objects and viceversa.
SeShape
's are gathered from an SeRow
ArcSDE API's result object and
holds it's geometry attributes as a three dimensional array of double
primitives as
explained bellow.
By this way, we avoid the creation of ArcSDE's java implementation of OGC geometries for later translation to JTS, avoiding too the dependency on the ArcSDE native library wich the geometry package of the ArcSDE Java API depends on.
Given double [][][]coords
the meaning of this array is as follow:
1
coords[0]
.This abstract class will use specialized subclass for constructing the propper geometry type
Field Summary | |
---|---|
protected GeometryFactory |
factory
JTS geometry factory subclasses use to map SeShapes to JTS ones |
Method Summary | |
---|---|
static ArcSDEGeometryBuilder |
builderFor(Class<? extends Geometry> jtsGeometryClass)
Factory method that returns an instance of ArcSDEGeometryBuilder specialized in
contructing JTS geometries of the JTS Geometry class passed as argument. |
Geometry |
construct(SeShape shape)
Takes an ArcSDE's SeShape and builds a JTS Geometry. |
SeShape |
constructShape(Geometry geometry,
SeCoordinateReference seSrs)
Creates the ArcSDE Java API representation of a Geometry object in its shape
format, suitable to filter expressions as the SDE API expects |
static Geometry |
defaultValueFor(Class<?> geoClass)
Create an empty geometry for the indicated class |
protected Geometry |
getEmpty()
returns an empty JTS geometry who's type is given by the ArcSDEGeometryBuilder
subclass instance specialization that implements it. |
protected abstract Geometry |
newGeometry(double[][][] coords)
Builds a JTS Geometry who't type is given by the ArcSDEGeometryBuilder subclass
instance specialization that implements it |
protected Coordinate[] |
toCoords(double[] coordList)
Builds an array of JTS Coordinate instances that's geometrically equals to the
SeShape single coordinates array passed as argument. |
protected SDEPoint[] |
toPointsArray(Coordinate[] coords)
DOCUMENT ME! |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected GeometryFactory factory
Method Detail |
---|
public Geometry construct(SeShape shape) throws SeException, DataSourceException
SeShape
and builds a JTS Geometry. The geometry type
constructed depends on this ArcSDEGeometryBuilder
specialized subclass
shape
- the ESRI's ArcSDE java api shape upon wich to create the new JTS geometry
shape.isNil()
SeException
- if it occurs fetching the coordinates array from shape
DataSourceException
- if the com.vividsolutions.jts.geom.GeometryFactory
this builder is
backed by can't create the com.vividsolutions.jts.geom.Geometry
with
the com.vividsolutions.jts.geom.Coordinate[]
provided by
newGeometry
public SeShape constructShape(Geometry geometry, SeCoordinateReference seSrs) throws ArcSdeException
Geometry
object in its shape
format, suitable to filter expressions as the SDE API expects
geometry
- the JTS Geometry object to get the SDE representation fromseSrs
- Coordinate Reference System of the underlying SeLayer
object for wich
the SeShape
is constructed.
SeShape
representation of passed Geometry
ArcSDEGeometryBuildingException
- DOCUMENT ME!
ArcSdeException
protected abstract Geometry newGeometry(double[][][] coords) throws DataSourceException
ArcSDEGeometryBuilder
subclass
instance specialization that implements it
coords
- SeShape
's coordinate array to build the geometry from
DataSourceException
- if an error occurs while creating the JTS Geometryprotected Geometry getEmpty()
ArcSDEGeometryBuilder
subclass instance specialization that implements it.
this method is called in case that SeShape.isNil() == true
UnsupportedOperationException
- DOCUMENT ME!protected Coordinate[] toCoords(double[] coordList)
Coordinate
instances that's geometrically equals to the
SeShape
single coordinates array passed as argument.
coordList
- array of coordinates of a single shape part to build a Coordinate
from
coordList
array of Coordinate
instancesprotected SDEPoint[] toPointsArray(Coordinate[] coords)
coords
- DOCUMENT ME!
public static ArcSDEGeometryBuilder builderFor(Class<? extends Geometry> jtsGeometryClass) throws IllegalArgumentException
ArcSDEGeometryBuilder
specialized in
contructing JTS geometries of the JTS Geometry class passed as argument. Note that
jtsGeometryClass
must be one of the supported concrete JTS Geometry classes.
jtsGeometryClass
-
IllegalArgumentException
- if jtsGeometryClass
is not a concrete JTS Geometry
class (like com.vividsolutions.jts.geom.MultiPoint.class
i.e.)public static Geometry defaultValueFor(Class<?> geoClass)
geoClass
- DOCUMENT ME!
NullPointerException
- DOCUMENT ME!
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |