Java Doc for AbstractCoverage.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) 


org.geotools.coverage.AbstractCoverage

All known Subclasses:   org.geotools.coverage.grid.AbstractGridCoverage,  org.geotools.coverage.SpatioTemporalCoverage3D,  org.geotools.coverage.CoverageStack,  org.geotools.coverage.TransformedCoverage,
AbstractCoverage
abstract public class AbstractCoverage extends PropertySourceImpl implements Coverage(Code)
Base class of all coverage type. The essential property of coverage is to be able to generate a value for any point within its domain. How coverage is represented internally is not a concern. For example consider the following different internal representations of coverage:

  • A coverage may be represented by a set of polygons which exhaustively tile a plane (that is each point on the plane falls in precisely one polygon). The value returned by the coverage for a point is the value of an attribute of the polygon that contains the point.
  • A coverage may be represented by a grid of values. The value returned by the coverage for a point is that of the grid value whose location is nearest the point.
  • Coverage may be represented by a mathematical function. The value returned by the coverage for a point is just the return value of the function when supplied the coordinates of the point as arguments.
  • Coverage may be represented by combination of these. For example, coverage may be represented by a combination of mathematical functions valid over a set of polynomials.

since:
   2.1
version:
   $Id: AbstractCoverage.java 27848 2007-11-12 13:10:32Z desruisseaux $
author:
   Martin Desruisseaux

Inner Class :protected class Renderable extends PropertySourceImpl implements RenderableImage,ImageFunction

Field Summary
final protected  CoordinateReferenceSystemcrs
     The coordinate reference system, or null if there is none.

Constructor Summary
protected  AbstractCoverage(CharSequence name, CoordinateReferenceSystem crs, PropertySource source, Map properties)
     Constructs a coverage using the specified coordinate reference system.
protected  AbstractCoverage(CharSequence name, Coverage coverage)
     Constructs a new coverage with the same parameters than the specified coverage.

Note: This constructor keeps a strong reference to the source coverage (through PropertySourceImpl ).


Method Summary
public  booleandispose(boolean force)
     Provides a hint that a coverage will no longer be accessed from a reference in user space. This can be used as a hint in situations where waiting for garbage collection would be overly conservative.
public  voiddispose()
    
public  Setevaluate(DirectPosition coord, Set list)
     Returns a set of records of feature attribute values for the specified direct position.
public  boolean[]evaluate(DirectPosition coord, boolean[] dest)
     Returns a sequence of boolean values for a given point in the coverage.
public  byte[]evaluate(DirectPosition coord, byte[] dest)
     Returns a sequence of byte values for a given point in the coverage.
public  int[]evaluate(DirectPosition coord, int[] dest)
     Returns a sequence of integer values for a given point in the coverage.
public  float[]evaluate(DirectPosition coord, float[] dest)
     Returns a sequence of float values for a given point in the coverage.
public  double[]evaluate(DirectPosition coord, double[] dest)
     Returns a sequence of double values for a given point in the coverage.
public  SetevaluateInverse(Record v)
     Returns a set of for the specified record of feature attribute values.
public  Listfind(DirectPosition p, int limit)
     Returns the sequence of geometry-value pairs that include the nearest to the direct position and their distances from the direction position.
public  GeometryValuePairfind(DirectPosition p)
     Returns the nearest geometry-value pair from the specified direct position.
public  CommonPointRulegetCommonPointRule()
     Identifies the procedure to be used for evaluating the coverage at a position that falls either on a boundary between geometric objects or within the boundaries of two or more overlapping geometric objects.
public  CoordinateReferenceSystemgetCoordinateReferenceSystem()
     Returns the coordinate reference system to which the objects in its domain are referenced.
final public  intgetDimension()
     Returns the dimension of this coverage.
public  InternationalString[]getDimensionNames()
     Returns the names of each dimension in this coverage.
final public  String[]getDimensionNames(Locale locale)
     Returns the names of each dimension in this coverage.
public  SetgetDomainElements()
     Returns the set of domain objects in the domain.
public  SetgetDomainExtents()
     Returns the extent of the domain of the coverage.
public  EnvelopegetEnvelope()
     Returns the bounding box for the coverage domain in coordinates.
public  LocalegetLocale()
     Returns the default locale for logging, error messages, etc..
public  String[]getMetadataNames()
     List of metadata keywords for a coverage.
public  StringgetMetadataValue(String name)
     Retrieve the metadata value for a given metadata name.
