Source Code Cross Referenced for SelectSampleDimension.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 Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *    GeoTools - OpenSource mapping toolkit
003:         *    http://geotools.org
004:         *    (C) 2005-2006, Geotools Project Managment Committee (PMC)
005:         *    (C) 2003, Institut de Recherche pour le Développement
006:         *
007:         *    This library is free software; you can redistribute it and/or
008:         *    modify it under the terms of the GNU Lesser General Public
009:         *    License as published by the Free Software Foundation; either
010:         *    version 2.1 of the License, or (at your option) any later version.
011:         *
012:         *    This library is distributed in the hope that it will be useful,
013:         *    but WITHOUT ANY WARRANTY; without even the implied warranty of
014:         *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
015:         *    Lesser General Public License for more details.
016:         *
017:         *    This package contains documentation from OpenGIS specifications.
018:         *    OpenGIS consortium's work is fully acknowledged here.
019:         */
020:        package org.geotools.coverage.processing.operation;
021:
022:        // JAI dependencies (for javadoc)
023:        import javax.media.jai.operator.BandSelectDescriptor;
024:
025:        // OpenGIS dependencies
026:        import org.opengis.coverage.Coverage;
027:        import org.opengis.parameter.ParameterValueGroup;
028:        import org.opengis.parameter.ParameterDescriptor;
029:
030:        // Geotools dependencies
031:        import org.geotools.factory.Hints;
032:        import org.geotools.coverage.processing.Operation2D;
033:        import org.geotools.metadata.iso.citation.Citations;
034:        import org.geotools.parameter.DefaultParameterDescriptor;
035:        import org.geotools.parameter.DefaultParameterDescriptorGroup;
036:
037:        /**
038:         * Chooses <var>N</var> {@linkplain org.geotools.coverage.GridSampleDimension sample dimensions}
039:         * from a grid coverage and copies their sample data to the destination grid coverage in the order
040:         * specified. The {@code "SampleDimensions"} parameter specifies the source
041:         * {@link org.geotools.coverage.GridSampleDimension} indices, and its size
042:         * ({@code SampleDimensions.length}) determines the number of sample dimensions of the destination
043:         * grid coverage. The destination coverage may have any number of sample dimensions, and a particular
044:         * sample dimension of the source coverage may be repeated in the destination coverage by specifying
045:         * it multiple times in the {@code "SampleDimensions"} parameter.
046:         * <p>
047:         * <strong>Geotools extension:</strong><br>
048:         * This operation can also be used for selecting a different "visible sample dimension". Some
049:         * images may contain useful data in more than one sample dimension, but renderer the content
050:         * using only 1 sample dimension at time. The {@code "VisibleSampleDimension"} parameter can be
051:         * used for selecting this sample dimension. If ommited, then the new grid coverage will inherit
052:         * its source's visible sample dimension.
053:         *
054:         * <P><STRONG>Name:</STRONG>&nbsp;<CODE>"SelectSampleDimension"</CODE><BR>
055:         *    <STRONG>JAI operator:</STRONG>&nbsp;<CODE>"{@linkplain BandSelectDescriptor BandSelect}"</CODE><BR>
056:         *    <STRONG>Parameters:</STRONG></P>
057:         * <table border='3' cellpadding='6' bgcolor='F4F8FF'>
058:         *   <tr bgcolor='#B9DCFF'>
059:         *     <th>Name</th>
060:         *     <th>Class</th>
061:         *     <th>Default value</th>
062:         *     <th>Minimum value</th>
063:         *     <th>Maximum value</th>
064:         *   </tr>
065:         *   <tr>
066:         *     <td>{@code "Source"}</td>
067:         *     <td>{@link org.geotools.coverage.grid.GridCoverage2D}</td>
068:         *     <td align="center">N/A</td>
069:         *     <td align="center">N/A</td>
070:         *     <td align="center">N/A</td>
071:         *   </tr>
072:         *   <tr>
073:         *     <td>{@code "SampleDimensions"}</td>
074:         *     <td>{@code int[]}</td>
075:         *     <td align="center">Same as source</td>
076:         *     <td align="center">N/A</td>
077:         *     <td align="center">N/A</td>
078:         *   </tr>
079:         *   <tr>
080:         *     <td>{@code "VisibleSampleDimension"}</td>
081:         *     <td>{@link java.lang.Integer}</td>
082:         *     <td align="center">Same as source</td>
083:         *     <td align="center">0</td>
084:         *     <td align="center">N/A</td>
085:         *   </tr>
086:         * </table>
087:         *
088:         * @since 2.2
089:         * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/coverage/src/main/java/org/geotools/coverage/processing/operation/SelectSampleDimension.java $
090:         * @version $Id: SelectSampleDimension.java 20970 2006-08-11 07:53:22Z jgarnett $
091:         * @author Martin Desruisseaux
092:         *
093:         * @see org.geotools.coverage.processing.Operations#selectSampleDimension
094:         * @see BandSelectDescriptor
095:         */
096:        public class SelectSampleDimension extends Operation2D {
097:            /**
098:             * Serial number for interoperability with different versions.
099:             */
100:            private static final long serialVersionUID = 6889502343896409135L;
101:
102:            /**
103:             * The parameter descriptor for the sample dimension indices.
104:             */
105:            public static final ParameterDescriptor SAMPLE_DIMENSIONS = new DefaultParameterDescriptor(
106:                    Citations.OGC, "SampleDimensions", int[].class, // Value class (mandatory)
107:                    null, // Array of valid values
108:                    null, // Default value
109:                    null, // Minimal value
110:                    null, // Maximal value
111:                    null, // Unit of measure
112:                    false); // Parameter is optional
113:
114:            /**
115:             * The parameter descriptor for the visible dimension indice.
116:             * This is a Geotools-specific parameter.
117:             */
118:            public static final ParameterDescriptor VISIBLE_SAMPLE_DIMENSION = new DefaultParameterDescriptor(
119:                    Citations.GEOTOOLS, "VisibleSampleDimension",
120:                    Integer.class, // Value class (mandatory)
121:                    null, // Array of valid values
122:                    null, // Default value
123:                    new Integer(0), // Minimal value
124:                    null, // Maximal value
125:                    null, // Unit of measure
126:                    false); // Parameter is optional
127:
128:            /**
129:             * Constructs a default {@code "SelectSampleDimension"} operation.
130:             */
131:            public SelectSampleDimension() {
132:                super (new DefaultParameterDescriptorGroup(
133:                        "SelectSampleDimension", new ParameterDescriptor[] {
134:                                SOURCE_0, SAMPLE_DIMENSIONS,
135:                                VISIBLE_SAMPLE_DIMENSION }));
136:            }
137:
138:            /**
139:             * Applies the band select operation to a grid coverage. This method is
140:             * invoked by {@link org.geotools.coverage.processing.DefaultProcessor}
141:             * for the {@code "SelectSampleDimension"} operation.
142:             *
143:             * @param  parameters List of name value pairs for the parameters.
144:             * @param  hints A set of rendering hints, or {@code null} if none.
145:             * @return The result as a grid coverage.
146:             */
147:            public Coverage doOperation(final ParameterValueGroup parameters,
148:                    final Hints hints) {
149:                return BandSelector2D.create(parameters, hints);
150:            }
151:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.