Java Doc for CategoryList.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.util.AbstractList
   org.geotools.coverage.CategoryList

All known Subclasses:   org.geotools.coverage.GeophysicsCategoryList,
CategoryList
class CategoryList extends AbstractList implements MathTransform1D,Comparator,Serializable(Code)
An immutable list of categories. Categories are sorted by their sample values. Overlapping ranges of sample values are not allowed. A CategoryList can contains a mix of qualitative and quantitative categories. The CategoryList.getCategory method is responsible for finding the right category for an arbitrary sample value. Instances of CategoryList are immutable and thread-safe.
since:
   2.1
version:
   $Id: CategoryList.java 25449 2007-05-07 12:21:16Z desruisseaux $
author:
   Martin Desruisseaux


Field Summary
final  CategoryListinverse
     The inverse transform, never null .
final  Categorynodata
     The "nodata" category (never null ).

Constructor Summary
public  CategoryList(Category[] categories, Unit units)
     Construct a category list using the specified array of categories.
 CategoryList(Category[] categories, Unit units, boolean searchNearest, CategoryList inverse)
     Construct a category list using the specified array of categories. This constructor is for internal use only It is not private only because GeophysicsCategoryList need this constructor.
Parameters:
  categories - The list of categories.
Parameters:
  units - The geophysics unit, or null if none.
Parameters:
  searchNearest - The policy when CategoryList.getCategory doesn't find an exact matchfor a sample value.

Method Summary
static  intbinarySearch(double[] array, double key)
     Effectue une recherche bi-linéaire de la valeur spécifiée.
final public  intcompare(Object o1, Object o2)
     Compare Category objects according their Category.minimum value.
final public  Matrixderivative(DirectPosition point)
     Gets the derivative of this transform at a point.
final public  doublederivative(double value)
     Gets the derivative of this function at a value.
Parameters:
  value - The value where to evaluate the derivative.
public  booleanequals(Object object)
     Compares the specified object with this category list for equality.
 StringBufferformat(double value, boolean writeUnits, Locale locale, StringBuffer buffer)
     Format the specified value using the specified locale convention.
final public  Stringformat(double value, Locale locale)
     Format a sample value.
public  CategoryListgeophysics(boolean toGeophysics)
     If toGeophysics is true , returns a list of categories scaled to geophysics values.
final public  Objectget(int i)
     Returns the element at the specified position in this list.
final public  CategorygetCategory(double sample)
     Returns the category of the specified sample value. If no category fits, then this method returns null .
Parameters:
  sample - The value.
final public  ColorModelgetColorModel(int visibleBand, int numBands)
     Returns a color model for this category list.
final public  ColorModelgetColorModel(int visibleBand, int numBands, int type)
     Returns a color model for this category list.
final public  InternationalStringgetName()
     Returns the name of this object.
final public  NumberRangegetRange()
     Returns the range of values in this category list.
final public  intgetSourceDimensions()
     Gets the dimension of input points, which is 1.
final public  intgetTargetDimensions()
     Gets the dimension of output points, which is 1.
public  UnitgetUnits()
     Returns the unit information for quantitative categories in this list.
final public  MathTransforminverse()
     Returns the inverse transform of this object.
public  booleanisIdentity()
     Tests whether this transform does not move any points.
final  booleanisScaled(boolean toGeophysics)
     Verify if all categories are scaled to the specified state. This is used mostly in assertion statements.
Parameters:
  toGeophysics - The state to test.
static  booleanisScaled(Category[] categories, boolean toGeophysics)
     Verify if all categories are scaled to the specified state.
Parameters:
  categories - The categories to test.
Parameters:
  toGeophysics - The state to test.
static  booleanisSorted(Category[] categories)
     Vérifie si le tableau de catégories spécifié est bien en ordre croissant. La comparaison ne tient pas compte des valeurs NaN .
final public  intsize()
     Returns the number of categories in this list.
final public  Object[]toArray()
     Returns all categories in this CategoryList .
final public  StringtoString()
     Returns a string representation of this category list.
final  StringtoString(Object owner)
     Returns a string representation of this category list.
public  StringtoWKT()
     Returns a Well Known Text (WKT) for this object.
final public  DirectPositiontransform(DirectPosition ptSrc, DirectPosition ptDst)
     Transforms the specified ptSrc and stores the result in ptDst .
final public  doubletransform(double value)
     Transforms the specified value.
Parameters:
  value - The value to transform.
final public  voidtransform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts)
     Transforms a list of coordinate point ordinal values.
final public  voidtransform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts)
     Transforms a list of coordinate point ordinal values.
final public  voidtransform(WritableRectIter iterator)
     Transform a raster.

Field Detail
inverse
final CategoryList inverse(Code)
The inverse transform, never null . The following rule must hold:



nodata
final Category nodata(Code)
The "nodata" category (never null ). The "nodata" category is a category mapping the geophysics Double.NaN value. If none has been found, a default "nodata" category is used. This category is used to transform geophysics values to sample values into rasters when no suitable category has been found for a given geophysics value.




