Java Doc for GeneralGridGeometry.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

All known Subclasses:   org.geotools.coverage.grid.GridGeometry2D,
GeneralGridGeometry
public class GeneralGridGeometry implements GridGeometry,Serializable(Code)
Describes the valid range of grid coordinates and the math transform to transform grid coordinates to real world coordinates. Grid geometries contains:

  • An optional , usually inferred from the size.
  • An optional "grid to CRS" , which may be inferred from the grid range and the envelope.
  • An optional , which may be inferred from the grid range and the "grid to CRS" transform.
  • An optional to be given to the envelope.

All grid geometry attributes are optional because some of them may be inferred from a wider context. For example a grid geometry know nothing about , but GridCoverage2D do. Consequently, the later may infer the by itself.

By default, any request for an undefined attribute will thrown an InvalidGridGeometryException . In order to check if an attribute is defined, use GeneralGridGeometry.isDefined .
since:
   2.1
version:
   $Id: GeneralGridGeometry.java 26984 2007-09-14 18:13:49Z desruisseaux $
author:
   Martin Desruisseaux
author:
   Alessio Fabiani



Field Summary
final public static  intCRS
     A bitmask to specify the validity of the .
final public static  intENVELOPE
     A bitmask to specify the validity of the .
final public static  intGRID_RANGE
     A bitmask to specify the validity of the .
final public static  intGRID_TO_CRS
     A bitmask to specify the validity of the transform.
final  GeneralEnvelopeenvelope
     The envelope, which is usually the to real world coordinates.
final protected  GridRangegridRange
     The valid coordinate range of a grid coverage, or null if none.
final protected  MathTransformgridToCRS
     The math transform (usually an affine transform), or null if none.

