ilog.views.maps.projection
Class IlvObliqueMercatorProjection

java.lang.Object
  extended by ilog.views.maps.projection.IlvProjection
      extended by ilog.views.maps.projection.IlvObliqueMercatorProjection
All Implemented Interfaces:
IlvPersistentObject, Serializable

public class IlvObliqueMercatorProjection
extends IlvProjection

The Oblique Mercator Projection.
The Oblique Mercator Projection is a basically a Mercator projection, but in which the projection cylinder is not tangent at the equator anymore.

This projection applies both to spherical and non-spherical ellipsoids and implements an inverse function.

This projection is also known as Hotine Oblique Mercator

This projection is Conformal.

Since:
JViews 5.0
See Also:
Serialized Form

Field Summary
 
Fields inherited from class ilog.views.maps.projection.IlvProjection
CONFORMAL, EQUAL_AREA, NONE
 
Constructor Summary
IlvObliqueMercatorProjection()
          Creates an instance of IlvObliqueMercatorProjection.
IlvObliqueMercatorProjection(IlvCoordinate center, double azimuth)
          Creates an instance of IlvObliqueMercatorProjection.
IlvObliqueMercatorProjection(IlvCoordinate p1, IlvCoordinate p2)
          Creates an instance of IlvObliqueMercatorProjection.
IlvObliqueMercatorProjection(IlvInputStream stream)
          Reads the object from an IlvInputStream.
IlvObliqueMercatorProjection(IlvObliqueMercatorProjection source)
          Creates a new IlvObliqueMercatorProjection by copying an existing one.
 
Method Summary
 IlvProjection copy()
          Copies the projection.
protected  void eForward(IlvCoordinate ll)
          Implements the projection for an ellipsoid.
protected  void eInverse(IlvCoordinate xy)
          Implements the inverse projection for an ellipsoid.
 double getAzimuth()
          Returns the projection azimuth.
 double getAzimuthalMeridian()
          Returns the azimuthal meridian.
 double getScaleFactor()
          Returns the scale factor applied to the projected data.
 boolean isCoordinateRotation()
          Returns true if the Cartesian coordinates are rotated by the opposite of the azimuth of this projection.
 boolean isUsingAzimuthalDefinition()
          Returns true when the projection is in azimutal definition.
 void setCoordinateRotation(boolean rot)
          Sets whether the Cartesian coordinates are rotated by the opposite of the azimuth of this projection.
 void setEllipsoid(IlvEllipsoid ellipsoid)
          Sets the ellipsoid used for the projection.
 void setProjectionCenter(IlvCoordinate center, double azimuth)
          Sets the projection origin an azimuth.
 void setProjectionCylinders(IlvCoordinate p1, IlvCoordinate p2)
          Sets the two points defining this projection.
 void setScaleFactor(double k0)
          Sets a scale factor applied to the projected data.
protected  void sForward(IlvCoordinate ll)
          Implements the projection for a sphere.
protected  void sInverse(IlvCoordinate xy)
          Implements the inverse projection for a sphere.
 String toString()
          Converts the projection to a string with Evenden's format.
 void write(IlvOutputStream stream)
          Writes the object to an IlvOutputStream.
 
Methods inherited from class ilog.views.maps.projection.IlvProjection
addDescription, adjustLongitude, equals, forward, forward, getCentralMeridian, getCentralParallel, getDatum, getEllipsoid, getFalseEasting, getFalseNorthing, GetProjection, getProperty, getUnit, getXYOffset, inverse, inverse, inverse, isEllipsoidEnabled, isGeocentric, isInverseEnabled, isUsingLongitudeReduction, setCentralMeridian, setCentralParallel, setDatum, setFalseEasting, setFalseNorthing, setGeocentric, setLLCenter, setUnit, setUsingLongitudeReduction, setXYOffset
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IlvObliqueMercatorProjection

public IlvObliqueMercatorProjection(IlvCoordinate p1,
                                    IlvCoordinate p2)
                             throws IlvBadProjectionParameter
Creates an instance of IlvObliqueMercatorProjection.
The two specified points defined a great circle, central line of each point. This great circle is the intersection with the ellipsoid and the projection cylinder.

Parameters:
p1 - The first point.
p2 - The second point.
Throws:
IlvBadProjectionParameter - If the points lead to a bad projection.

IlvObliqueMercatorProjection

public IlvObliqueMercatorProjection(IlvCoordinate center,
                                    double azimuth)
                             throws IlvBadProjectionParameter
Creates an instance of IlvObliqueMercatorProjection.
Creates a new instance defined by an origin and an azimuth, measured clockwise from north, of the central line of the projection.

Parameters:
center - The projection center.
azimuth - The azimuth, expressed in radians.
Throws:
IlvBadProjectionParameter - If the parameters lead to a bad projection.

IlvObliqueMercatorProjection

public IlvObliqueMercatorProjection()
Creates an instance of IlvObliqueMercatorProjection.
Creates a new instance with the center at (0E,0N) and an azimuth of 45 degrees.


IlvObliqueMercatorProjection

public IlvObliqueMercatorProjection(IlvInputStream stream)
                             throws IlvReadFileException
Reads the object from an IlvInputStream.

Parameters:
stream - The input stream.
Throws:
IlvReadFileException - If the format is not correct.

