Class GeoDatum
- java.lang.Object
-
- com.supermap.data.GeoDatum
-
public class GeoDatum extends java.lang.Object
The GeoDatum class.
This class contains the earth spheroid parameters.
The Earth Ellipsoid is only a simple description to the size and shape of the Earth. For more accurate description of the real position of objects on Earth, it is required to introduce the earth reference system which has decided the relative position between the earth spheroid and the centroid of the Earth to provide a frame for surveying the objects on the Earth and the origin and direction of surface Lat/Lon Grid. The earth reference system (Datum) thought the centre of ellipsoid as origin. The Earth Ellipsoid in a region's datum may offset the true center of the Earth more or less, but it is the best description to the surface of this region. The coordinates of all the objects in the surface are relative to this ellipsoid enter. Up to now, the general used datum is WGS84 which acts as the basic frame for Geodesy. Different datum is suited for different countries and regions. One Datum can not be applied to any regions.
-
-
Constructor Summary
Constructors Constructor and Description GeoDatum()
Constructs a new GeoDatum object.GeoDatum(GeoDatum geoDatum)
Constructs a new object identical to the given GeoDatum object.GeoDatum(GeoDatumType type)
Creates a new GeoDatum object according to the specified arguments.GeoDatum(GeoSpheroid geoSpheroid, java.lang.String name)
Creates a new GeoDatum object according to the specified arguments.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description GeoDatum
clone()
Return a copy of the current GeoDatum object.void
dispose()
Disposes the resources occupied by the object.boolean
fromXML(java.lang.String xml)
Creates a GeoDatum object with the specified XML string.GeoSpheroid
getGeoSpheroid()
Returns the spheroid object of the datum.java.lang.String
getName()
Returns the name of the GeoDatum object.GeoDatumType
getType()
Returns the type of the GeoDatum object.void
setGeoSpheroid(GeoSpheroid value)
Sets the spheroid object of the datum.void
setName(java.lang.String value)
Sets the name of the GeoDatum.void
setType(GeoDatumType value)
Sets the type of the datum.java.lang.String
toXML()
Exports the XML string represents the GeoDatum object.
-
-
-
Constructor Detail
-
GeoDatum
public GeoDatum()
Constructs a new GeoDatum object.
-
GeoDatum
public GeoDatum(GeoDatumType type)
Creates a new GeoDatum object according to the specified arguments.- Parameters:
type
- the GeoDatum type specified.
-
GeoDatum
public GeoDatum(GeoSpheroid geoSpheroid, java.lang.String name)
Creates a new GeoDatum object according to the specified arguments.- Parameters:
geoSpheroid
- Earth Ellipsoidname
- the name of the GeoDatum .
-
GeoDatum
public GeoDatum(GeoDatum geoDatum)
Constructs a new object identical to the given GeoDatum object.- Parameters:
geoDatum
- The specified GeoDatum object.
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the name of the GeoDatum object.- Returns:
- the name of the GeoDatum object.
- Default:
- the default value is "User Define".
-
setName
public void setName(java.lang.String value)
Sets the name of the GeoDatum.- Parameters:
value
- the name of the GeoDatum object.
-
getGeoSpheroid
public GeoSpheroid getGeoSpheroid()
Returns the spheroid object of the datum. It is available when the type of datum is user-defined.Generally, the spheroid or ellipsoid is used to describe the Earth's shape and magnitude. For easier to calculate, the Earth can be regard as a spheroid but most times it is regard as an ellipsoid. In general, the Earth's shape is supposing to be a spheroid when the map scale is less than 1:1,000,000. Because under this circumstance, the difference of spheroid and ellipsoid is very small. But for the big scale greater 1:1,000,000, it is necessary to use ellipsoid to approach the Earth. The ellipsoid is based on ellipse, so using two axes to express the magnitude of the Earth, that is the major axis (radius of the equator) and the minor axis (radius of the polar).
- Returns:
- the earth spheroid object.
- Default:
- The default value is an empty
GeoSpheroid
object.
-
setGeoSpheroid
public void setGeoSpheroid(GeoSpheroid value)
Sets the spheroid object of the datum. It is available when the type of datum is user-defined.Generally, the spheroid or ellipsoid is used to describe the Earth's shape and magnitude. For easier to calculate, the Earth can be regard as a spheroid but most times it is regard as an ellipsoid. In general, the Earth's shape is supposing to be a spheroid when the map scale is less than 1:1,000,000. Because under this circumstance, the difference of spheroid and ellipsoid is very small. But for the big scale greater 1:1,000,000, it is necessary to use ellipsoid to approach the Earth. The ellipsoid is based on ellipse, so using two axes to express the magnitude of the Earth, that is the major axis (radius of the equator) and the minor axis (radius of the polar).
- Parameters:
value
- The earth spheroid object.
-
getType
public GeoDatumType getType()
Returns the type of the GeoDatum object.When the datum is defined by the user, it is required to specify ellipsoid parameters; other values are predefined by SuperMap Objects Java. Refer to
GeoDatumType
.- Returns:
- the type of the GeoDatum object.
- Default:
- The default value is
DATUM_WGS_1984
.
-
setType
public void setType(GeoDatumType value)
Sets the type of the datum.When the datum is defined by the user, it is required to specify ellipsoid parameters; other values are predefined by SuperMap Objects Java. Refer to
GeoDatumType
.- Parameters:
value
- the type of the GeoDatum object.
-
clone
public GeoDatum clone()
Return a copy of the current GeoDatum object.- Overrides:
clone
in classjava.lang.Object
- Returns:
- The new GeoDatum object generated from the clone operation.
-
fromXML
public boolean fromXML(java.lang.String xml)
Creates a GeoDatum object with the specified XML string.- Parameters:
xml
- The specified XML string.- Returns:
- Returns true, if successful; otherwise, false.
-
toXML
public java.lang.String toXML()
Exports the XML string represents the GeoDatum object.- Returns:
- the XML string represents the GeoDatum object.
-
dispose
public void dispose()
Disposes the resources occupied by the object. After calling this method, this object will not be usable.
-
-