Java Doc for AbstractGridCoverage2DReader.java in  » GIS » GeoTools-2.4.1 » org » geotools » data » 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.data.coverage.grid 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.geotools.data.coverage.grid.AbstractGridCoverage2DReader

AbstractGridCoverage2DReader
abstract public class AbstractGridCoverage2DReader implements GridCoverageReader(Code)
This class is a first attempt for providing a way to get more informations out of a single 2D raster datasets (x,y). It is worth to remark that for the moment this is thought for 2D rasters not for 3D or 4D rasters (x,y,z,t).

The main drawback I see with the current GeoApi GridCoverageReader interface is that there is no way to get real information about a raster source unless you instantiate a GridCoverage. As an instance it is impossible to know the envelope, the number of overviews, the tile size. This information is needed in order to perform decimation on reading or to use built-in overviews
This really impacts the ability to exploit raster datasets in a desktop environment where caching is crucial.
author:
   Simone Giannecchini
since:
   2.3
version:
   0.2org.geotools.coverage.grid.io.AbstractGridCoverage2DReader



Field Summary
final protected static  doubleEPS
    
protected  booleancloseMe
     Temp variable used in many readers.
final protected static  GridCoverageFactorycoverageFactory
     Caches a default GridCoverageFactory for usage in plugins.
protected  StringcoverageName
    
protected  CoordinateReferenceSystemcrs
    
final protected static  Color[]demColors
     Default color ramp.
protected  booleangzipped
     In case we are trying to read from a GZipped file this will be set to true.
protected  double[]highestRes
     Highest resolution availaible for this reader.
protected  Hintshints
     Hints used by the AbstractGridCoverage2DReader subclasses.
protected  ImageInputStreaminStream
     Input stream that can be used to initialize subclasses of AbstractGridCoverage2DReader .
protected volatile  intnumOverviews
     This contains the maximum number of grid coverages in the file/stream.
final protected static  CoordinateOperationFactoryoperationFactory
     Buffered factory for coordinate operations.
protected  GeneralEnvelopeoriginalEnvelope
    
protected  GeneralGridRangeoriginalGridRange
     The original GridRange for the GridCoverage2D of this reader.
protected  double[][]overViewResolutions
     Resolutions avialaible through an overviews based mechanism.
protected  MathTransformraster2Model
     2DGridToWorld math transform.
protected  Objectsource
    


Method Summary
final protected  GridCoveragecreateImageCoverage(PlanarImage image)
     Creates a GridCoverage for the provided PlanarImage using the AbstractGridCoverage2DReader.originalEnvelope that was provided for this coverage.
Parameters:
  image - contains the data for the coverage to create.
final protected  GridCoveragecreateImageCoverage(PlanarImage image, MathTransform raster2Model)
     Creates a GridCoverage for the provided PlanarImage using the AbstractGridCoverage2DReader.raster2Model that was provided for this coverage.

This method is vital when working with coverages that have a raster to model transformation that is not a simple scale and translate.
Parameters:
  image - contains the data for the coverage to create.
Parameters:
  raster2Model - is the MathTransform that maps from the raster space to the model space.

final protected  voiddecimationOnReadingControl(Integer imageChoice, ImageReadParam readP, double[] requestedRes)
     This method is responsible for evaluating possible subsampling factors once the best resolution level has been found, in case we have support for overviews, or starting from the original coverage in case there are no overviews availaible.
public  voiddispose()
     Disposes this reader.
final public  CoordinateReferenceSystemgetCrs()
     Retrieves the CoordinateReferenceSystem for dataset pointed by this AbstractGridCoverage2DReader .
public  StringgetCurrentSubname()
    
public  intgetGridCoverageCount()
    
public  String[]getMetadataNames()
    
public  StringgetMetadataValue(String name)
    
final public  GeneralEnvelopegetOriginalEnvelope()
     Retrieves the GeneralEnvelope for this AbstractGridCoverage2DReader .
