Java Doc for GridCoverageFactory.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.factory.AbstractFactory
      org.geotools.coverage.grid.GridCoverageFactory

GridCoverageFactory
public class GridCoverageFactory extends AbstractFactory (Code)
A factory for objects. This factory expects various combinaisons of the following informations:

  • A name as a .
  • A , or an , or an , or a matrix of kind float[][] .
  • A ( - ) pair, or an , or a . The envelope is easier to use, while the transform provides more control.
  • Information about each (often called bands in the particular case of images), or minimal and maximal expected values for each bands.
  • Optional properties as a of key-value pairs. "Properties" in Java Advanced Imaging are called "Metadata" by OpenGIS. Keys are String objects ( CaselessStringKey are accepted as well), while values may be any Object .

The is inferred from the supplied or parameters. If those parameters do not have CRS information, then this factory fallback on a .

Every create methods will ultimately delegate their work to a master GridCoverageFactory.create(CharSequence,RenderedImage,GridGeometry2D,GridSampleDimension[],GridCoverage[],Map) create variant. Developpers can override this method if they want to intercept the creation of all GridCoverage2D objects in this factory.


since:
   2.1
author:
   Martin Desruisseaux
version:
   $Id: GridCoverageFactory.java 25449 2007-05-07 12:21:16Z desruisseaux $



Constructor Summary
public  GridCoverageFactory()
     Creates a default factory.
public  GridCoverageFactory(Hints userHints)
     Creates a factory using the specified set of hints.

Method Summary
public  GridCoverage2Dcreate(CharSequence name, ImageFunction function, GridGeometry2D gridGeometry, GridSampleDimension[] bands, Map properties)
     Constructs a grid coverage from an .
Parameters:
  name - The grid coverage name.
Parameters:
  function - The image function.
Parameters:
  gridGeometry - The grid geometry.
public  GridCoverage2Dcreate(CharSequence name, float[][] matrix, Envelope envelope)
     Constructs a grid coverage from the specified matrix and . A default color palette is built from the minimal and maximal values found in the matrix.
Parameters:
  name - The grid coverage name.
Parameters:
  matrix - The matrix data in a [row][column] layout.
public  GridCoverage2Dcreate(CharSequence name, WritableRaster raster, Envelope envelope)
     Constructs a grid coverage from the specified and .
public  GridCoverage2Dcreate(CharSequence name, WritableRaster raster, Envelope envelope, double[] minValues, double[] maxValues, Unit units, Color[][] colors, RenderingHints hints)
     Constructs a grid coverage from the specified and . See the for a note on heuristic rules applied by this method.
Parameters:
  name - The grid coverage name.
Parameters:
  raster - The data (may be floating point numbers).
public  GridCoverage2Dcreate(CharSequence name, WritableRaster raster, CoordinateReferenceSystem crs, MathTransform gridToCRS, double[] minValues, double[] maxValues, Unit units, Color[][] colors, RenderingHints hints)
     Constructs a grid coverage from the specified and " " transform.
Parameters:
  name - The grid coverage name.
Parameters:
  raster - The data (may be floating point numbers).
public  GridCoverage2Dcreate(CharSequence name, WritableRaster raster, Envelope envelope, GridSampleDimension[] bands)
     Constructs a grid coverage from the specified and .
public  GridCoverage2Dcreate(CharSequence name, WritableRaster raster, CoordinateReferenceSystem crs, MathTransform gridToCRS, GridSampleDimension[] bands)
     Constructs a grid coverage from the specified and " " transform.
Parameters:
  name - The grid coverage name.
Parameters:
  raster - The raster.
Parameters:
  crs - The coordinate reference system.
public  GridCoverage2Dcreate(CharSequence name, RenderedImage image, Envelope envelope)
     Constructs a grid coverage from the specified and .
public  GridCoverage2Dcreate(CharSequence name, RenderedImage image, Envelope envelope, GridSampleDimension[] bands, GridCoverage[] sources, Map properties)
     Constructs a grid coverage from the specified and .
public  GridCoverage2Dcreate(CharSequence name, RenderedImage image, CoordinateReferenceSystem crs, MathTransform gridToCRS, GridSampleDimension[] bands, GridCoverage[] sources, Map properties)
     Constructs a grid coverage from the specified and " " transform.