public  InternationalStringgetName()
     Returns the coverage name.
public  SetgetRangeElements()
     Returns the set of attribute values in the range.
public  RecordTypegetRangeType()
     Describes the range of the coverage.
public  RenderableImagegetRenderableImage(int xAxis, int yAxis)
     Returns 2D view of this grid coverage as a renderable image.
public  ListgetSources()
     Returns the source data for a coverage.
public  Setlist()
     Returns the dictionary of geometry-value pairs that contain the in the domain of the coverage each paired with its record of feature attribute values.
public  Setselect(Geometry arg0, Period arg1)
     Returns the set of geometry-value pairs that contain that lie within the specified geometry and period. If s is null, the operation shall return all geometry-value pairs that contain within t .
public  voidshow(int xAxis, int yAxis)
     Display this coverage in a windows.
public  voidshow(String title, int xAxis, int yAxis)
     Display this coverage in a windows.
public  voidshow(String title)
     Display this coverage in a windows.
public  voidshow()
     Displays this coverage in a windows.
public  StringtoString()
     Returns a string representation of this coverage.

Field Detail
crs
final protected CoordinateReferenceSystem crs(Code)
The coordinate reference system, or null if there is none.




Constructor Detail
AbstractCoverage
protected AbstractCoverage(CharSequence name, CoordinateReferenceSystem crs, PropertySource source, Map properties)(Code)
Constructs a coverage using the specified coordinate reference system. If the coordinate reference system is null , then the subclasses must override AbstractCoverage.getDimension() .
Parameters:
  name - The coverage name.
Parameters:
  crs - The coordinate reference system. This specifies the CRS used when accessinga coverage or grid coverage with the evaluate(...) methods.
Parameters:
  source - The source for this coverage, or null if none. Source may be (but isnot limited to) a PlanarImage or an other AbstractCoverage object.
Parameters:
  properties - The set of properties for this coverage, or null if there isnone. "Properties" in Java Advanced Imaging is what OpenGIScalls "Metadata". Keys are String objects (CaselessStringKeyare accepted as well), while values may be any Object.



AbstractCoverage
protected AbstractCoverage(CharSequence name, Coverage coverage)(Code)
Constructs a new coverage with the same parameters than the specified coverage.

Note: This constructor keeps a strong reference to the source coverage (through PropertySourceImpl ). In many cases, it is not a problem since GridCoverage will retains a strong reference to its source anyway.
Parameters:
  name - The name for this coverage, or null for the same than coverage .
Parameters:
  coverage - The source coverage.





Method Detail
dispose
public boolean dispose(boolean force)(Code)
Provides a hint that a coverage will no longer be accessed from a reference in user space. This can be used as a hint in situations where waiting for garbage collection would be overly conservative. The results of referencing a coverage after a call to dispose are undefined, except if this method returned false .

This method can work in a conservative mode or a forced mode, determined by the force argument:

  • If force is false (the recommanded value), this method may process only under some conditions. For example a grid coverage may dispose its planar image only if it has no . This method returns true if it disposed at least some resources, or false if this method vetoed against the disposal. In the later case, no resources were disposed and this coverage can still be used.

  • If force is true , then this method processes inconditionnally and returns always true . This is a more risky behavior.

The conservative mode ( force = false ) performs its safety checks on a best-effort basis, with no guarantees. Therefore, it would be wrong to write a program that depended on the safety checks for its correctness. In case of doubt about whatever this coverage still in use or not, it is safer to rely on the garbage collector.
Parameters:
  force - true for forcing an inconditionnal disposal, or false forperforming a conservative disposal. The recommanded value is false . true if this method disposed at least some resources, or false if this method vetoed against the disposal.
See Also:   PlanarImage.dispose
since:
   2.4



dispose
public void dispose()(Code)
AbstractCoverage.dispose(boolean)



evaluate
public Set evaluate(DirectPosition coord, Set list)(Code)
Returns a set of records of feature attribute values for the specified direct position. The parameter list is a sequence of feature attribute names each of which identifies a field of the range type. If list is null, the operation shall return a value for every field of the range type. Otherwise, it shall return a value for each field included in list . If the direct position passed is not in the domain of the coverage, then an exception is thrown. If the input direct position falls within two or more geometric objects within the domain, the operation shall return records of feature attribute values computed according to the .

NOTE: Normally, the operation will return a single record of feature attribute values.
since:
   2.3AbstractCoverage.list




evaluate
public boolean[] evaluate(DirectPosition coord, boolean[] dest) throws CannotEvaluateException(Code)
Returns a sequence of boolean values for a given point in the coverage. A value for each is included in the sequence. The default interpolation type used when accessing grid values for points which fall between grid cells is , but it can be changed by some . The CRS of the point is the same as the grid coverage .
Parameters:
  coord - The coordinate point where to evaluate.
Parameters:
  dest - An array in which to store values, or null to create a new array. The dest array, or a newly created array if dest was null.
throws:
  PointOutsideCoverageException - if the evaluation failed because the input pointhas invalid coordinates.
throws:
  CannotEvaluateException - if the values can't be computed at the specified coordinatefor an other reason. It may be thrown if the coverage data type can't be convertedto boolean by an identity or widening conversion. Subclasses may relax thisconstraint if appropriate.



evaluate
public byte[] evaluate(DirectPosition coord, byte[] dest) throws CannotEvaluateException(Code)
Returns a sequence of byte values for a given point in the coverage. A value for each is included in the sequence. The default interpolation type used when accessing grid values for points which fall between grid cells is , but it can be changed by some . The CRS of the point is the same as the grid coverage .
Parameters:
  coord - The coordinate point where to evaluate.
Parameters:
  dest - An array in which to store values, or null to create a new array. The dest array, or a newly created array if dest was null.
throws:
  PointOutsideCoverageException - if the evaluation failed because the input pointhas invalid coordinates.
throws:
  PointOutsideCoverageException - if the evaluation failed because the input pointhas invalid coordinates.
throws:
  CannotEvaluateException - if the values can't be computed at the specified coordinatefor an other reason. It may be thrown if the coverage data type can't be convertedto byte by an identity or widening conversion. Subclasses may relax thisconstraint if appropriate.



evaluate
public int[] evaluate(DirectPosition coord, int[] dest) throws CannotEvaluateException(Code)
Returns a sequence of integer values for a given point in the coverage. A value for each is included in the sequence. The default interpolation type used when accessing grid values for points which fall between grid cells is , but it can be changed by some . The CRS of the point is the same as the grid coverage .
Parameters:
  coord - The coordinate point where to evaluate.
Parameters:
  dest - An array in which to store values, or null to create a new array. The dest array, or a newly created array if dest was null.
throws:
  PointOutsideCoverageException - if the evaluation failed because the input pointhas invalid coordinates.
throws:
  CannotEvaluateException - if the values can't be computed at the specified coordinatefor an other reason. It may be thrown if the coverage data type can't be convertedto int by an identity or widening conversion. Subclasses may relax thisconstraint if appropriate.



evaluate
public float[] evaluate(DirectPosition coord, float[] dest) throws CannotEvaluateException(Code)
Returns a sequence of float values for a given point in the coverage. A value for each is included in the sequence. The default interpolation type used when accessing grid values for points which fall between grid cells is , but it can be changed by some . The CRS of the point is the same as the grid coverage .
Parameters:
  coord - The coordinate point where to evaluate.
Parameters:
  dest - An array in which to store values, or null to create a new array. The dest array, or a newly created array if dest was null.
throws:
  PointOutsideCoverageException - if the evaluation failed because the input pointhas invalid coordinates.
throws:
  CannotEvaluateException - if the values can't be computed at the specified coordinatefor an other reason. It may be thrown if the coverage data type can't be convertedto float by an identity or widening conversion. Subclasses may relax thisconstraint if appropriate.



evaluate
public double[] evaluate(DirectPosition coord, double[] dest) throws CannotEvaluateException(Code)
Returns a sequence of double values for a given point in the coverage. A value for each is included in the sequence. The default interpolation type used when accessing grid values for points which fall between grid cells is , but it can be changed by some . The CRS of the point is the same as the grid coverage .
Parameters:
  coord - The coordinate point where to evaluate.
Parameters:
  dest - An array in which to store values, or null to create a new array. The dest array, or a newly created array if dest was null.
throws:
  PointOutsideCoverageException - if the evaluation failed because the input pointhas invalid coordinates.
throws:
  CannotEvaluateException - if the values can't be computed at the specified coordinatefor an other reason. It may be thrown if the coverage data type can't be convertedto double by an identity or widening conversion. Subclasses may relax thisconstraint if appropriate.



