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


java.lang.Object
   org.geotools.resources.coverage.CoverageUtilities

All known Subclasses:   org.geotools.resources.image.CoverageUtilities,
CoverageUtilities
public class CoverageUtilities (Code)
A set of utilities methods for the Grid Coverage package. Those methods are not really rigorous; must of them should be seen as temporary implementations.
since:
   2.4
version:
   $Id: CoverageUtilities.java 25447 2007-05-06 16:56:19Z desruisseaux $
author:
   Martin Desruisseaux
author:
   Simone Giannecchini


Field Summary
final public static  HintsLENIENT_HINT
     Controlling datum shift process.

Constructor Summary
protected  CoverageUtilities()
     Do not allows instantiation of this class.

Method Summary
public static  double[]getBackgroundValues(GridCoverage2D coverage)
     Retrieves a best guess for the sample value to use for background, inspecting the categories of the provided GridCoverage2D .
Parameters:
  coverage - to use for guessing background values.
public static  intgetVisibleBand(Object image)
     Returns the visible band in the specified RenderedImage or PropertySource . This method fetch the "GC_VisibleBand" property.
public static  booleanhasRenderingCategories(GridCoverage gridCoverage)
     Returns true if the provided GridCoverage has Category objects twith a real transformation.

Common use case for this method is understanding if a GridCoverage has an accompanying Gephysiscs or non-Geophysics view, which means a dicotomy between the coverage with the "real" data and the coverage with the rendered version of the original data exists. An example is when you have raw data whose data type is float and you want to render them using a palette.

public static  booleanhasTransform(SampleDimension[] sampleDimensions)
     Returns true if at least one of the specified sample dimensions has a transform which is not the identity transform.
public static  intprepareSourcesForGCOperation(GridCoverage2D coverage, Interpolation interpolation, boolean hasFilter, RenderingHints hints)
     General purpose method used in various operations for GridCoverage2D to help with taking decisions on how to treat coverages with respect to their ColorModel .

The need for this method arose in consideration of the fact that applying most operations on coverage whose ColorModel is an instance of IndexColorModel may lead to unpredictable results depending on the applied Interpolation (think about applying "Scale" with InterpolationBilinear on a non-geophysics GridCoverage2D with an IndexColorModel ) or more simply on the operation itself ("SubsampleAverage" cannot be applied at all on a GridCoverage2D backed by an IndexColorModel ).

This method suggests the actions to take depending on the structure of the provided GridCoverage2D , the provided Interpolation and if the operation uses a filter or not (this is useful for operations like SubsampleAverage or FilteredSubsample).

In general the idea is as follows: If the original coverage is backed by a RenderedImage with an IndexColorModel , we have the following cases:

  • if the interpolation is InterpolationNearest and there is no filter involved we can apply the operation on the IndexColorModel -backed coverage with nor probs.
  • If the interpolations in of higher order or there is a filter to apply we have to options:
    • If the coverage has a twin geophysics view we need to go back to it and apply the operation there.
    • If the coverage has no geophysics view (an orthophoto with an intrisic IndexColorModel view) we need to perform an RGB(A) color expansion before applying the operation.

A special case is when we want to apply an operation on the geophysics view of a coverage that does not involve high order interpolation of filters.

public static  booleanuses(GridCoverage coverage, RenderedImage image)
     Returns true if the specified grid coverage or any of its source uses the following image.
public static  FeatureCollectionwrapGc(GridCoverage coverage)
     Wraps a grid coverage into a Feature.
public static  FeatureCollectionwrapGcReader(AbstractGridCoverage2DReader reader)
     Wraps a grid coverage into a Feature.

Field Detail
LENIENT_HINT
final public static Hints LENIENT_HINT(Code)
Controlling datum shift process.




Constructor Detail
CoverageUtilities
protected CoverageUtilities()(Code)
Do not allows instantiation of this class.




Method Detail
getBackgroundValues
public static double[] getBackgroundValues(GridCoverage2D coverage)(Code)
Retrieves a best guess for the sample value to use for background, inspecting the categories of the provided GridCoverage2D .
Parameters:
  coverage - to use for guessing background values. an array of double values to use as a background.



getVisibleBand
public static int getVisibleBand(Object image)(Code)
Returns the visible band in the specified RenderedImage or PropertySource . This method fetch the "GC_VisibleBand" property. If this property is undefined, then the visible band default to the first one.
Parameters:
  image - The image for which to fetch the visible band, or null . The visible band.



hasRenderingCategories
public static boolean hasRenderingCategories(GridCoverage gridCoverage)(Code)
Returns true if the provided GridCoverage has Category objects twith a real transformation.

Common use case for this method is understanding if a GridCoverage has an accompanying Gephysiscs or non-Geophysics view, which means a dicotomy between the coverage with the "real" data and the coverage with the rendered version of the original data exists. An example is when you have raw data whose data type is float and you want to render them using a palette. You usually do this by specifying a set of Category object which will map some intervals of the raw data to some specific colors. The rendered version that we will create using the method GridCoverage2D#geophysics(false) will be backed by a RenderedImage with an IndexColorModel representing the colors provided in the Categories.
Parameters:
  gridCoverage - to check for the existence of categories with tranformationsbetween original data and their rendered counterpart. false if this coverage has only a single view associated with it, true otherwise.




hasTransform
public static boolean hasTransform(SampleDimension[] sampleDimensions)(Code)
Returns true if at least one of the specified sample dimensions has a transform which is not the identity transform.



prepareSourcesForGCOperation
public static int prepareSourcesForGCOperation(GridCoverage2D coverage, Interpolation interpolation, boolean hasFilter, RenderingHints hints)(Code)
General purpose method used in various operations for GridCoverage2D to help with taking decisions on how to treat coverages with respect to their ColorModel .

The need for this method arose in consideration of the fact that applying most operations on coverage whose ColorModel is an instance of IndexColorModel may lead to unpredictable results depending on the applied Interpolation (think about applying "Scale" with InterpolationBilinear on a non-geophysics GridCoverage2D with an IndexColorModel ) or more simply on the operation itself ("SubsampleAverage" cannot be applied at all on a GridCoverage2D backed by an IndexColorModel ).

This method suggests the actions to take depending on the structure of the provided GridCoverage2D , the provided Interpolation and if the operation uses a filter or not (this is useful for operations like SubsampleAverage or FilteredSubsample).

In general the idea is as follows: If the original coverage is backed by a RenderedImage with an IndexColorModel , we have the following cases:

  • if the interpolation is InterpolationNearest and there is no filter involved we can apply the operation on the IndexColorModel -backed coverage with nor probs.
  • If the interpolations in of higher order or there is a filter to apply we have to options:
    • If the coverage has a twin geophysics view we need to go back to it and apply the operation there.
    • If the coverage has no geophysics view (an orthophoto with an intrisic IndexColorModel view) we need to perform an RGB(A) color expansion before applying the operation.

A special case is when we want to apply an operation on the geophysics view of a coverage that does not involve high order interpolation of filters. In this case we suggest to apply the operation on the non-geophysics view, which is usually much faster. Users may ignore this advice.
Parameters:
  coverage - to check for the action to take.
Parameters:
  interpolation - to use for the action to take.
Parameters:
  hasFilter - if the operation we will apply is going to use a filter.
Parameters:
  hints - to use when applying a certain operation. 0 if nothing has to be done on the provided coverage, 1 if a color expansion has to beprovided, 2 if we need to employ the geophysics vew of the provided coverage,3 if we suggest to employ the non-geophysics vew of the provided coverage.
since:
   2.3.1org.geotools.coverage.grid.ViewType




uses
public static boolean uses(GridCoverage coverage, RenderedImage image)(Code)
Returns true if the specified grid coverage or any of its source uses the following image.



wrapGc
public static FeatureCollection wrapGc(GridCoverage coverage) throws TransformException, SchemaException, IllegalAttributeException(Code)
Wraps a grid coverage into a Feature. Code lifted from ArcGridDataSource (temporary). FeatureUtilities.wrapGridCoverage



wrapGcReader
public static FeatureCollection wrapGcReader(AbstractGridCoverage2DReader reader) throws TransformException, SchemaException, IllegalAttributeException(Code)
Wraps a grid coverage into a Feature. Code lifted from ArcGridDataSource (temporary).
Parameters:
  gridCoverageReader - the grid coverage a feature with the grid coverage envelope as the geometry and thegrid coverage itself in the "grid" attributeFeatureUtilities.wrapGridCoverageReader



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.