Parameters:
  name - The grid coverage name.
Parameters:
  image - The image.
Parameters:
  crs - The coordinate reference system.
public  GridCoverage2Dcreate(CharSequence name, RenderedImage image, GridGeometry2D gridGeometry, GridSampleDimension[] bands, GridCoverage[] sources, Map properties)
     Constructs a grid coverage from the specified and .
protected  CoordinateReferenceSystemgetDefaultCRS(int dimension)
     Returns the default coordinate reference system to use when no CRS were explicitly specified by the user.


Constructor Detail
GridCoverageFactory
public GridCoverageFactory()(Code)
Creates a default factory. Users should not need to creates instance of this class directly. Invoke org.geotools.coverage.FactoryFinder.getGridCoverageFactory instead.



GridCoverageFactory
public GridCoverageFactory(Hints userHints)(Code)
Creates a factory using the specified set of hints. The factory recognizes the following hints:





Method Detail
create
public GridCoverage2D create(CharSequence name, ImageFunction function, GridGeometry2D gridGeometry, GridSampleDimension[] bands, Map properties)(Code)
Constructs a grid coverage from an .
Parameters:
  name - The grid coverage name.
Parameters:
  function - The image function.
Parameters:
  gridGeometry - The grid geometry. The must contains the expected image size (width and height).
Parameters:
  bands - Sample dimensions for each image band, or null fordefault sample dimensions.
Parameters:
  properties - The set of properties for this coverage, or null if there is none.
since:
   2.2



create
public GridCoverage2D create(CharSequence name, float[][] matrix, Envelope envelope)(Code)
Constructs a grid coverage from the specified matrix and . A default color palette is built from the minimal and maximal values found in the matrix.
Parameters:
  name - The grid coverage name.
Parameters:
  matrix - The matrix data in a [row][column] layout. values are mapped to a transparent color.
Parameters:
  envelope - The envelope.
since:
   2.2



create
public GridCoverage2D create(CharSequence name, WritableRaster raster, Envelope envelope)(Code)
Constructs a grid coverage from the specified and . A default color palette is built from the minimal and maximal values found in the raster.
Parameters:
  name - The grid coverage name.
Parameters:
  raster - The data (may be floating point numbers). values are mapped to a transparent color.
Parameters:
  envelope - The envelope.



create
public GridCoverage2D create(CharSequence name, WritableRaster raster, Envelope envelope, double[] minValues, double[] maxValues, Unit units, Color[][] colors, RenderingHints hints)(Code)
Constructs a grid coverage from the specified and . See the for a note on heuristic rules applied by this method.
Parameters:
  name - The grid coverage name.
Parameters:
  raster - The data (may be floating point numbers). values are mapped to a transparent color.
Parameters:
  envelope - The grid coverage cordinates and its CRS. This envelope must have at leasttwo dimensions. The two first dimensions describe the image location alongx and y axis. The other dimensions are optional andmay be used to locate the image on a vertical axis or on the time axis.
Parameters:
  minValues - The minimal value for each band in the raster, or null for computing it automatically.
Parameters:
  maxValues - The maximal value for each band in the raster, or null for computing it automatically.
Parameters:
  units - The units of sample values, or null if unknow.
Parameters:
  colors - The colors to use for values from minValues to maxValues for each bands, or null for a default color palette. If non-null,each arrays colors[b] may have any length; colors will beinterpolated as needed.
Parameters:
  hints - An optional set of rendering hints, or null if none. Those hintswill not affect the grid coverage to be created. However, they may affectthe grid coverage to be returned by GridCoverage2D.geophysicsgeophysics(false), i.e. the view to be used at rendering time. Theoptional Hints.SAMPLE_DIMENSION_TYPE SAMPLE_DIMENSION_TYPE hintspecifies the SampleDimensionType to be used at rendering time,which can be one of SampleDimensionType.UNSIGNED_8BITS UNSIGNED_8BITSor SampleDimensionType.UNSIGNED_16BITS UNSIGNED_16BITS.
since:
   2.2