evaluateInverse
public Set evaluateInverse(Record v)(Code)
Returns a set of for the specified record of feature attribute values. Normally, this method returns the set of in the domain that are associated with values equal to those in the input record. However, the operation may return other derived from those in the domain, as specified by the application schema.

Example: The evaluateInverse operation could return a set of contours derived from the feature attribute values associated with the of a grid coverage.

This method is not yet implemented.
since:
   2.3




find
public List find(DirectPosition p, int limit)(Code)
Returns the sequence of geometry-value pairs that include the nearest to the direct position and their distances from the direction position. The sequence shall be ordered by distance from the direct position, beginning with the record containing the nearest to the direct position. The length of the sequence (the number of geometry-value pairs returned) shall be no greater than the number specified by the parameter limit . The default shall be to return a single geometry-value pair. The operation shall return a warning if the last in the sequence is at a distance from the direct position equal to the distance of other that are not included in the sequence. In the case of an analytical coverage, the operation shall return the empty set.

NOTE: This operation is useful when the domain of a coverage does not exhaustively partition the extent of the coverage. Even in that case, the first element of the sequence returned may be the geometry-value pair that contains the input direct position.

This method is not yet implemented.
since:
   2.3




find
public GeometryValuePair find(DirectPosition p)(Code)
Returns the nearest geometry-value pair from the specified direct position. This is a shortcut for (p,1).
since:
   2.3



getCommonPointRule
public CommonPointRule getCommonPointRule()(Code)
Identifies the procedure to be used for evaluating the coverage at a position that falls either on a boundary between geometric objects or within the boundaries of two or more overlapping geometric objects. The geometric objects are either or .

This method is not yet implemented.
since:
   2.3




getCoordinateReferenceSystem
public CoordinateReferenceSystem getCoordinateReferenceSystem()(Code)
Returns the coordinate reference system to which the objects in its domain are referenced. This is the CRS used when accessing a coverage or grid coverage with the evaluate(...) methods. This coordinate reference system is usually different than coordinate system of the grid. It is the target coordinate reference system of the GridGeometry.getGridToCRS gridToCRS math transform.

Grid coverage can be accessed (re-projected) with new coordinate reference system with the GridCoverageProcessor component. In this case, a new instance of a grid coverage is created. The coordinate reference system used when accessing a coverage orgrid coverage with the evaluate(...) methods.
See Also:   org.geotools.coverage.grid.GeneralGridGeometry.getGridToCRS




getDimension
final public int getDimension()(Code)
Returns the dimension of this coverage. This is a shortcut for .getCoordinateSystem().getDimension().



getDimensionNames
public InternationalString[] getDimensionNames()(Code)
Returns the names of each dimension in this coverage. Typically these names are "x", "y", "z" and "t". The number of items in the sequence is the number of dimensions in the coverage. Grid coverages are typically 2D (x, y) while other coverages may be 3D (x, y, z) or 4D (x, y, z, t). The of the coverage is the number of entries in the list of dimension names.

The default implementation ask for axis names, or returns "x", "y"... if this coverage has no CRS. The names of each dimension. The array's length is equals toAbstractCoverage.getDimension.




getDimensionNames
final public String[] getDimensionNames(Locale locale)(Code)
Returns the names of each dimension in this coverage. AbstractCoverage.getDimensionNames()



getDomainElements
public Set getDomainElements()(Code)
Returns the set of domain objects in the domain. The collection must contains at least one element.

This method is not yet implemented.
since:
   2.3AbstractCoverage.getEnvelopeDomainObject




getDomainExtents
public Set getDomainExtents()(Code)
Returns the extent of the domain of the coverage. Extents may be specified in space, time or space-time. The collection must contains at least one element.

This method is not yet implemented.
since:
   2.3AbstractCoverage.getEnvelopeExtent




getEnvelope
public Envelope getEnvelope()(Code)
Returns the bounding box for the coverage domain in coordinates. May be null if this coverage has no associated coordinate reference system. For grid coverages, the grid cells are centered on each grid coordinate. The envelope for a 2-D grid coverage includes the following corner positions.
 (Minimum row - 0.5, Minimum column - 0.5) for the minimum coordinates
 (Maximum row - 0.5, Maximum column - 0.5) for the maximum coordinates
 
The default implementation returns the domain of validity of the CRS, if there is one. The bounding box for the coverage domain in coordinate system coordinates.



getLocale
public Locale getLocale()(Code)
Returns the default locale for logging, error messages, etc..



