es.prodevelop.gvsig.mobile.fmap.proj
Class Projection

java.lang.Object
  extended byes.prodevelop.gvsig.mobile.fmap.proj.Projection
All Implemented Interfaces:
IProjection

public class Projection
extends java.lang.Object
implements IProjection

Basic projection class.

Author:
jldominguez
See Also:
GeoUtils

Constructor Summary
Projection(java.lang.String ab, java.lang.String u, double meters_per_unit)
          Constructor
 
Method Summary
 java.lang.String getAbrev()
           
 double getMetersPerProjUnit()
           
 double getScale(double minX, double maxX, double img_width, double dpi)
          Computes the current scale
 java.lang.String getUnitsAbbrev()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Projection

public Projection(java.lang.String ab,
                  java.lang.String u,
                  double meters_per_unit)
Constructor

Parameters:
ab - abbreviation
Method Detail

getScale

public double getScale(double minX,
                       double maxX,
                       double img_width,
                       double dpi)
Description copied from interface: IProjection
Computes the current scale

Specified by:
getScale in interface IProjection
Parameters:
minX - min x value (map units)
maxX - max x value (map units)
img_width - map width in pixels
dpi - dots per inch
Returns:
the current scale (return 1000 if current scale is 1:1000)
See Also:
IProjection.getScale(double, double, double, double)

getAbrev

public java.lang.String getAbrev()
Specified by:
getAbrev in interface IProjection
Returns:
the projection EPSG abbreviation
See Also:
IProjection.getAbrev()

getUnitsAbbrev

public java.lang.String getUnitsAbbrev()
Specified by:
getUnitsAbbrev in interface IProjection
Returns:
the abbreviation of the unit used ("m", "º", etc)
See Also:
IProjection.getUnitsAbbrev()

getMetersPerProjUnit

public double getMetersPerProjUnit()
Specified by:
getMetersPerProjUnit in interface IProjection
Returns:
the length of 1 map unit.
See Also:
IProjection.getMetersPerProjUnit()