create
public GridCoverage2D create(CharSequence name, WritableRaster raster, CoordinateReferenceSystem crs, MathTransform gridToCRS, double[] minValues, double[] maxValues, Unit units, Color[][] colors, RenderingHints hints)(Code)
Constructs a grid coverage from the specified and " " transform.
Parameters:
  name - The grid coverage name.
Parameters:
  raster - The data (may be floating point numbers). values are mapped to a transparent color.
Parameters:
  crs - The coordinate reference system. This specifies the CRS used whenaccessing a grid coverage with the evaluate methods.
Parameters:
  gridToCRS - The math transform from grid to coordinate reference system.
Parameters:
  minValues - The minimal value for each band in the raster, or null for computing it automatically.
Parameters:
  maxValues - The maximal value for each band in the raster, or null for computing it automatically.
Parameters:
  units - The units of sample values, or null if unknow.
Parameters:
  colors - The colors to use for values from minValues to maxValues for each bands, or null for a default color palette. If non-null,each arrays colors[b] may have any length; colors will beinterpolated as needed.
Parameters:
  hints - An optional set of rendering hints, or null if none. Those hintswill not affect the grid coverage to be created. However, they may affectthe grid coverage to be returned by GridCoverage2D.geophysicsgeophysics(false), i.e. the view to be used at rendering time. Theoptional Hints.SAMPLE_DIMENSION_TYPE SAMPLE_DIMENSION_TYPE hintspecifies the SampleDimensionType to be used at rendering time,which can be one of SampleDimensionType.UNSIGNED_8BITS UNSIGNED_8BITSor SampleDimensionType.UNSIGNED_16BITS UNSIGNED_16BITS.



create
public GridCoverage2D create(CharSequence name, WritableRaster raster, Envelope envelope, GridSampleDimension[] bands)(Code)
Constructs a grid coverage from the specified and . This convenience constructor performs the same assumptions on axis order than the .

The is inferred from the supplied envelope. The envelope must have at least two dimensions. The two first dimensions describe the image location along x and y axis. The other dimensions are optional and may be used to locate the image on a vertical axis or on the time axis.
Parameters:
  name - The grid coverage name.
Parameters:
  raster - The raster.
Parameters:
  envelope - The grid coverage cordinates.
Parameters:
  bands - Sample dimensions for each image band, or null for defaultsample dimensions. If non-null, then this array's length must matchesthe number of bands in image .
since:
   2.2




create
public GridCoverage2D create(CharSequence name, WritableRaster raster, CoordinateReferenceSystem crs, MathTransform gridToCRS, GridSampleDimension[] bands)(Code)
Constructs a grid coverage from the specified and " " transform.
Parameters:
  name - The grid coverage name.
Parameters:
  raster - The raster.
Parameters:
  crs - The coordinate reference system. This specifies the CRS used whenaccessing a grid coverage with the evaluate methods. Thenumber of dimensions must matches the number of target dimensionsof gridToCRS .
Parameters:
  gridToCRS - The math transform from grid to coordinate reference system.
Parameters:
  bands - Sample dimensions for each image band, or null fordefault sample dimensions. If non-null, then this array's lengthmust matches the number of bands in image .
since:
   2.2



create
public GridCoverage2D create(CharSequence name, RenderedImage image, Envelope envelope)(Code)
Constructs a grid coverage from the specified and . A default set of is used. The is inferred from the supplied envelope.

The envelope must have at least two dimensions. The two first dimensions describe the image location along x and y axis. The other dimensions are optional and may be used to locate the image on a vertical axis or on the time axis.
Parameters:
  name - The grid coverage name.
Parameters:
  image - The image.
Parameters:
  envelope - The grid coverage cordinates.
since:
   2.2




create
public GridCoverage2D create(CharSequence name, RenderedImage image, Envelope envelope, GridSampleDimension[] bands, GridCoverage[] sources, Map properties)(Code)
Constructs a grid coverage from the specified and . An will be computed automatically from the specified envelope using heuristic rules described below.

This convenience constructor assumes that axis order in the supplied image matches exactly axis order in the supplied envelope. In other words, in the usual case where axis order in the image is (column, row), then the envelope should probably have a (longitude, latitude) or (easting, northing) axis order.