getMetadataNames
public String[] getMetadataNames()(Code)
List of metadata keywords for a coverage. If no metadata is available, the sequence will be empty. The default implementation gets the list of metadata names from the AbstractCoverage.getPropertyNames() method. the list of metadata keywords for a coverage.AbstractCoverage.getPropertyNames()



getMetadataValue
public String getMetadataValue(String name) throws MetadataNameNotFoundException(Code)
Retrieve the metadata value for a given metadata name. The default implementation query the AbstractCoverage.getProperty(String) method.
Parameters:
  name - Metadata keyword for which to retrieve data. the metadata value for a given metadata name.
throws:
  MetadataNameNotFoundException - if there is no value for the specified metadata name.AbstractCoverage.getProperty(String)



getName
public InternationalString getName()(Code)
Returns the coverage name. The default implementation returns the name specified at construction time.



getRangeElements
public Set getRangeElements()(Code)
Returns the set of attribute values in the range. The range of a coverage shall be a homogeneous collection of records. That is, the range shall have a constant dimension over the entire domain, and each field of the record shall provide a value of the same attribute type over the entire domain.

In the case of a , the size of the range collection equals that of the collection. In other words, there is one instance of AttributeValues for each instance of DomainObject . Usually, these are stored values that are accessed by the AbstractCoverage.evaluate(DirectPosition,Collection) evaluate operation.

In the case of a , there is a transfinite number of instances of AttributeValues for each DomainObject . A few instances may be stored as input for the AbstractCoverage.evaluate(DirectPosition,Collection) evaluate operation, but most are generated as needed by that operation.

NOTE: ISO 19123 does not specify how the and associations are to be implemented. The relevant data may be generated in real time, it may be held in persistent local storage, or it may be electronically accessible from remote locations.

This method is not yet implemented.
since:
   2.3




getRangeType
public RecordType getRangeType()(Code)
Describes the range of the coverage. It consists of a list of attribute name/data type pairs. A simple list is the most common form of range type, but RecordType can be used recursively to describe more complex structures. The range type for a specific coverage shall be specified in an application schema.

This method is not yet implemented.
since:
   2.3




getRenderableImage
public RenderableImage getRenderableImage(int xAxis, int yAxis)(Code)
Returns 2D view of this grid coverage as a renderable image. This method allows interoperability with Java2D.
Parameters:
  xAxis - Dimension to use for the x display axis.
Parameters:
  yAxis - Dimension to use for the y display axis. A 2D view of this grid coverage as a renderable image.



getSources
public List getSources()(Code)
Returns the source data for a coverage. The default implementation returns an empty list.



list
public Set list()(Code)
Returns the dictionary of geometry-value pairs that contain the in the domain of the coverage each paired with its record of feature attribute values. In the case of an analytical coverage, the operation shall return the empty set.

This method is not yet implemented.
since:
   2.3




select
public Set select(Geometry arg0, Period arg1)(Code)
Returns the set of geometry-value pairs that contain that lie within the specified geometry and period. If s is null, the operation shall return all geometry-value pairs that contain within t . If the value of t is null, the operation shall return all geometry-value pair that contain within s . In the case of an analytical coverage, the operation shall return the empty set.

This method is not yet implemented.
since:
   2.3




show
public void show(int xAxis, int yAxis)(Code)
Display this coverage in a windows. This convenience method is used for debugging purpose. The exact appareance of the windows and the tools provided may changes in future versions.
Parameters:
  xAxis - Dimension to use for the x display axis.
Parameters:
  yAxis - Dimension to use for the y display axis.AbstractCoverage.show(String,int,int)



show
public void show(String title, int xAxis, int yAxis)(Code)
Display this coverage in a windows. This convenience method is used for debugging purpose. The exact appareance of the windows and the tools provided may changes in future versions.
Parameters:
  title - The window title, or null for default value.
Parameters:
  xAxis - Dimension to use for the x display axis.
Parameters:
  yAxis - Dimension to use for the y display axis.
since:
   2.3



show
public void show(String title)(Code)
Display this coverage in a windows. This convenience method is used for debugging purpose. The exact appareance of the windows and the tools provided may changes in future versions.
Parameters:
  title - The window title, or null for default value.
since:
   2.3



show
public void show()(Code)
Displays this coverage in a windows. This convenience method is used for debugging purpose. The exact appareance of the windows and the tools provided may changes in future versions.



toString
public String toString()(Code)
Returns a string representation of this coverage. This string is for debugging purpose only and may change in future version.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.