Java Doc for GridGeometry2D.java in  » GIS » GeoTools-2.4.1 » org » geotools » coverage » grid » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoTools 2.4.1 » org.geotools.coverage.grid 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.geotools.coverage.grid.GeneralGridGeometry
      org.geotools.coverage.grid.GridGeometry2D

GridGeometry2D
public class GridGeometry2D extends GeneralGridGeometry (Code)
Describes the valid range of grid coordinates and the math transform, in the special case where only 2 dimensions are in use. By "in use", we means dimension with more than 1 pixel. For example a grid size of 512×512×1 pixels can be represented by this GridGeometry2D class (some peoples said 2.5D) because a two-dimensional grid coordinate is enough for referencing a pixel without ambiguity. But a grid size of 512×512×2 pixels can not be represented by this GridGeometry2D , because a three-dimensional coordinate is mandatory for referencing a pixel without ambiguity.
since:
   2.1
version:
   $Id: GridGeometry2D.java 27070 2007-09-19 16:14:49Z desruisseaux $
author:
   Martin Desruisseaux


Field Summary
final public  intaxisDimensionXaxisDimensionY
     The ( GridGeometry2D.gridDimensionX , GridGeometry2D.gridDimensionY ) dimensions in the envelope space.
final public  intgridDimensionXgridDimensionY
     The first ( gridDimensionX ) and second ( gridDimensionY ) dimensions of with greater than 1.

Constructor Summary
 GridGeometry2D(GridGeometry2D gm, CoordinateReferenceSystem crs)
     Constructs a new grid geometry identical to the specified one except for the CRS. Note that this constructor just defines the CRS; it does not reproject the envelope.
public  GridGeometry2D(GridRange gridRange, MathTransform gridToCRS, CoordinateReferenceSystem crs)
     Constructs a new grid geometry from a math transform.
public  GridGeometry2D(GridRange gridRange, Envelope userRange)
     Constructs a new grid geometry from an envelope.
public  GridGeometry2D(GridRange gridRange, Envelope userRange, boolean[] reverse, boolean swapXY)
     Constructs a new grid geometry from an envelope.
public  GridGeometry2D(Rectangle gridRange, Rectangle2D userRange)
     Constructs a new two-dimensional grid geometry.

Method Summary
public  booleanequals(Object object)
     Compares the specified object with this grid geometry for equality.
public  CoordinateReferenceSystemgetCoordinateReferenceSystem2D()
     Returns the two-dimensional part of this grid geometry CRS.
public  Envelope2DgetEnvelope2D()
     Returns the two-dimensional bounding box for the coverage domain in coordinate reference system coordinates.
public  RectanglegetGridRange2D()
     Returns the two-dimensional part of the as a rectangle.
public  MathTransformgetGridToCRS(PixelOrientation orientation)
     Returns a math transform mapping the specified pixel part.
Parameters:
  orientation - The pixel part to map.
public  MathTransform2DgetGridToCRS2D()
     Returns a math transform for the two dimensional part.
public  MathTransform2DgetGridToCRS2D(PixelOrientation orientation)
     Returns a math transform for the two dimensional part.
public  MathTransform2DgetGridToCoordinateSystem2D()
    
public static  Point2DgetPixelTranslation(PixelOrientation orientation)
     Returns the specified position relative to the pixel center. This method returns a value from the following table:

Pixel orientation x y
PixelOrientation.CENTER CENTER 0.0 0.0
PixelOrientation.UPPER_LEFT UPPER_LEFT -0.5-0.5
PixelOrientation.UPPER_RIGHT UPPER_RIGHT +0.5-0.5
PixelOrientation.LOWER_LEFT LOWER_LEFT -0.5+0.5
PixelOrientation.LOWER_RIGHT LOWER_RIGHT +0.5+0.5

Parameters:
  orientation - The pixel orientation.

final  Point2DinverseTransform(Point2D point)
     Transforms a point using the inverse of GridGeometry2D.getGridToCRS2D() .
Parameters:
  point - The point in logical coordinate system.
final  RectangleinverseTransform(Rectangle2D bounds)
     Returns the pixel coordinate of a rectangle containing the specified geographic area.

Field Detail
axisDimensionXaxisDimensionY
final public int axisDimensionXaxisDimensionY(Code)
The ( GridGeometry2D.gridDimensionX , GridGeometry2D.gridDimensionY ) dimensions in the envelope space. They are the (x, y) dimensions after the transform. Those dimensions are usually 0 and 1 respectively.



gridDimensionXgridDimensionY
final public int gridDimensionXgridDimensionY(Code)
The first ( gridDimensionX ) and second ( gridDimensionY ) dimensions of with greater than 1. Those (x, y) dimensions are usually 0 and 1 respectively.




Constructor Detail
GridGeometry2D
GridGeometry2D(GridGeometry2D gm, CoordinateReferenceSystem crs)(Code)
Constructs a new grid geometry identical to the specified one except for the CRS. Note that this constructor just defines the CRS; it does not reproject the envelope. For this reason, this constructor should not be public. It is for internal use by GridCoverageFactory only.



