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


org.geotools.coverage.processing.Operation2D
   org.geotools.coverage.processing.operation.Crop

Crop
public class Crop extends Operation2D (Code)
The crop operation is responsible for selecting geographic subarea of the source coverage. The CoverageCrop operation does not merely wrap the JAI Crop operation but it goes beyond that as far as capabilities.

The key point is that the CoverageCrop operation aims to perform a spatial crop, i.e. cropping the underlying raster by providing a spatial Envelope (if the envelope is not 2D only the 2D part of it will be used). This means that, depending on the grid-to-world transformation existing for the raster we want to crop the crop area in the raster space might not be a rectangle, hence JAI's crop may not suffice in order to shrink the raster area we would obtain. For this purpose this operation make use of either the JAI's Crop or Mosaic operations depending on the conditions in which we are working.

Meaning of the ROI_OPTIMISATION_TOLERANCE parameter
In general if the grid-to-world transform is a simple scale and translate using JAI's crop should suffice, but when the g2w transform contains rotations or skew then we need something more elaborate since a rectangle in model space may not map to a rectangle in raster space. We would still be able to crop using JAI's crop on this polygon bounds but, depending on how this rectangle is built, we would be highly inefficient. In order to overcome this problems we use a combination of JAI's crop and mosaic since the mosaic can be used to crop a raster using a general ROI instead of a simple rectangle. There is a negative effect though. Crop would not create a new raster but simply forwards requests back to the origina one (it basically create a viewport on the source raster) while the mosaic operation creates a new raster. We try to address this trade-off by providing the parameter Crop.ROI_OPTIMISATION_TOLERANCE , which basically tells this operation "Use the mosaic operation only if the area that we would load with the Mosaic is strictly smaller then (ROI_OPTIMISATION_TOLERANCE)* A' where A' is the area of the polygon resulting from converting the crop area from the model space to the raster space.

Meaning of the CONSERVE_ENVELOPE parameter
When we crop a coverage using a spatial envelope we may incur in a few issues with approximations when applying the grid-to-world transform and its inverse. Goal of this parameter is to suggest this operation to conserve the input crop envelope, if possible, instead of conserving the original grid-to-world transform. This would help when doing something like building a mosaic from a single coverage.

NOTE that in case we will use the Mosaic operation with a ROI, such a ROI will be added as a synthetic property to the resulting coverage. The key for this property will be GC_ROI and the type of the object Polygon .
version:
   $Id: Crop.java 27037 2007-09-18 12:58:10Z simboss $
author:
   Simone Giannecchini, GeoSolutions
since:
   2.3
See Also:   javax.media.jai.operator.ScaleDescriptor



Field Summary
final public static  ParameterDescriptorCONSERVE_ENVELOPE
     The parameter descriptor is basically a simple boolean that tells this operation to conserve the envelope that it gets as input.
final public static  ParameterDescriptorCROP_ENVELOPE
     The parameter descriptor used to pass this operation the envelope to use when doing the spatial crop.
final public static  ParameterDescriptorROI_OPTIMISATION_TOLERANCE
     The parameter descriptor use to tell this operation to optimize the crop using a Mosaic in where the are of the image we would not load is smaller than ROI_OPTIMISATION_TOLERANCE*FULL_CROP.

Constructor Summary
public  Crop()
    

Method Summary
public  CoveragedoOperation(ParameterValueGroup parameters, Hints hints)
    

Field Detail
CONSERVE_ENVELOPE
final public static ParameterDescriptor CONSERVE_ENVELOPE(Code)
The parameter descriptor is basically a simple boolean that tells this operation to conserve the envelope that it gets as input.

See this class javadocs for an explanation.




CROP_ENVELOPE
final public static ParameterDescriptor CROP_ENVELOPE(Code)
The parameter descriptor used to pass this operation the envelope to use when doing the spatial crop.



ROI_OPTIMISATION_TOLERANCE
final public static ParameterDescriptor ROI_OPTIMISATION_TOLERANCE(Code)
The parameter descriptor use to tell this operation to optimize the crop using a Mosaic in where the are of the image we would not load is smaller than ROI_OPTIMISATION_TOLERANCE*FULL_CROP.




Constructor Detail
Crop
public Crop()(Code)

throws:
  OperationNotFoundException -




Method Detail
doOperation
public Coverage doOperation(ParameterValueGroup parameters, Hints hints)(Code)



Fields inherited from org.geotools.coverage.processing.Operation2D
final protected static int PRIMARY_SOURCE_INDEX(Code)(Java Doc)
final public static ParameterDescriptor SOURCE_0(Code)(Java Doc)

Methods inherited from org.geotools.coverage.processing.Operation2D
protected boolean computeOnGeophysicsValues(ParameterValueGroup parameters)(Code)(Java Doc)
protected ViewType extractSources(ParameterValueGroup parameters, String[] sourceNames, GridCoverage2D[] sources) throws ParameterNotFoundException, InvalidParameterValueException(Code)(Java Doc)
protected static GridCoverageFactory getFactory(Hints hints)(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.