IlvObliqueMercatorProjection

public IlvObliqueMercatorProjection(IlvObliqueMercatorProjection source)
Creates a new IlvObliqueMercatorProjection by copying an existing one.

Parameters:
source - The projection that is copied.
Method Detail

write

public void write(IlvOutputStream stream)
           throws IOException
Writes the object to an IlvOutputStream.

Specified by:
write in interface IlvPersistentObject
Overrides:
write in class IlvProjection
Parameters:
stream - The output stream.
Throws:
IOException - thrown when an exception occurs during the write operation for this object.

copy

public IlvProjection copy()
Copies the projection.

Specified by:
copy in class IlvProjection
Returns:
A copy of the projection.

setProjectionCylinders

public void setProjectionCylinders(IlvCoordinate p1,
                                   IlvCoordinate p2)
                            throws IlvBadProjectionParameter
Sets the two points defining this projection.
The two specified points defined a great circle, central line of each point. This great circle is the intersection with the ellipsoid and the projection cylinder.

Parameters:
p1 - The first point.
p2 - The second point.
Throws:
IlvBadProjectionParameter - If the points lead to a bad projection.

setProjectionCenter

public void setProjectionCenter(IlvCoordinate center,
                                double azimuth)
                         throws IlvBadProjectionParameter
Sets the projection origin an azimuth.
The azimuth is measured in radians clockwise from north of the central line of the projection.

Parameters:
center - The projection center.
azimuth - The azimuth, expressed in radians.
Throws:
IlvBadProjectionParameter - If the parameters lead to a bad projection.

isCoordinateRotation

public boolean isCoordinateRotation()
Returns true if the Cartesian coordinates are rotated by the opposite of the azimuth of this projection.


setCoordinateRotation

public void setCoordinateRotation(boolean rot)
Sets whether the Cartesian coordinates are rotated by the opposite of the azimuth of this projection.


setScaleFactor

public void setScaleFactor(double k0)
Sets a scale factor applied to the projected data. By default, the scale factor is 1.

Parameters:
k0 - The scale factor.

getScaleFactor

public double getScaleFactor()
Returns the scale factor applied to the projected data.


eForward

protected void eForward(IlvCoordinate ll)
                 throws IlvToleranceConditionException
Implements the projection for an ellipsoid.

Overrides:
eForward in class IlvProjection
Parameters:
ll - The longitude/latitude coordinates in radians (x = longitude, y = latitude).
Throws:
IlvToleranceConditionException - If the values are not within the tolerated limits.

eInverse

protected void eInverse(IlvCoordinate xy)
                 throws IlvToleranceConditionException
Implements the inverse projection for an ellipsoid.

Overrides:
eInverse in class IlvProjection
Parameters:
xy - The Cartesian coordinates.
Throws:
IlvToleranceConditionException - If the values are not within the tolerated limits.
See Also:
IlvProjection.inverse(ilog.views.IlvPoint), IlvProjection.isEllipsoidEnabled(), IlvProjection.isInverseEnabled()

sForward

protected void sForward(IlvCoordinate ll)
                 throws IlvToleranceConditionException
Implements the projection for a sphere.

Specified by:
sForward in class IlvProjection
Parameters:
ll - The longitude/latitude coordinates in radians (x = longitude, y = latitude).
Throws:
IlvToleranceConditionException - If the values are not within the tolerated limits.

sInverse

protected void sInverse(IlvCoordinate xy)
                 throws IlvToleranceConditionException
Implements the inverse projection for a sphere.

Overrides:
sInverse in class IlvProjection
Parameters:
xy - The Cartesian coordinates.
Throws:
IlvToleranceConditionException - If the values are not within the tolerated limits.
See Also:
IlvProjection.inverse(ilog.views.IlvPoint), IlvProjection.isInverseEnabled()

setEllipsoid

public void setEllipsoid(IlvEllipsoid ellipsoid)
Sets the ellipsoid used for the projection. This function also updates the projection parameters for the given ellipsoid.

Overrides:
setEllipsoid in class IlvProjection
Parameters:
ellipsoid - The ellipsoid.
See Also:
IlvEllipsoid

toString

public String toString()
Converts the projection to a string with Evenden's format.

Overrides:
toString in class Object

getAzimuth

public double getAzimuth()
Returns the projection azimuth. This method is only valid when the projection is in azimutal definition.

Returns:
the azimuth as defined using setProjectionCenter(IlvCoordinate, double)
Since:
JViews 7.5
See Also:
isUsingAzimuthalDefinition()

getAzimuthalMeridian

public double getAzimuthalMeridian()
Returns the azimuthal meridian. This method is only valid when the projection is in azimutal definition. The value returned is equal to the x member of the center. The y member of the center is available using IlvProjection.getCentralParallel()

Returns:
the azimuthal meridian as defined using setProjectionCenter(IlvCoordinate, double)
Since:
JViews 7.5
See Also:
isUsingAzimuthalDefinition()

isUsingAzimuthalDefinition

public boolean isUsingAzimuthalDefinition()
Returns true when the projection is in azimutal definition. by using setProjectionCenter(IlvCoordinate, double).

Returns:
true if the azimuthal formulas are used.
Since:
JViews 7.5


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.