GridGeometry2D
public GridGeometry2D(GridRange gridRange, MathTransform gridToCRS, CoordinateReferenceSystem crs) throws IllegalArgumentException, MismatchedDimensionException(Code)
Constructs a new grid geometry from a math transform. The arguments are passed unchanged to the . However, they must obey to one additional constraint: only two dimensions in the grid range can have a larger than 1.
Parameters:
  gridRange - The valid coordinate range of a grid coverage, or null if none.The lowest valid grid coordinate is zero for BufferedImage, but maybe non-zero for arbitrary RenderedImage. A grid with 512 cells can have aminimum coordinate of 0 and maximum of 512, with 511 as the highest valid index.
Parameters:
  gridToCRS - The math transform which allows for the transformationsfrom grid coordinates (pixel's center) to real world earth coordinates.
Parameters:
  crs - The coordinate reference system for the "real world" coordinates, or null if unknown. This CRS is given to the .
throws:
  MismatchedDimensionException - if the math transform and the CRS doesn't haveconsistent dimensions.
throws:
  IllegalArgumentException - if gridRange has more than 2 dimensions witha larger than 1, or if the math transformcan't transform coordinates in the domain of the specified grid range.
See Also:   RenderedImage.getMinX
See Also:   RenderedImage.getMinY
See Also:   RenderedImage.getWidth
See Also:   RenderedImage.getHeight
since:
   2.2



GridGeometry2D
public GridGeometry2D(GridRange gridRange, Envelope userRange) throws IllegalArgumentException, MismatchedDimensionException(Code)
Constructs a new grid geometry from an envelope. This constructors applies the same heuristic rules than the . However, they must obey to one additional constraint: only two dimensions in the grid range can have a larger than 1.
Parameters:
  gridRange - The valid coordinate range of a grid coverage.
Parameters:
  userRange - The corresponding coordinate range in user coordinate.
throws:
  IllegalArgumentException - if gridRange has more than 2 dimensions witha larger than 1.
throws:
  MismatchedDimensionException - if the grid range and the CRS doesn't haveconsistent dimensions.
since:
   2.2



GridGeometry2D
public GridGeometry2D(GridRange gridRange, Envelope userRange, boolean[] reverse, boolean swapXY) throws IllegalArgumentException, MismatchedDimensionException(Code)
Constructs a new grid geometry from an envelope. The argument are passed unchanged to the . However, they must obey to one additional constraint: only two dimensions in the grid range can have a larger than 1.
Parameters:
  gridRange - The valid coordinate range of a grid coverage.
Parameters:
  userRange - The corresponding coordinate range in user coordinate.
Parameters:
  reverse - Tells for each axis in user space whatever or not itsdirection should be reversed. A null value reverse no axis.
Parameters:
  swapXY - If true , then the two first axis will be interchanged.
throws:
  IllegalArgumentException - if gridRange has more than 2 dimensions witha larger than 1.
throws:
  MismatchedDimensionException - if the grid range and the CRS doesn't haveconsistent dimensions.
since:
   2.2



GridGeometry2D
public GridGeometry2D(Rectangle gridRange, Rectangle2D userRange)(Code)
Constructs a new two-dimensional grid geometry. A math transform will be computed automatically with an inverted y axis (i.e. gridRange and userRange are assumed to have y axis in opposite direction).
Parameters:
  gridRange - The valid coordinate range of a grid coverage.Increasing x values goes right andincreasing y values goes down.
Parameters:
  userRange - The corresponding coordinate range in user coordinate.Increasing x values goes right andincreasing y values goes up.This rectangle must contains entirely all pixels, i.e.the rectangle's upper left corner must coincide withthe upper left corner of the first pixel and the rectangle'slower right corner must coincide with the lower right cornerof the last pixel.




Method Detail
equals
public boolean equals(Object object)(Code)
Compares the specified object with this grid geometry for equality.



getCoordinateReferenceSystem2D
public CoordinateReferenceSystem getCoordinateReferenceSystem2D() throws InvalidGridGeometryException(Code)
Returns the two-dimensional part of this grid geometry CRS. This is usually (but not always) identical to the . The coordinate reference system (never null ).
throws:
  InvalidGridGeometryException - if this grid geometry has no CRS (i.e.()returned false ).
See Also:   GridGeometry2D.getCoordinateReferenceSystem
since:
   2.2



getEnvelope2D
public Envelope2D getEnvelope2D() throws InvalidGridGeometryException(Code)
Returns the two-dimensional bounding box for the coverage domain in coordinate reference system coordinates. If the coverage envelope has more than two dimensions, only the dimensions used in the underlying rendered image are returned. The bounding box in "real world" coordinates (never null ).
throws:
  InvalidGridGeometryException - if this grid geometry has no envelope (i.e.()returned false ).
See Also:   GridGeometry2D.getEnvelope



getGridRange2D
public Rectangle getGridRange2D() throws InvalidGridGeometryException(Code)
Returns the two-dimensional part of the as a rectangle. The grid range (never null ).
throws:
  InvalidGridGeometryException - if this grid geometry has no grid range (i.e.()returned false ).
See Also:   GridGeometry2D.getGridRange
See Also:   RenderedImage.getMinX
See Also:   RenderedImage.getMinY
See Also:   RenderedImage.getWidth
See Also:   RenderedImage.getHeight



getGridToCRS
public MathTransform getGridToCRS(PixelOrientation orientation)(Code)
Returns a math transform mapping the specified pixel part.
Parameters:
  orientation - The pixel part to map. The default value isPixelOrientation.CENTER CENTER. The transform which allows for the transformations from grid coordinatesto real world earth coordinates.
throws:
  InvalidGridGeometryException - if a transform is not availablefor this grid geometry.
since:
   2.3



getGridToCRS2D
public MathTransform2D getGridToCRS2D() throws InvalidGridGeometryException(Code)
Returns a math transform for the two dimensional part. This is a convenience method for working on horizontal data while ignoring vertical or temporal dimensions. The transform which allows for the transformations from grid coordinatesto real world earth coordinates, operating only on two dimensions.The returned transform is often an instance of AffineTransform, whichmake it convenient for interoperability with Java2D.
throws:
  InvalidGridGeometryException - if a two-dimensional transform is not availablefor this grid geometry.
See Also:   GridGeometry2D.getGridToCRS
since:
   2.3



getGridToCRS2D
public MathTransform2D getGridToCRS2D(PixelOrientation orientation)(Code)
Returns a math transform for the two dimensional part. This method is similar to GridGeometry2D.getGridToCRS2D() except that the transform may maps a pixel corner instead of pixel center.
Parameters:
  orientation - The pixel part to map. The default value isPixelOrientation.CENTER CENTER. The transform which allows for the transformations from grid coordinatesto real world earth coordinates.
throws:
  InvalidGridGeometryException - if a two-dimensional transform is not availablefor this grid geometry.
since:
   2.3



getGridToCoordinateSystem2D
public MathTransform2D getGridToCoordinateSystem2D() throws InvalidGridGeometryException(Code)
GridGeometry2D.getGridToCRS2D()



getPixelTranslation
public static Point2D getPixelTranslation(PixelOrientation orientation) throws IllegalArgumentException(Code)
Returns the specified position relative to the pixel center. This method returns a value from the following table:

Pixel orientation x y
PixelOrientation.CENTER CENTER 0.0 0.0
PixelOrientation.UPPER_LEFT UPPER_LEFT -0.5-0.5
PixelOrientation.UPPER_RIGHT UPPER_RIGHT +0.5-0.5
PixelOrientation.LOWER_LEFT LOWER_LEFT -0.5+0.5
PixelOrientation.LOWER_RIGHT LOWER_RIGHT +0.5+0.5

Parameters:
  orientation - The pixel orientation. The position relative to the pixel center.
throws:
  IllegalArgumentException - if the specified orientation is not known.
since:
   2.4




inverseTransform
final Point2D inverseTransform(Point2D point) throws InvalidGridGeometryException(Code)
Transforms a point using the inverse of GridGeometry2D.getGridToCRS2D() .
Parameters:
  point - The point in logical coordinate system. A new point in the grid coordinate system.
throws:
  InvalidGridGeometryException - if a two-dimensional inversetransform is not available for this grid geometry.
throws:
  CannotEvaluateException - if the transformation failed.



inverseTransform
final Rectangle inverseTransform(Rectangle2D bounds)(Code)
Returns the pixel coordinate of a rectangle containing the specified geographic area. If the rectangle can't be computed, then this method returns null .



Fields inherited from org.geotools.coverage.grid.GeneralGridGeometry
final public static int CRS(Code)(Java Doc)
final public static int ENVELOPE(Code)(Java Doc)
final public static int GRID_RANGE(Code)(Java Doc)
final public static int GRID_TO_CRS(Code)(Java Doc)
final GeneralEnvelope envelope(Code)(Java Doc)
final protected GridRange gridRange(Code)(Java Doc)
final protected MathTransform gridToCRS(Code)(Java Doc)

Methods inherited from org.geotools.coverage.grid.GeneralGridGeometry
public boolean equals(Object object)(Code)(Java Doc)
public CoordinateReferenceSystem getCoordinateReferenceSystem() throws InvalidGridGeometryException(Code)(Java Doc)
public int getDimension()(Code)(Java Doc)
public Envelope getEnvelope() throws InvalidGridGeometryException(Code)(Java Doc)
public GridRange getGridRange() throws InvalidGridGeometryException(Code)(Java Doc)
public MathTransform getGridToCRS() throws InvalidGridGeometryException(Code)(Java Doc)
public MathTransform getGridToCRS(PixelInCell halfPixel) throws InvalidGridGeometryException(Code)(Java Doc)
public MathTransform getGridToCoordinateSystem() throws InvalidGridGeometryException(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
public boolean isDefined(int bitmask) throws IllegalArgumentException(Code)(Java Doc)
public String toString()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.