| Programming with JViews Maps > Ellipsoid and Geodetic Datums > Map Projections > Projection Methods and Parameters |
Projection Methods and Parameters |
INDEX
PREVIOUS
NEXT
|
This section describes projection methods and parameters. It covers the following topics:
Projections are implemented using the forward and inverse methods:
forward() method converts a geographic point, defined by a longitude and a latitude, to its Cartesian coordinates.
inverse() method converts Cartesian coordinates to a latitude and a longitude.
These methods can throw exceptions of two different types that both inherit from the class IlvProjectionException:
IlvUnsupportedProjectionFeature exception is thrown when a feature that is not implemented is called. It originates from the following actions:
IlsEquidistantCylindricalProjection for example).
IlvToleranceConditionException exception is thrown when an error occurs during computation.
To know whether these features are implemented in the projection you are using, use the methods IlvProjection.isEllipsoidEnabled and IlvProjection.isInverseEnabled.
Following are the parameters that you can set for a projection:
IlvEllipsoid.SPHERE. Only some specific projections, such as the Universal Transverse Mercator or the Universal Polar Stereographic, use a nonspherical ellipsoid by default.
IlvProjection.setEllipsoid(). IlvProjection projection = new IlvMercatorProjection(); projection.setEllipsoid(IlvEllipsoid.WGS84); |
IlvEllipsoid, which defines a number of commonly used ellipsoids, or create your own ellipsoid as explained in the section Defining New Ellipsoids. You can also use one of the predefined ellipsoids listed in the section Predefined Ellipsoids.
setLLCenter() method. Projections produce less distortion near their center.
setXYOffset(). The offset can be used in conjunction with the unit converters to control the range of projected coordinates for a region. For example, the range of the region may be set so that the region fits into a square of size 200 x 200. In JViews Maps applications, the range of the data is not an issue, since a transformer can be automatically applied to fit all the graphics contained in an IlvManager into a window. Therefore, false easting and false northing are mainly used to adapt a projection to geographic data that has already been projected using a Cartesian offset.
You can also:
setGeocentric() method.
tan phiG = (1 - e ^ 2) tan phi where e is the eccentricity of the ellipsoid used to model the shape of the Earth.
[-PI;PI] or accepts any longitude, using the method setUsingLongitudeReduction().
The above parameters are common to all the projections. They can be set with the API of the class IlvProjection, which is the base class of all the projections in the package. Some projections have additional specific parameters. For example, secant latitudes can be specified for a conic projection, or the latitude of the true scale can be specified for most cylindrical projections. For more information, refer to the documentation of the API for each projection.
The class IlvProjectionUtil provides conversion utilities to convert radians to degrees, and vice versa.
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. Legal terms. | PREVIOUS NEXT |