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


java.lang.Object
   org.geotools.coverage.TypeMap

TypeMap
final public class TypeMap (Code)
Utility methods for choosing a or a on the basis of a range of values. This class provides also some methods for mapping SampleDimensionType to DataBuffer types.
since:
   2.1
version:
   $Id: TypeMap.java 25972 2007-06-21 13:38:35Z desruisseaux $
author:
   Martin Desruisseaux




Method Summary
public static  ColorInterpretationgetColorInterpretation(ColorModel model, int band)
     Returns the color interpretation code for the specified color model and band number.
Parameters:
  model - The color model.
Parameters:
  band - The band to query.
public static  intgetDataBufferType(SampleDimensionType type)
     Returns the DataBuffer type.
public static  InternationalStringgetName(SampleDimensionType type)
     Returns the sample dimension type name as an international string.
public static  NumberRangegetPositiveRange(SampleDimensionType type)
     Returns the range of positive sample values (excluding 0).
public static  NumberRangegetRange(SampleDimensionType type)
     Returns the full range of sample values for the specified dimension type.
public static  SampleDimensionTypegetSampleDimensionType(Range range)
     Returns the smallest sample dimension type capable to hold the specified range of values.
Parameters:
  range - The range of values.
public static  SampleDimensionTypegetSampleDimensionType(double min, double max)
     Returns the smallest sample dimension type capable to hold the specified range of values. An heuristic approach is used for non-integer values.
Parameters:
  min - The lower value, inclusive.
Parameters:
  max - The upper value, inclusive as well.
public static  SampleDimensionTypegetSampleDimensionType(long min, long max)
     Returns the smallest sample dimension type capable to hold the specified range of values.
Parameters:
  min - The lower value, inclusive.
Parameters:
  max - The upper value, inclusive as well.
public static  SampleDimensionTypegetSampleDimensionType(SampleModel model, int band)
     Returns the sample dimension type for the specified sample model and band number.
public static  intgetSize(SampleDimensionType type)
     Returns the size in bits.
public static  booleanisFloatingPoint(SampleDimensionType type)
     Returns true for floating-point data type.
public static  booleanisSigned(SampleDimensionType type)
     Returns true for signed sample type.
public static  NumberwrapSample(double value, SampleDimensionType type, boolean allowWidening)
     Wraps the specified value into a number of the specified data type.



Method Detail
getColorInterpretation
public static ColorInterpretation getColorInterpretation(ColorModel model, int band) throws IllegalArgumentException(Code)
Returns the color interpretation code for the specified color model and band number.
Parameters:
  model - The color model.
Parameters:
  band - The band to query. The code for the specified color model and band number.
throws:
  IllegalArgumentException - if the band number is not in the valid range.



getDataBufferType
public static int getDataBufferType(SampleDimensionType type)(Code)
Returns the DataBuffer type. This is one of the following constants: DataBuffer.TYPE_BYTE TYPE_BYTE , DataBuffer.TYPE_USHORT TYPE_USHORT , DataBuffer.TYPE_SHORT TYPE_SHORT , DataBuffer.TYPE_INT TYPE_INT , DataBuffer.TYPE_FLOAT TYPE_FLOAT , DataBuffer.TYPE_DOUBLE TYPE_DOUBLE or DataBuffer.TYPE_UNDEFINED if the type is unrecognized.



getName
public static InternationalString getName(SampleDimensionType type)(Code)
Returns the sample dimension type name as an international string. For example, the localized name for SampleDimensionType.UNSIGNED_16BITS is "16 bits unsigned integer" in English and "Entier non-signé sur 16 bits" in French.



getPositiveRange
public static NumberRange getPositiveRange(SampleDimensionType type)(Code)
Returns the range of positive sample values (excluding 0). This range is non-null only for unsigned type. A range excluding 0 is sometime usefull when the 0 value is reserved for a "no data" category.



getRange
public static NumberRange getRange(SampleDimensionType type)(Code)
Returns the full range of sample values for the specified dimension type.



getSampleDimensionType
public static SampleDimensionType getSampleDimensionType(Range range)(Code)
Returns the smallest sample dimension type capable to hold the specified range of values.
Parameters:
  range - The range of values. The smallest sample dimension type for the specified range.



getSampleDimensionType
public static SampleDimensionType getSampleDimensionType(double min, double max)(Code)
Returns the smallest sample dimension type capable to hold the specified range of values. An heuristic approach is used for non-integer values.
Parameters:
  min - The lower value, inclusive.
Parameters:
  max - The upper value, inclusive as well. The smallest sample dimension type for the specified range.



getSampleDimensionType
public static SampleDimensionType getSampleDimensionType(long min, long max)(Code)
Returns the smallest sample dimension type capable to hold the specified range of values.
Parameters:
  min - The lower value, inclusive.
Parameters:
  max - The upper value, inclusive as well. The smallest sample dimension type for the specified range.



getSampleDimensionType
public static SampleDimensionType getSampleDimensionType(SampleModel model, int band) throws IllegalArgumentException(Code)
Returns the sample dimension type for the specified sample model and band number. If the sample model use an undefined data type, then this method returns null .
Parameters:
  model - The sample model.
Parameters:
  band - The band to query. The sample dimension type for the specified sample model and band number.
throws:
  IllegalArgumentException - if the band number is not in the valid range.



getSize
public static int getSize(SampleDimensionType type)(Code)
Returns the size in bits. The value range from 1 to 64. This is similar, but different than DataBuffer.getDataTypeSize , which have values ranging from 8 to 64.



isFloatingPoint
public static boolean isFloatingPoint(SampleDimensionType type)(Code)
Returns true for floating-point data type.



isSigned
public static boolean isSigned(SampleDimensionType type)(Code)
Returns true for signed sample type.



wrapSample
public static Number wrapSample(double value, SampleDimensionType type, boolean allowWidening) throws IllegalArgumentException(Code)
Wraps the specified value into a number of the specified data type. If the value can't fit in the specified type, then a wider type is choosen unless allowWidening is false .
Parameters:
  value - The value to wrap in a Number object.
Parameters:
  type - A constant from the SampleDimensionType code list.
Parameters:
  allowWidening - true if this method is allowed to returnsa wider type than the usual one for the specified type . The value as a Number.
throws:
  IllegalArgumentException - if type is not a recognized constant.
throws:
  IllegalArgumentException - if allowWidening is false and the specified value can't fit in the specified sample type.



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.