Constructor Summary
 GeneralGridGeometry(GeneralGridGeometry 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  GeneralGridGeometry(GridRange gridRange, MathTransform gridToCRS, CoordinateReferenceSystem crs)
     Constructs a new grid geometry from a mapping .
public  GeneralGridGeometry(GridRange gridRange, Envelope userRange)
     Constructs a new grid geometry from an .
public  GeneralGridGeometry(GridRange gridRange, Envelope userRange, boolean[] reverse, boolean swapXY)
     Constructs a new grid geometry from an .
 GeneralGridGeometry(GridRange gridRange, Envelope userRange, boolean[] reverse, boolean swapXY, boolean automatic)
     Implementation of heuristic constructors.

Method Summary
public  booleanequals(Object object)
     Compares the specified object with this grid geometry for equality.
public  CoordinateReferenceSystemgetCoordinateReferenceSystem()
     Returns the "real world" coordinate reference system.
public  intgetDimension()
     Returns the number of dimensions.
public  EnvelopegetEnvelope()
     Returns the bounding box of "real world" coordinates for this grid geometry.
public  GridRangegetGridRange()
     Returns the valid coordinate range of a grid coverage.
public  MathTransformgetGridToCRS()
     Returns the transform from grid coordinates to real world earth coordinates. The transform is often an affine transform.
public  MathTransformgetGridToCRS(PixelInCell halfPixel)
     Returns the transform from grid coordinates to real world earth coordinates. This is similar to GeneralGridGeometry.getGridToCRS() except that the transform may maps other parts than .
Parameters:
  halfPixel - The pixel part to map.
public  MathTransformgetGridToCoordinateSystem()
    
public  inthashCode()
     Returns a hash value for this grid geometry.
public  booleanisDefined(int bitmask)
     Returns true if all the parameters specified by the argument are set.
Parameters:
  bitmask - Any combinaison of GeneralGridGeometry.CRS, GeneralGridGeometry.ENVELOPE, GeneralGridGeometry.GRID_RANGEand GeneralGridGeometry.GRID_TO_CRS.
public  StringtoString()
     Returns a string representation of this grid geometry.

Field Detail
CRS
final public static int CRS(Code)
A bitmask to specify the validity of the . This is given as an argument to the GeneralGridGeometry.isDefined method.
since:
   2.2



ENVELOPE
final public static int ENVELOPE(Code)
A bitmask to specify the validity of the . This is given as an argument to the GeneralGridGeometry.isDefined method.
since:
   2.2



GRID_RANGE
final public static int GRID_RANGE(Code)
A bitmask to specify the validity of the . This is given as an argument to the GeneralGridGeometry.isDefined method.
since:
   2.2



GRID_TO_CRS
final public static int GRID_TO_CRS(Code)
A bitmask to specify the validity of the transform. This is given as an argument to the GeneralGridGeometry.isDefined method.
since:
   2.2



envelope
final GeneralEnvelope envelope(Code)
The envelope, which is usually the to real world coordinates. This envelope contains the of "real world" coordinates.

This field should be considered as private because envelopes are mutable, and we want to make sure that envelopes are cloned before to be returned to the user. Only GridGeometry2D and GridCoverage2D access directly to this field (read only) for performance reason.
since:
   2.2




gridRange
final protected GridRange gridRange(Code)
The valid coordinate range of a grid coverage, or null if none. The lowest valid grid coordinate is zero for BufferedImage , but may be non-zero for arbitrary RenderedImage . A grid with 512 cells can have a minimum coordinate of 0 and maximum of 512, with 511 as the highest valid index.
See Also:   RenderedImage.getMinX
See Also:   RenderedImage.getMinY
See Also:   RenderedImage.getWidth
See Also:   RenderedImage.getHeight



gridToCRS
final protected MathTransform gridToCRS(Code)
The math transform (usually an affine transform), or null if none. This math transform maps to "real world" coordinate using the following line:
gridToCRS.transform(pixels, point);




Constructor Detail
GeneralGridGeometry
GeneralGridGeometry(GeneralGridGeometry 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.



GeneralGridGeometry
public GeneralGridGeometry(GridRange gridRange, MathTransform gridToCRS, CoordinateReferenceSystem crs) throws MismatchedDimensionException, IllegalArgumentException(Code)
Constructs a new grid geometry from a mapping . This is the most general constructor, the one that gives the maximal control over the grid geometry to be created.
Parameters:
  gridRange - The valid coordinate range of a grid coverage, or null if none.
Parameters:
  gridToCRS - The math transform which allows for the transformations from gridcoordinates (pixel's center) to real world earth coordinates.May be null , but this is not recommanded.
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 or the CRS doesn't haveconsistent dimensions.
throws:
  IllegalArgumentException - if the math transform can't transform coordinatesin the domain of the specified grid range.
since:
   2.2



GeneralGridGeometry
public GeneralGridGeometry(GridRange gridRange, Envelope userRange) throws MismatchedDimensionException(Code)
Constructs a new grid geometry from an . An will be computed automatically from the specified envelope using heuristic rules described in GridToEnvelopeMapper javadoc. More specifically, heuristic rules are applied for:


Parameters:
  gridRange - The valid coordinate range of a grid coverage.
Parameters:
  userRange - The corresponding coordinate range in user coordinate. This rectangle mustcontains entirely all pixels, i.e. the rectangle's upper left corner mustcoincide with the upper left corner of the first pixel and the rectangle'slower right corner must coincide with the lower right corner of the lastpixel.
throws:
  MismatchedDimensionException - if the grid range and the envelope doesn't haveconsistent dimensions.
since:
   2.2



GeneralGridGeometry
public GeneralGridGeometry(GridRange gridRange, Envelope userRange, boolean[] reverse, boolean swapXY) throws MismatchedDimensionException(Code)
Constructs a new grid geometry from an . This convenience constructor delegates the work to GridToEnvelopeMapper ; see its javadoc for details.

If this convenience constructor do not provides suffisient control on axis order or reversal, then an affine transform shall be created explicitly and the grid geometry shall be created using the argument.
Parameters:
  gridRange - The valid coordinate range of a grid coverage.
Parameters:
  userRange - The corresponding coordinate range in user coordinate. This envelope mustcontains entirely all pixels, i.e. the envelope's upper left corner mustcoincide with the upper left corner of the first pixel and the envelope'slower right corner must coincide with the lower right corner of the lastpixel.
Parameters:
  reverse - Tells for each axis in user space whatever or not its directionshould be reversed. A null value reverse no axis. Callers willtypically set reverse[1] to true in order to reverse they axis direction.
Parameters:
  swapXY - If true , then the two first axis will be interchanged. Callers willtypically set this argument to true when the geographic coordinatesystem has axis in the (y,x) order. The reverse parameter then apply to axis after the swap.
throws:
  MismatchedDimensionException - if the grid range and the envelope doesn't haveconsistent dimensions.
since:
   2.2




GeneralGridGeometry
GeneralGridGeometry(GridRange gridRange, Envelope userRange, boolean[] reverse, boolean swapXY, boolean automatic) throws MismatchedDimensionException(Code)
Implementation of heuristic constructors.




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



getCoordinateReferenceSystem
public CoordinateReferenceSystem getCoordinateReferenceSystem() throws InvalidGridGeometryException(Code)
Returns the "real world" coordinate reference system. The coordinate reference system (never null ).
throws:
  InvalidGridGeometryException - if this grid geometry has no CRS (i.e.()returned false ).
See Also:   GridGeometry2D.getCoordinateReferenceSystem2D
since:
   2.2



getDimension
public int getDimension()(Code)
Returns the number of dimensions.



getEnvelope
public Envelope getEnvelope() throws InvalidGridGeometryException(Code)
Returns the bounding box of "real world" coordinates for this grid geometry. This envelope is the to the "real world" coordinate system. 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.getEnvelope2D



getGridRange
public GridRange getGridRange() throws InvalidGridGeometryException(Code)
Returns the valid coordinate range of a grid coverage. The lowest valid grid coordinate is zero for BufferedImage , but may be non-zero for arbitrary RenderedImage . A grid with 512 cells can have a minimum coordinate of 0 and maximum of 512, with 511 as the highest valid index. The grid range (never null ).
throws:
  InvalidGridGeometryException - if this grid geometry has no grid range (i.e.()returned false ).
See Also:   GridGeometry2D.getGridRange2D



getGridToCRS
public MathTransform getGridToCRS() throws InvalidGridGeometryException(Code)
Returns the transform from grid coordinates to real world earth coordinates. The transform is often an affine transform. The coordinate reference system of the real world coordinates is given by org.opengis.coverage.Coverage.getCoordinateReferenceSystem .

Note: OpenGIS requires that the transform maps pixel centers to real world coordinates. This is different from some other systems that map pixel's upper left corner. The transform (never null ).
throws:
  InvalidGridGeometryException - if this grid geometry has no transform (i.e.()returned false ).
See Also:   GridGeometry2D.getGridToCRS2D
since:
   2.3




getGridToCRS
public MathTransform getGridToCRS(PixelInCell halfPixel) throws InvalidGridGeometryException(Code)
Returns the transform from grid coordinates to real world earth coordinates. This is similar to GeneralGridGeometry.getGridToCRS() except that the transform may maps other parts than .
Parameters:
  halfPixel - The pixel part to map. The transform (never null ).
throws:
  InvalidGridGeometryException - if this grid geometry has no transform (i.e.()returned false ).
since:
   2.3



getGridToCoordinateSystem
public MathTransform getGridToCoordinateSystem() throws InvalidGridGeometryException(Code)
GeneralGridGeometry.getGridToCRS()



hashCode
public int hashCode()(Code)
Returns a hash value for this grid geometry. This value need not remain consistent between different implementations of the same class.



isDefined
public boolean isDefined(int bitmask) throws IllegalArgumentException(Code)
Returns true if all the parameters specified by the argument are set.
Parameters:
  bitmask - Any combinaison of GeneralGridGeometry.CRS, GeneralGridGeometry.ENVELOPE, GeneralGridGeometry.GRID_RANGEand GeneralGridGeometry.GRID_TO_CRS. true if all specified attributes are defined (i.e. invoking thecorresponding method will not thrown an InvalidGridGeometryException).
throws:
  IllegalArgumentException - if the specified bitmask is not a combinaison of knownmasks.
since:
   2.2



toString
public String toString()(Code)
Returns a string representation of this grid geometry. The returned string is implementation dependent. It is usually provided for debugging purposes.



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.