Constructor Detail
CategoryList
public CategoryList(Category[] categories, Unit units) throws IllegalArgumentException(Code)
Construct a category list using the specified array of categories.
Parameters:
  categories - The list of categories.
Parameters:
  units - The geophysics unit, or null if none.
throws:
  IllegalArgumentException - if two or more categorieshave overlapping sample value range.



CategoryList
CategoryList(Category[] categories, Unit units, boolean searchNearest, CategoryList inverse) throws IllegalArgumentException(Code)
Construct a category list using the specified array of categories. This constructor is for internal use only It is not private only because GeophysicsCategoryList need this constructor.
Parameters:
  categories - The list of categories.
Parameters:
  units - The geophysics unit, or null if none.
Parameters:
  searchNearest - The policy when CategoryList.getCategory doesn't find an exact matchfor a sample value. true means that it should search for the nearestcategory, while false means that it should returns null .
Parameters:
  inverse - The inverse transform, or null to build it automatically.This argument can be non-null only if invoked fromGeophysicsCategoryList constructor.
throws:
  IllegalArgumentException - if two or more categories have overlapping sample valuerange.




Method Detail
binarySearch
static int binarySearch(double[] array, double key)(Code)
Effectue une recherche bi-linéaire de la valeur spécifiée. Cette méthode est semblable à Arrays.binarySearch(double[]double) , excepté qu'elle peut distinguer différentes valeurs de NaN. Note: This method is not private in order to allows testing by CategoryTest .



compare
final public int compare(Object o1, Object o2)(Code)
Compare Category objects according their Category.minimum value. This is used for sorting the CategoryList.categories array at construction time.



derivative
final public Matrix derivative(DirectPosition point) throws TransformException(Code)
Gets the derivative of this transform at a point.



derivative
final public double derivative(double value) throws TransformException(Code)
Gets the derivative of this function at a value.
Parameters:
  value - The value where to evaluate the derivative. The derivative at the specified point.
throws:
  TransformException - if the derivative can't be evaluated at the specified point.



equals
public boolean equals(Object object)(Code)
Compares the specified object with this category list for equality. If the two objects are instances of CategoryList , then the test is a little bit stricter than the default AbstractList.equals .



format
StringBuffer format(double value, boolean writeUnits, Locale locale, StringBuffer buffer)(Code)
Format the specified value using the specified locale convention. This method is to be overridden by GeophysicsCategoryList . The default implementation do not format the value very properly, since most invocation will be done on geophysics(true).format(...) anyway.
Parameters:
  value - The value to format.
Parameters:
  writeUnit - true if unit symbol should be formatted after the number.Ignored if this category list has no unit.
Parameters:
  locale - The locale, or null for a default one.
Parameters:
  buffer - The buffer where to format. The buffer buffer for convenience.



format
final public String format(double value, Locale locale)(Code)
Format a sample value. If value is a real number, then the value may be formatted with the appropriate number of digits and the units symbol. Otherwise, if value is NaN , then the category name is returned.
Parameters:
  value - The sample value (may be NaN ).
Parameters:
  locale - Locale to use for formatting, or null for the default locale. A string representation of the sample value.



geophysics
public CategoryList geophysics(boolean toGeophysics)(Code)
If toGeophysics is true , returns a list of categories scaled to geophysics values. This method always returns a list of categories in which Category.geophysics(boolean) Category.geophysics (toGeophysics) has been invoked for each category.



get
final public Object get(int i)(Code)
Returns the element at the specified position in this list.



getCategory
final public Category getCategory(double sample)(Code)
Returns the category of the specified sample value. If no category fits, then this method returns null .
Parameters:
  sample - The value. The category of the supplied value, or null .



getColorModel
final public ColorModel getColorModel(int visibleBand, int numBands)(Code)
Returns a color model for this category list. This method builds up the color model from each category's colors (as returned by Category.getColors ).
Parameters:
  visibleBand - The band to be made visible (usually 0). All other bands, if anywill be ignored.
Parameters:
  numBands - The number of bands for the color model (usually 1). The returned colormodel will renderer only the visibleBand and ignore the others, butthe existence of all numBands will be at least tolerated. Supplementalbands, even invisible, are useful for processing with Java Advanced Imaging. The requested color model, suitable for RenderedImage objects with valuesin the CategoryList.getRange range.



getColorModel
final public ColorModel getColorModel(int visibleBand, int numBands, int type)(Code)
Returns a color model for this category list. This method builds up the color model from each category's colors (as returned by Category.getColors ).
Parameters:
  visibleBand - The band to be made visible (usually 0). All other bands, if anywill be ignored.
Parameters:
  numBands - The number of bands for the color model (usually 1). The returned colormodel will renderer only the visibleBand and ignore the others, butthe existence of all numBands will be at least tolerated. Supplementalbands, even invisible, are useful for processing with Java Advanced Imaging.
