com.partnersoft.v3x.apps.MapBrowser.rover
Class RoverTiling

java.lang.Object
  extended by com.partnersoft.v3x.apps.MapBrowser.rover.RoverTiling
All Implemented Interfaces:
java.io.Serializable

public class RoverTiling
extends java.lang.Object
implements java.io.Serializable

Describes a tiling of rover images.

See Also:
Serialized Form

Constructor Summary
RoverTiling()
           
 
Method Summary
 DoubleRectangle expandToMatchTiling(DoubleRectangle original)
          This is the same as groundCoveredBy(tilesCovering(groundRect)).
 DoubleRectangle getExtents()
           
 boolean getGraphicsOnly()
           
 double getLineGranularity()
          The minimum length of lines in this tiling.
 double getOriginX()
           
 double getOriginY()
           
 boolean getRetainShortLines()
           
 double getTileHeight()
           
 double getTileSize()
           
 double getTileWidth()
           
 boolean getUseSpecifiedGranularity()
           
 DoubleRectangle groundCoveredBy(IntegerRectangle tiles)
          Returns the DoubleRectangle of ground coordinates matching the given IntegerRectangle of tiles.
 DoubleRectangle groundCoveredBy(int x, int y)
          Returns the DoubleRectangle of ground coordinates for the given tile.
 boolean hasExtents()
           
 Coord2D originOf(Coord2D tile)
          Returns the origin in ground coordinates of the given image tile.
 Coord2D originOf(int x, int y)
          Returns the origin in ground coordinates of the given image tile.
 long packedTileCovering(Coord2D coord)
          Returns the x,y location of the tile containing the given ground coordinate as a PackedSheetCoord long.
 long packedTileCovering(double x, double y)
          Returns the x,y location of the tile containing the given ground coordinate as a PackedSheetCoord long.
 void setExtents(DoubleRectangle newExtents)
           
 void setGraphicsOnly(boolean tizit)
           
 void setLineGranularity(double newGranularity)
           
 void setOriginX(double newOriginX)
           
 void setOriginY(double newOriginY)
           
 void setRetainShortLines(boolean tizit)
           
 void setTileHeight(double newTileHeight)
           
 void setTileSize(double newTileSize)
           
 void setTileWidth(double newTileWidth)
           
 void setUseSpecifiedGranularity(boolean tizit)
           
 Coord2D tileCovering(Coord2D coord)
          Returns the x,y location of the tile containing the given ground coordinate.
 IntegerRectangle tilesCovering(DoubleRectangle groundRect)
          Returns the smallest IntegerRectangle of tiles containing the given DoubleRectangle of ground coordinates.
 double tileToX(int column)
          Returns the x coordinate of the left edge of the given tile column.
 double tileToY(int row)
          Returns the y coordinate of the bottom edge of the given tile row.
 java.lang.String toString()
           
 int xToTile(double x)
          Returns the X coordinate of the tile column with the given ground coordinate.
 int yToTile(double y)
          Returns the Y coordinate of the tile row with the given ground coordinate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RoverTiling

public RoverTiling()
Method Detail

xToTile

public int xToTile(double x)
Returns the X coordinate of the tile column with the given ground coordinate.


yToTile

public int yToTile(double y)
Returns the Y coordinate of the tile row with the given ground coordinate.


tileToX

public double tileToX(int column)
Returns the x coordinate of the left edge of the given tile column.


tileToY

public double tileToY(int row)
Returns the y coordinate of the bottom edge of the given tile row.


tileCovering

public Coord2D tileCovering(Coord2D coord)
Returns the x,y location of the tile containing the given ground coordinate.


packedTileCovering

public long packedTileCovering(Coord2D coord)
Returns the x,y location of the tile containing the given ground coordinate as a PackedSheetCoord long.


packedTileCovering

public long packedTileCovering(double x,
                               double y)
Returns the x,y location of the tile containing the given ground coordinate as a PackedSheetCoord long.


originOf

public Coord2D originOf(Coord2D tile)
Returns the origin in ground coordinates of the given image tile.


originOf

public Coord2D originOf(int x,
                        int y)
Returns the origin in ground coordinates of the given image tile.


tilesCovering

public IntegerRectangle tilesCovering(DoubleRectangle groundRect)
Returns the smallest IntegerRectangle of tiles containing the given DoubleRectangle of ground coordinates.


groundCoveredBy

public DoubleRectangle groundCoveredBy(IntegerRectangle tiles)
Returns the DoubleRectangle of ground coordinates matching the given IntegerRectangle of tiles.


groundCoveredBy

public DoubleRectangle groundCoveredBy(int x,
                                       int y)
Returns the DoubleRectangle of ground coordinates for the given tile.


expandToMatchTiling

public DoubleRectangle expandToMatchTiling(DoubleRectangle original)
This is the same as groundCoveredBy(tilesCovering(groundRect)). It expands the ground coordinate rectangle to "snap to" the lines formed by the tiling.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hasExtents

public boolean hasExtents()

getOriginX

public double getOriginX()

setOriginX

public void setOriginX(double newOriginX)

getOriginY

public double getOriginY()

setOriginY

public void setOriginY(double newOriginY)

getTileWidth

public double getTileWidth()

setTileWidth

public void setTileWidth(double newTileWidth)

getTileHeight

public double getTileHeight()

setTileHeight

public void setTileHeight(double newTileHeight)

setTileSize

public void setTileSize(double newTileSize)

getTileSize

public double getTileSize()

getLineGranularity

public double getLineGranularity()
The minimum length of lines in this tiling. Used during translation to eliminate excessive detail; also can be used as a metric to determine maximum reasonable zoom.


setLineGranularity

public void setLineGranularity(double newGranularity)

getExtents

public DoubleRectangle getExtents()

setExtents

public void setExtents(DoubleRectangle newExtents)

getGraphicsOnly

public boolean getGraphicsOnly()

setGraphicsOnly

public void setGraphicsOnly(boolean tizit)

getUseSpecifiedGranularity

public boolean getUseSpecifiedGranularity()

setUseSpecifiedGranularity

public void setUseSpecifiedGranularity(boolean tizit)

getRetainShortLines

public boolean getRetainShortLines()

setRetainShortLines

public void setRetainShortLines(boolean tizit)