final public  GeneralGridRangegetOriginalGridRange()
     Retrieves the GeneralGridRange that represents the raster grid dimensions of the highest resolution level in this dataset.
final protected  double[]getResolution(GeneralEnvelope envelope, Rectangle2D dim, CoordinateReferenceSystem crs)
     This method is responsible for computing the resolutions in for the provided grid geometry in the provided crs.
final public  ObjectgetSource()
     Retrieves the source for this AbstractGridCoverage2DReader .
public  booleanhasMoreGridCoverages()
    
final protected  booleanisScaleTranslate(MathTransform transform)
    
public  String[]listSubNames()
    
protected  IntegersetReadParams(ImageReadParam readP, GeneralEnvelope requestedEnvelope, Rectangle requestedDim)
     This method is responsible for preparing the read param for doing an ImageReader.read(intImageReadParam) .

This method is responsible for preparing the read param for doing an ImageReader.read(intImageReadParam) .

public  voidskip()
    

Field Detail
EPS
final protected static double EPS(Code)



closeMe
protected boolean closeMe(Code)
Temp variable used in many readers.



coverageFactory
final protected static GridCoverageFactory coverageFactory(Code)
Caches a default GridCoverageFactory for usage in plugins.



coverageName
protected String coverageName(Code)
Coverage name



crs
protected CoordinateReferenceSystem crs(Code)
crs for this coverage



demColors
final protected static Color[] demColors(Code)
Default color ramp. Preset colors used to generate an Image from the raw data



gzipped
protected boolean gzipped(Code)
In case we are trying to read from a GZipped file this will be set to true.



highestRes
protected double[] highestRes(Code)
Highest resolution availaible for this reader.



hints
protected Hints hints(Code)
Hints used by the AbstractGridCoverage2DReader subclasses.



inStream
protected ImageInputStream inStream(Code)
Input stream that can be used to initialize subclasses of AbstractGridCoverage2DReader .



numOverviews
protected volatile int numOverviews(Code)
This contains the maximum number of grid coverages in the file/stream. Until multi-image files are supported, this is going to be 0 or 1.



operationFactory
final protected static CoordinateOperationFactory operationFactory(Code)
Buffered factory for coordinate operations.



originalEnvelope
protected GeneralEnvelope originalEnvelope(Code)
Envelope read from file



originalGridRange
protected GeneralGridRange originalGridRange(Code)
The original GridRange for the GridCoverage2D of this reader.



overViewResolutions
protected double[][] overViewResolutions(Code)
Resolutions avialaible through an overviews based mechanism.



raster2Model
protected MathTransform raster2Model(Code)
2DGridToWorld math transform.



source
protected Object source(Code)
Source to read from





Method Detail
createImageCoverage
final protected GridCoverage createImageCoverage(PlanarImage image) throws IOException(Code)
Creates a GridCoverage for the provided PlanarImage using the AbstractGridCoverage2DReader.originalEnvelope that was provided for this coverage.
Parameters:
  image - contains the data for the coverage to create. a GridCoverage
throws:
  IOException -



createImageCoverage
final protected GridCoverage createImageCoverage(PlanarImage image, MathTransform raster2Model) throws IOException(Code)
Creates a GridCoverage for the provided PlanarImage using the AbstractGridCoverage2DReader.raster2Model that was provided for this coverage.

This method is vital when working with coverages that have a raster to model transformation that is not a simple scale and translate.
Parameters:
  image - contains the data for the coverage to create.
Parameters:
  raster2Model - is the MathTransform that maps from the raster space to the model space. a GridCoverage
throws:
  IOException -




decimationOnReadingControl
final protected void decimationOnReadingControl(Integer imageChoice, ImageReadParam readP, double[] requestedRes)(Code)
This method is responsible for evaluating possible subsampling factors once the best resolution level has been found, in case we have support for overviews, or starting from the original coverage in case there are no overviews availaible. Anyhow this methof should not be called directly but subclasses should make use of the setReadParams method instead in order to transparently look for overviews.
Parameters:
  imageChoice -
Parameters:
  readP -
Parameters:
  requestedRes -



dispose
public void dispose()(Code)
Disposes this reader.

This method just tries to close the underlying ImageInputStream .




getCrs
final public CoordinateReferenceSystem getCrs()(Code)
Retrieves the CoordinateReferenceSystem for dataset pointed by this AbstractGridCoverage2DReader . the CoordinateReferenceSystem for dataset pointed by thisAbstractGridCoverage2DReader.



getCurrentSubname
public String getCurrentSubname()(Code)

See Also:   org.opengis.coverage.grid.GridCoverageReader.getCurrentSubname



getGridCoverageCount
public int getGridCoverageCount()(Code)

See Also:   org.opengis.coverage.grid.GridCoverageReader.getGridCoverageCount



getMetadataNames
public String[] getMetadataNames()(Code)

See Also:   org.opengis.coverage.grid.GridCoverageReader.getMetadataNames



getMetadataValue
public String getMetadataValue(String name) throws MetadataNameNotFoundException(Code)

See Also:   org.opengis.coverage.grid.GridCoverageReader.getMetadataValue(java.lang.String)



getOriginalEnvelope
final public GeneralEnvelope getOriginalEnvelope()(Code)
Retrieves the GeneralEnvelope for this AbstractGridCoverage2DReader . the GeneralEnvelope for thisAbstractGridCoverage2DReader.



getOriginalGridRange
final public GeneralGridRange getOriginalGridRange()(Code)
Retrieves the GeneralGridRange that represents the raster grid dimensions of the highest resolution level in this dataset. the GeneralGridRange that represents the raster griddimensions of the highest resolution level in this dataset.



getResolution
final protected double[] getResolution(GeneralEnvelope envelope, Rectangle2D dim, CoordinateReferenceSystem crs) throws DataSourceException(Code)
This method is responsible for computing the resolutions in for the provided grid geometry in the provided crs.

It is worth to note that the returned resolution array is of length of 2 and it always is lon, lat for the moment.
It might be worth to remove the axes reordering code when we are confident enough with the code to handle the north-up crs.

TODO use orthodromic distance?
Parameters:
  envelope - the GeneralEnvelope
Parameters:
  dim -
Parameters:
  crs -
throws:
  DataSourceException -




getSource
final public Object getSource()(Code)
Retrieves the source for this AbstractGridCoverage2DReader . the source for this AbstractGridCoverage2DReader.



hasMoreGridCoverages
public boolean hasMoreGridCoverages()(Code)

See Also:   org.opengis.coverage.grid.GridCoverageReader.hasMoreGridCoverages



isScaleTranslate
final protected boolean isScaleTranslate(MathTransform transform)(Code)
Checks the transformation is a pure scale/translate instance (using a tolerance)
Parameters:
  transform -



listSubNames
public String[] listSubNames()(Code)

See Also:   org.opengis.coverage.grid.GridCoverageReader.listSubNames



setReadParams
protected Integer setReadParams(ImageReadParam readP, GeneralEnvelope requestedEnvelope, Rectangle requestedDim) throws IOException, TransformException(Code)
This method is responsible for preparing the read param for doing an ImageReader.read(intImageReadParam) .

This method is responsible for preparing the read param for doing an ImageReader.read(intImageReadParam) . It sets the passed ImageReadParam in terms of decimation on reading using the provided requestedEnvelope and requestedDim to evaluate the needed resolution. It also returns and Integer representing the index of the raster to be read when dealing with multipage raster.
Parameters:
  readP - an instance of ImageReadParam for setting thesubsampling factors.
Parameters:
  requestedEnvelope - the GeneralEnvelope we are requesting.
Parameters:
  requestedDim - the requested dimensions. the index of the raster to read in the underlying data source.
throws:
  IOException -
throws:
  TransformException -




skip
public void skip()(Code)

See Also:   org.opengis.coverage.grid.GridCoverageReader.skip



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.