skip to main content
Defense > Programmer's documentation > Programming with JViews Maps > Ellipsoid and geodetic datums > Geodetic datums
 
Geodetic datums
Datums
Geodetic datums (or “horizontal datums”) help in the process of approximation of the Earth surface by providing a translation and an optional rotation of an ellipsoid relative to an arbitrary center of Earth. These translation and rotation parameters are called the “to WGS84” parameters, with reference to the WGS84 datum that defines no translation and no definition.
The most used datums specify only a translation from the center of the Earth and no rotations. That is why JViews Maps does not provide standard support for datums with rotations, though it is possible to use them in coordinate transformations. See the section Affine Transform.
Defining a new horizontal datum
JViews Maps supports the definition of three-parameter datums, that is datums defined by the shift on three axes. This kind of datum is represented by the IlvHorizontalShiftDatum class.
A horizontal shift datum is defined by the following elements:
*Its name
The name should be set to null in case it is not defined.
*The area of definition
This is a String describing the area of use of the datum.
*A default ellipsoid
Although the datums can be used with different ellipsoids, they were designed to work with this specific ellipsoid.
*The three-axis shift parameters (expressed in meters)
To define a new horizontal shift datum, initialize a new instance with the three parameters, as follows:
 
IlvHorizontalDatum datum =
   new IlvHorizontalShiftDatum("European 1979","Mean for europe",
      IlvEllipsoidCollection.GetKernelCollection().getEllipsoid("intl"),
         86, -98, -119)
Predefined datums
The IlvHorizontalDatumCollection class manages lists of predefined horizontal datums. The list of predefined datums in the JViews Maps package, or kernel collection, can be retrieved using the GetKernelCollection method.
Like Ellipsoid collections, horizontal datum collections are read from XML files containing the definitions. The DTD for these definition files is as follows:
 
<!DOCTYPE datum-list [
  <!ELEMENT datum EMPTY>
  <!ATTLIST datum
     name CDATA #REQUIRED
     region CDATA #IMPLIED
     ellipsoid CDATA #REQUIRED
     dx CDATA #REQUIRED
     dy CDATA #REQUIRED
     dz CDATA #REQUIRED
     ex CDATA #IMPLIED
     ey CDATA #IMPLIED
     ez CDATA #IMPLIED
     ppm CDATA #IMPLIED
  >
 
  <!ELEMENT datum-ref EMPTY>
  <!ATTLIST datum-ref
     ref CDATA #REQUIRED
     id CDATA #REQUIRED
  >
 
  <!ELEMENT datum-list (datum|datum-ref)* >
]>
In a horizontal datum definition file, you can find:
*A horizontal datum
Defined by its name and its parameters. The required parameters are the ellipsoid to be used with this datum and the three-axis shifts dx, dy and dz. Note that you can define the parameters for seven-parameter datums, but the ex, ey, ez and ppm fields are not used in the current version of JViews Maps.
*An alias for a horizontal datum
Defined in the kernel collection of Maps. For an alias, the required information is the id of the datum and the reference of the datum. When retrieving a datum alias from a collection, the datum is searched for using its id as a key, while the name of the returned datum is the one defined in the kernel collection.
The following XML file defines the Afgooye datum, while setting an alias for the NAD 27 datum
 
<datum-list>
  <datum name="Afgooye"
         region="Somalia"
         ellipsoid="krass"
         dx="-43"
         dy="-163"
         dz="-45"
  />
 
   <datum-ref id="NAD27"
              ref="NAD27 (CONUS)"
   />
</datum-list>
NOTE JViews Maps comes with a default list of datums. Over time, many datums were tuned for given regions of use, while keeping the same name. This causes many datums to have the same name but different parameters. In applications where strict conformance to some datums is needed, you should use your own datum definition instead of relying on the list provided in JViews Maps.

Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.