|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.data.arcsde.GeometryBuilder
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 com.vividsolutions.jts.geom.GeometryFactory |
factory
JTS geometry factory subclasses use to map SeShapes to JTS ones |
Method Summary | |
static GeometryBuilder |
builderFor(java.lang.Class jtsGeometryClass)
Factory method that returns an instance of GeometryBuilder
specialized in contructing JTS geometries of the JTS Geometry class
passed as argument. |
com.vividsolutions.jts.geom.Geometry |
construct(com.esri.sde.sdk.client.SeShape shape)
Takes an ArcSDE's SeShape and builds a JTS Geometry. |
com.esri.sde.sdk.client.SeShape |
constructShape(com.vividsolutions.jts.geom.Geometry geometry,
com.esri.sde.sdk.client.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 com.vividsolutions.jts.geom.Geometry |
defaultValueFor(java.lang.Class geoClass)
DOCUMENT ME! |
protected com.vividsolutions.jts.geom.Geometry |
getEmpty()
returns an empty JTS geometry who's type is given by the GeometryBuilder subclass instance specialization that
implements it.
|
protected abstract com.vividsolutions.jts.geom.Geometry |
newGeometry(double[][][] coords)
Builds a JTS Geometry who't type is given by the GeometryBuilder subclass instance specialization that
implements it |
protected com.vividsolutions.jts.geom.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 com.esri.sde.sdk.client.SDEPoint[] |
toPointsArray(com.vividsolutions.jts.geom.Coordinate[] coords)
DOCUMENT ME! |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected com.vividsolutions.jts.geom.GeometryFactory factory
Method Detail |
public com.vividsolutions.jts.geom.Geometry construct(com.esri.sde.sdk.client.SeShape shape) throws com.esri.sde.sdk.client.SeException, DataSourceException
SeShape
and builds a JTS Geometry. The
geometry type constructed depends on this GeometryBuilder
specialized subclass
shape
- the ESRI's ArcSDE java api shape upon wich to create the new
JTS geometry
shape.isNil()
com.esri.sde.sdk.client.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 com.esri.sde.sdk.client.SeShape constructShape(com.vividsolutions.jts.geom.Geometry geometry, com.esri.sde.sdk.client.SeCoordinateReference seSrs) throws GeometryBuildingException
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
GeometryBuildingException
- DOCUMENT ME!protected abstract com.vividsolutions.jts.geom.Geometry newGeometry(double[][][] coords) throws DataSourceException
GeometryBuilder
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 com.vividsolutions.jts.geom.Geometry getEmpty()
GeometryBuilder
subclass instance specialization that
implements it.
this method is called in case that SeShape.isNil() == true
java.lang.UnsupportedOperationException
- DOCUMENT ME!protected com.vividsolutions.jts.geom.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 com.esri.sde.sdk.client.SDEPoint[] toPointsArray(com.vividsolutions.jts.geom.Coordinate[] coords)
coords
- DOCUMENT ME!
public static GeometryBuilder builderFor(java.lang.Class jtsGeometryClass) throws java.lang.IllegalArgumentException
GeometryBuilder
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
-
java.lang.IllegalArgumentException
- if jtsGeometryClass
is not a concrete JTS
Geometry
class (like
com.vividsolutions.jts.geom.MultiPoint.class
i.e.)public static com.vividsolutions.jts.geom.Geometry defaultValueFor(java.lang.Class geoClass)
geoClass
- DOCUMENT ME!
java.lang.NullPointerException
- DOCUMENT ME!
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |