com.partnersoft.geometry
Class Scale

java.lang.Object
  extended by com.partnersoft.geometry.Scale
All Implemented Interfaces:
Immutable

public class Scale
extends java.lang.Object
implements Immutable

An abstract representation of a scale, with automatic conversion to fixed ratio.

Copyright 2008 Partner Software, Inc.

Version:
$Id$
Author:
Paul Reavis

Method Summary
static Scale forMapScale(double mapScale)
          Returns a corresponding scale derived from the "map scale" - generally the inverse of the ratio.
static Scale forPixelFeet(double pixelSize)
          Returns a corresponding Scale derived from the size (width and height) of a single pixel (1/144 inch) in feet.
static Scale forPointFeet(double pointSize)
          Returns a corresponding Scale derived from the size (width and height) of a single point (1/72 inch) in feet.
static Scale forRatio(double ratio)
          Returns a corresponding scale derived from a ratio - e.g.
 double getMapScale()
           
 double getPixelFeet()
           
 double getPointFeet()
           
 double getRatio()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

forMapScale

public static Scale forMapScale(double mapScale)
Returns a corresponding scale derived from the "map scale" - generally the inverse of the ratio. E.g. for a 1:100 scale this number is 100.


forRatio

public static Scale forRatio(double ratio)
Returns a corresponding scale derived from a ratio - e.g. 1:100 scale is a ratio of 0.01.


forPixelFeet

public static Scale forPixelFeet(double pixelSize)
Returns a corresponding Scale derived from the size (width and height) of a single pixel (1/144 inch) in feet.

Parameters:
pixelSize -
Returns:

forPointFeet

public static Scale forPointFeet(double pointSize)
Returns a corresponding Scale derived from the size (width and height) of a single point (1/72 inch) in feet.

Parameters:
pointSize -
Returns:

getRatio

public double getRatio()

getMapScale

public double getMapScale()

getPixelFeet

public double getPixelFeet()

getPointFeet

public double getPointFeet()