Parameters:
  type - The transfer type used in the sample model The requested color model, suitable for RenderedImage objects with valuesin the CategoryList.getRange range.



getName
final public InternationalString getName()(Code)
Returns the name of this object. The default implementation returns the name of what seems to be the "main" category (i.e. the quantitative category with the widest range of sample values) followed by the geophysics value range.



getRange
final public NumberRange getRange()(Code)
Returns the range of values in this category list. This is the union of the range of values of every categories, excluding NaN values. A NumberRange object give more informations than org.opengis.CV_SampleDimension.getMinimum and org.opengis.CV_SampleDimension.getMaximum since it contains also the type (integer, float, etc.) and inclusion/exclusion informations. The range of values. May be null if this category list has noquantitative category.
See Also:   Category.getRange



getSourceDimensions
final public int getSourceDimensions()(Code)
Gets the dimension of input points, which is 1.



getTargetDimensions
final public int getTargetDimensions()(Code)
Gets the dimension of output points, which is 1.



getUnits
public Unit getUnits()(Code)
Returns the unit information for quantitative categories in this list. May returns null if there is no quantitative categories in this list, or if there is no unit information.

This method is to be overridden by GeophysicsCategoryList . The default implementation returns null since sample values are not geophysics values as long as they have not been transformed. The GridSampleDimension class will invoke geophysics(true).getUnits() in order to get a non-null unit.




inverse
final public MathTransform inverse()(Code)
Returns the inverse transform of this object.



isIdentity
public boolean isIdentity()(Code)
Tests whether this transform does not move any points.



isScaled
final boolean isScaled(boolean toGeophysics)(Code)
Verify if all categories are scaled to the specified state. This is used mostly in assertion statements.
Parameters:
  toGeophysics - The state to test. true if all categories are in the specified state.



isScaled
static boolean isScaled(Category[] categories, boolean toGeophysics)(Code)
Verify if all categories are scaled to the specified state.
Parameters:
  categories - The categories to test.
Parameters:
  toGeophysics - The state to test. true if all categories are in the specified state.



isSorted
static boolean isSorted(Category[] categories)(Code)
Vérifie si le tableau de catégories spécifié est bien en ordre croissant. La comparaison ne tient pas compte des valeurs NaN . Cette méthode n'est utilisée que pour les assert .



size
final public int size()(Code)
Returns the number of categories in this list.



toArray
final public Object[] toArray()(Code)
Returns all categories in this CategoryList .



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



toString
final String toString(Object owner)(Code)
Returns a string representation of this category list. The owner argument allow for a different class name to be formatted.



toWKT
public String toWKT() throws UnsupportedOperationException(Code)
Returns a Well Known Text (WKT) for this object. This operation may fails if an object is too complex for the WKT format capability. The Well Know Text for this object.
throws:
  UnsupportedOperationException - If this object can't be formatted as WKT.



transform
final public DirectPosition transform(DirectPosition ptSrc, DirectPosition ptDst) throws TransformException(Code)
Transforms the specified ptSrc and stores the result in ptDst .



transform
final public double transform(double value) throws TransformException(Code)
Transforms the specified value.
Parameters:
  value - The value to transform. the transformed value.
throws:
  TransformException - if the value can't be transformed.



transform
final public void transform(double[] srcPts, int srcOff, double[] dstPts, int dstOff, int numPts) throws TransformException(Code)
Transforms a list of coordinate point ordinal values.



transform
final public void transform(float[] srcPts, int srcOff, float[] dstPts, int dstOff, int numPts) throws TransformException(Code)
Transforms a list of coordinate point ordinal values.



transform
final public void transform(WritableRectIter iterator) throws RasterFormatException(Code)
Transform a raster. Only the current band in iterator will be transformed. The transformed value are write back in the iterator . If a different destination raster is wanted, a org.geotools.image.TransfertRectIter may be used.
Parameters:
  iterator - An iterator to iterate among the samples to transform.
throws:
  RasterFormatException - if a problem occurs during the transformation.



Fields inherited from java.util.AbstractList
protected transient int modCount(Code)(Java Doc)

Methods inherited from java.util.AbstractList
public boolean add(E e)(Code)(Java Doc)
public void add(int index, E element)(Code)(Java Doc)
public boolean addAll(int index, Collection<? extends E> c)(Code)(Java Doc)
public void clear()(Code)(Java Doc)
public boolean equals(Object o)(Code)(Java Doc)
abstract public E get(int index)(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
public int indexOf(Object o)(Code)(Java Doc)
public Iterator<E> iterator()(Code)(Java Doc)
public int lastIndexOf(Object o)(Code)(Java Doc)
public ListIterator<E> listIterator()(Code)(Java Doc)
public ListIterator<E> listIterator(int index)(Code)(Java Doc)
public E remove(int index)(Code)(Java Doc)
protected void removeRange(int fromIndex, int toIndex)(Code)(Java Doc)
public E set(int index, E element)(Code)(Java Doc)
public List<E> subList(int fromIndex, int toIndex)(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.