|
Spatial DataBlade JAVA API v8.21 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.spatial.srs.CoordRef
public class CoordRef
The CoordRef
class represents a coordinate reference.
A coordinate reference includes the coordinate system and a set of offset
and scale values that convert floating point real-world coordinate values
into integer system coordinates for compatibility with ESRI's SDE layer.
Field Summary | |
---|---|
static int |
ALL
All fields (except srid) are compared for equivalence |
static int |
AUTH
Authority name and authority id are compared for equivalence |
static int |
DESC
Descriptions are compared for equivalence |
static int |
EXTENT
Coordinate values extents are compared for equivalence |
static int |
SRTEXT
The projection strings are compared for equivalence |
Constructor Summary | |
---|---|
CoordRef()
Constructs a default coordinate reference object. |
|
CoordRef(CoordRef cr)
Constructs a coordinate reference object by copying fields from the specified coordinate reference. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Returns a copy of this object. |
double[] |
convertMValuesToWorld(long[] m)
Converts an array of measures stored as system values into its equivalent array of world values. |
long |
convertMValueToSystem(double planarValue)
Converts a world M value into its equivalent system (internal) value. |
double |
convertMValueToWorld(long systemValue)
Converts a M system value into its equivalent world value. |
long |
convertXValueToSystem(double planarValue)
Converts a world X coordinate value into its equivalent system (internal) value. |
double |
convertXValueToWorld(long systemValue)
Converts a X system value into its equivalent world coordinate value. |
double[] |
convertXYValuesToWorld(long[] xy)
Converts an array of {x,y} coordinate pairs into its equivalent array of world coordinate values. |
long |
convertYValueToSystem(double planarValue)
Converts a world Y coordinate value into its equivalent system (internal) value. |
double |
convertYValueToWorld(long systemValue)
Converts a Y system value into its equivalent world coordinate value. |
double[] |
convertZValuesToWorld(long[] z)
Converts an array of z ordinates stored as system values into its equivalent array of world values. |
long |
convertZValueToSystem(double planarValue)
Converts a world Z value into its equivalent system (internal) value. |
double |
convertZValueToWorld(long systemValue)
Converts a Z system value into its equivalent world value. |
CoordRef |
duplicate()
Creates a duplicate of this coordinate reference object. |
boolean |
equals(java.lang.Object anObject)
Compares this object to the specified object. |
java.lang.String |
getAuthName()
Gets the authoritative name for the spatial reference system associated to this coordinate reference object. |
java.lang.Integer |
getAuthSrid()
Gets the authoritative id for the spatial reference system associated to this coordinate reference object. |
java.lang.String |
getDescription()
Gets a description of this coordinate reference object. |
int |
getDimension()
Returns the dimension of the coordinate system. |
Envelope |
getExtent()
Gets the extent of coordinate values covered by this coordinate reference object. |
double |
getFalseM()
Gets the M false origin for this coordinate reference object. |
double |
getFalseX()
Gets the X false origin for this coordinate reference object. |
double |
getFalseY()
Gets the Y false origin for this coordinate reference object. |
double |
getFalseZ()
Gets the Z false origin for this coordinate reference object. |
double |
getMUnits()
Gets the M scale factor for this coordinate reference object. |
int |
getSrid()
Gets the database spatial reference ID that was used to define this coordinate reference object. |
java.lang.String |
getSrtext()
Returns the well-known text representation of this coordinate system, modeled after the Petrotechnical Open Software Corporation/European Professional Surveyors Group (POSC/EPSG) coordinate system data model. |
double |
getXYUnits()
Gets the XY scale factor for this coordinate reference object. |
double |
getZUnits()
Gets the Z scale factor for this coordinate reference object. |
int |
hashCode()
Returns a hash code for this CoordRef object. |
boolean |
sameAs(CoordRef cr,
int flags)
Checks whether this object is equivalent to the object passed as argument. |
void |
setAuthName(java.lang.String name)
Sets the authoritative name for the spatial reference system associated to this coordinate reference object. |
void |
setAuthSrid(java.lang.Integer id)
Sets the authoritative id for the spatial reference system associated to this coordinate reference object. |
void |
setDescription(java.lang.String s)
Sets a description of this coordinate reference object. |
void |
setDimension(int dimension)
Sets the dimension of the coordinate system. |
void |
setExtent(Envelope env)
Sets the X, Y, Z, and M false origins and scale factors so that this coordinate reference covers objects inside the envelope specified by env. |
void |
setM(double falseM,
double mUnits)
Sets the M false origin and scale factor for this coordinate reference object. |
void |
setSrid(int srid)
Sets a spatial reference ID for this coordinate reference object. |
void |
setSrtext(java.lang.String srtext)
Sets the well-known text representation of this coordinate system, modeled after the Petrotechnical Open Software Corporation/European Professional Surveyors Group (POSC/EPSG) coordinate system data model. |
void |
setXY(double falseX,
double falseY,
double xyUnits)
Sets the X and Y false origins and scale factor. |
void |
setZ(double falseZ,
double zUnits)
Sets the Z false origin and scale factor for this coordinate reference object. |
java.lang.String |
toString()
Returns a string representation of this coordinate reference object. |
void |
unsetSrid()
"Unsets" the srid of this object. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int SRTEXT
sameAs(com.ibm.spatial.srs.CoordRef, int)
,
Constant Field Valuespublic static final int AUTH
sameAs(com.ibm.spatial.srs.CoordRef, int)
,
Constant Field Valuespublic static final int DESC
sameAs(com.ibm.spatial.srs.CoordRef, int)
,
Constant Field Valuespublic static final int EXTENT
sameAs(com.ibm.spatial.srs.CoordRef, int)
,
Constant Field Valuespublic static final int ALL
sameAs(com.ibm.spatial.srs.CoordRef, int)
,
Constant Field ValuesConstructor Detail |
---|
public CoordRef()
The default projection text is set to an empty string. The XY extent is set to cover the full range of latitude-longitude coordinates and preserve 6 decimal digits, equivalent to a precision of approximately 1 meter.
The caller should never use directly this object. Instead, he should
set the extent, projection string, description, and authoritative fields,
register the new coordinate reference with a CoordRefManager instance
(see CoordRefManager.put()
),
then use the returned CoordRef object reference.
CoordRefManager.put(com.ibm.spatial.srs.CoordRef)
public CoordRef(CoordRef cr)
cr
- a coordinate referenceMethod Detail |
---|
public double getFalseX()
public double getFalseY()
public double getXYUnits()
public double getFalseZ()
public double getZUnits()
public double getFalseM()
public double getMUnits()
public Envelope getExtent()
public int getDimension()
public java.lang.String getSrtext()
public java.lang.String getAuthName()
public java.lang.Integer getAuthSrid()
public java.lang.String getDescription()
public int getSrid()
public void setDimension(int dimension)
dimension
- Dimension of the coordinate system.public void setSrtext(java.lang.String srtext)
The argument string is trimmed before being assigned to the internal field.
srtext
- The text representation used by this coordinate
reference object. If the argument is null, an empty string is
assigned; null values are not accepted for this attribute
when the object is serialized to the database.public void setAuthName(java.lang.String name)
name
- The authoritative name for the spatial reference system
associated to this coordinate reference object.public void setAuthSrid(java.lang.Integer id)
id
- The authoritative id for the spatial reference system
associated to this coordinate reference object, or null
if the property is not set for this object.public void setDescription(java.lang.String s)
s
- a description of this coordinate reference object.public void setSrid(int srid)
The user may also "unset" the srid, in order to indicate odify an existing CoordRef, then store it into a CoordRefManager instance.
srid
- the spatial reference id for this objectunsetSrid()
,
CoordRefManager.put(com.ibm.spatial.srs.CoordRef)
public void unsetSrid()
An unset srid indicates a CoordRef object that is not stored in the database.
The srid is in a "unset" state when the object is created. The user may also set the srid to a known value, in order to modify a CoordRef already stored into a CoordRefManager instance.
setSrid(int)
,
CoordRefManager.put(com.ibm.spatial.srs.CoordRef)
public void setExtent(Envelope env)
If the envelope doesn't have a Z or a M extent, then the existing Z and M extents of this coordinate reference are left unchanged.
env
- the extent of coordinates that are covered by this
object.public void setXY(double falseX, double falseY, double xyUnits)
falseX
- false X originfalseY
- false Y originxyUnits
- scale factor for both x and y coordinatespublic void setZ(double falseZ, double zUnits)
falseZ
- false Z originzUnits
- scale factor for the Z coordinatespublic void setM(double falseM, double mUnits)
falseM
- false M originmUnits
- scale factor for the M coordinatespublic long convertXValueToSystem(double planarValue) throws SpatialException
planarValue
- The world coordinate value.
SpatialException
- if the value is outside of the coordinate
reference boundspublic long convertYValueToSystem(double planarValue) throws SpatialException
planarValue
- The world coordinate value.
SpatialException
- if the value is outside of the coordinate
reference boundspublic long convertZValueToSystem(double planarValue) throws SpatialException
planarValue
- The world coordinate value.
SpatialException
- if the value is outside of the coordinate
reference boundspublic long convertMValueToSystem(double planarValue) throws SpatialException
planarValue
- The world coordinate value.
SpatialException
- if the value is outside of the coordinate
reference boundspublic double convertXValueToWorld(long systemValue)
systemValue
- The internal (system) value.
public double[] convertXYValuesToWorld(long[] xy)
xy
- an array of {x,y} coordinate pairs stored as internal
(system) values.
public double[] convertZValuesToWorld(long[] z)
z
- an array of z ordinates stored as internal (system) values.
public double[] convertMValuesToWorld(long[] m)
m
- an array of m ordinates (measures) stored as internal
(system) values.
public double convertYValueToWorld(long systemValue)
systemValue
- The internal (system) value.
public double convertZValueToWorld(long systemValue)
systemValue
- The internal (system) value.
public double convertMValueToWorld(long systemValue)
systemValue
- The internal (system) value.
public CoordRef duplicate()
public boolean sameAs(CoordRef cr, int flags)
cr
- another coordinate reference objectflags
- a combination of the following flag values:
true
if both coordinate reference objects are
equal, otherwise false
.public boolean equals(java.lang.Object anObject)
equals
in class java.lang.Object
anObject
- the object to compare this object against
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object
|
Spatial DataBlade JAVA API v8.21 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |