ilog.cpl.network
Class IlpGeographicPositionConverter

java.lang.Object
  extended by ilog.cpl.graph.IlpDefaultPositionConverter
      extended by ilog.cpl.network.IlpGeographicPositionConverter
All Implemented Interfaces:
IlpPositionConverter

public class IlpGeographicPositionConverter
extends IlpDefaultPositionConverter

This class implements conversions between points in geographic coordinates and in x,y coordinates, as well as the usual conversions supported by IlpDefaultPositionConverter.

Since:
JTGO 3.0
See Also:
IlpGeographicPosition, IlvProjection, IlvProjectionUtil, IlvMathTransform, IlvProjectionTransform

Constructor Summary
IlpGeographicPositionConverter(IlvCoordinateTransformation transformation, boolean invertY)
          Creates a new geographic coordinates converter, based on a coordinate transformation.
IlpGeographicPositionConverter(IlvCoordinateTransformation transformation, boolean invertY, IlvTransformer transformer)
          Creates a new geographic coordinates converter, based on a coordinate transformation.
IlpGeographicPositionConverter(IlvMathTransform transform)
          Creates a new geographic coordinates converter, based on an ellipsoidal coordinate transform.
IlpGeographicPositionConverter(IlvMathTransform transform, IlvTransformer transformer)
          Creates a new geographic coordinates converter, based on an ellipsoidal coordinate transform.
IlpGeographicPositionConverter(IlvProjection projection, boolean invertY)
          Creates a new geographic coordinates converter, based on a projection.
IlpGeographicPositionConverter(IlvProjection projection, boolean invertY, IlvTransformer transformer)
          Creates a new geographic coordinates converter, based on a projection.
 
Method Summary
 int getDMSFractionalDigits()
          Returns the desired number of fractional digits of the seconds in the DMS representation of IlpGeographicPosition values.
 IlpPosition getModelPosition(IlpPosition viewLocation)
          Converts a position/shape in the view to a user-defined position/shape.
 IlpPosition getViewLocation(IlpPosition modelPosition)
          Converts a user-defined position/shape to a position/shape for the view.
 void setDMSFractionalDigits(int digits)
          Sets the desired number of fractional digits of the seconds in the DMS representation of IlpGeographicPosition values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlpGeographicPositionConverter

public IlpGeographicPositionConverter(IlvProjection projection,
                                      boolean invertY)
Creates a new geographic coordinates converter, based on a projection.

Parameters:
projection - A plane-to-spherical coordinates converter.
invertY - Whether to reverse top/bottom.

IlpGeographicPositionConverter

public IlpGeographicPositionConverter(IlvProjection projection,
                                      boolean invertY,
                                      IlvTransformer transformer)
Creates a new geographic coordinates converter, based on a projection.

Parameters:
projection - A plane-to-spherical coordinates converter.
invertY - Whether to reverse top/bottom.
transformer - An additional affine plane transform.

IlpGeographicPositionConverter

public IlpGeographicPositionConverter(IlvMathTransform transform)
Creates a new geographic coordinates converter, based on an ellipsoidal coordinate transform.

Parameters:
transform - A plane-to-spherical coordinates converter.

IlpGeographicPositionConverter

public IlpGeographicPositionConverter(IlvMathTransform transform,
                                      IlvTransformer transformer)
Creates a new geographic coordinates converter, based on an ellipsoidal coordinate transform.

Parameters:
transform - A plane-to-spherical coordinates converter.
transformer - An additional affine plane transform.

IlpGeographicPositionConverter

public IlpGeographicPositionConverter(IlvCoordinateTransformation transformation,
                                      boolean invertY)
Creates a new geographic coordinates converter, based on a coordinate transformation.

Parameters:
transformation - A plane-to-spherical coordinates converter.
invertY - Whether to reverse top/bottom.

IlpGeographicPositionConverter

public IlpGeographicPositionConverter(IlvCoordinateTransformation transformation,
                                      boolean invertY,
                                      IlvTransformer transformer)
Creates a new geographic coordinates converter, based on a coordinate transformation.

Parameters:
transformation - A plane-to-spherical coordinates converter.
invertY - Whether to reverse top/bottom.
transformer - An additional affine plane transform.
Method Detail

getDMSFractionalDigits

public int getDMSFractionalDigits()
Returns the desired number of fractional digits of the seconds in the DMS representation of IlpGeographicPosition values.


setDMSFractionalDigits

public void setDMSFractionalDigits(int digits)
Sets the desired number of fractional digits of the seconds in the DMS representation of IlpGeographicPosition values.

Parameters:
digits - Number of decimal digits to be kept after the decimal point of the seconds in DMS.

getViewLocation

public IlpPosition getViewLocation(IlpPosition modelPosition)
Converts a user-defined position/shape to a position/shape for the view.

Specified by:
getViewLocation in interface IlpPositionConverter
Overrides:
getViewLocation in class IlpDefaultPositionConverter
Returns:
An instance of IlpPoint, IlpRect, IlpPolyline, or IlpPolygon.

getModelPosition

public IlpPosition getModelPosition(IlpPosition viewLocation)
Converts a position/shape in the view to a user-defined position/shape.

Specified by:
getModelPosition in interface IlpPositionConverter
Overrides:
getModelPosition in class IlpDefaultPositionConverter
Parameters:
viewLocation - an instance of IlpPoint, IlpRect, IlpPolyline, or IlpPolygon


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