An exception to the above rule applies for CRS using exactly the following axis order: ( AxisDirection.NORTH NORTH | AxisDirection.SOUTH SOUTH , AxisDirection.EAST EAST | AxisDirection.WEST WEST ). An example of such CRS is EPSG:4326 . This convenience constructor will interchange automatically the (y,x) axis for such CRS.

If more control on axis order and direction reversal is wanted, use the .
Parameters:
  name - The grid coverage name.
Parameters:
  image - The image.
Parameters:
  envelope - The grid coverage cordinates. This envelope must have at least twodimensions. The two first dimensions describe the image locationalong x and y axis. The other dimensions areoptional and may be used to locate the image on a vertical axis oron the time axis.
Parameters:
  bands - Sample dimensions for each image band, or null for defaultsample dimensions. If non-null, then this array's length must matchesthe number of bands in image .
Parameters:
  sources - The sources for this grid coverage, or null if none.
Parameters:
  properties - The set of properties for this coverage, or null if there is none.
since:
   2.2




create
public GridCoverage2D create(CharSequence name, RenderedImage image, CoordinateReferenceSystem crs, MathTransform gridToCRS, GridSampleDimension[] bands, GridCoverage[] sources, Map properties)(Code)
Constructs a grid coverage from the specified and " " transform.
Parameters:
  name - The grid coverage name.
Parameters:
  image - The image.
Parameters:
  crs - The coordinate reference system. This specifies the CRS used whenaccessing a grid coverage with the evaluate methods. Thenumber of dimensions must matches the number of target dimensionsof gridToCRS .
Parameters:
  gridToCRS - The math transform from grid to coordinate reference system.
Parameters:
  bands - Sample dimension for each image band, or null for default sampledimensions. If non-null, then this array's length must matches the numberof bands in the image .
Parameters:
  sources - The sources for this grid coverage, or null if none.
Parameters:
  properties - The set of properties for this coverage, or null if there is none.



create
public GridCoverage2D create(CharSequence name, RenderedImage image, GridGeometry2D gridGeometry, GridSampleDimension[] bands, GridCoverage[] sources, Map properties)(Code)
Constructs a grid coverage from the specified and . The (including the ) is inferred from the grid geometry.

This is the most general constructor, the one that gives the maximum control on the grid coverage to be created. Every create methods will ultimately delegate their work this master method. Developpers can override this method if they want to intercept the creation of all GridCoverage2D objects in this factory.
Parameters:
  name - The grid coverage name.
Parameters:
  image - The image.
Parameters:
  gridGeometry - The grid geometry (must contains an with its and a "" transform).
Parameters:
  bands - Sample dimensions for each image band, or null for default sampledimensions. If non-null, then this array's length must matches the numberof bands in image .
Parameters:
  sources - The sources for this grid coverage, or null if none.
Parameters:
  properties - The set of properties for this coverage, or null none.
since:
   2.2




getDefaultCRS
protected CoordinateReferenceSystem getDefaultCRS(int dimension)(Code)
Returns the default coordinate reference system to use when no CRS were explicitly specified by the user. If a Hints.DEFAULT_COORDINATE_REFERENCE_SYSTEMDEFAULT_COORDINATE_REFERENCE_SYSTEM hint were provided at factory construction time, then the specified CRS is returned. Otherwise, the default implementation returns DefaultGeographicCRS.WGS84 or its 3D variant. Subclasses should override this method if they want to use different defaults.
Parameters:
  dimension - The number of dimension expected in the CRS to be returned.
since:
   2.2



Fields inherited from org.geotools.factory.AbstractFactory
final public static int MAXIMUM_PRIORITY(Code)(Java Doc)
final public static int MINIMUM_PRIORITY(Code)(Java Doc)
final public static int NORMAL_PRIORITY(Code)(Java Doc)
final protected Map hints(Code)(Java Doc)
final protected int priority(Code)(Java Doc)

Methods inherited from org.geotools.factory.AbstractFactory
final public boolean equals(Object object)(Code)(Java Doc)
public Map getImplementationHints()(Code)(Java Doc)
public int getPriority()(Code)(Java Doc)
final public int hashCode()(Code)(Java Doc)
public void onDeregistration(ServiceRegistry registry, Class category)(Code)(Java Doc)
public void onRegistration(ServiceRegistry registry, Class category)(Code)(Java Doc)
public String toString()(Code)(Java Doc)

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.