Source Code Cross Referenced for IViewportModel.java in  » GIS » udig-1.1 » net » refractions » udig » project » render » 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 » udig 1.1 » net.refractions.udig.project.render 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * uDig - User Friendly Desktop Internet GIS client http://udig.refractions.net (C) 2004,
003:         * Refractions Research Inc. This library is free software; you can redistribute it and/or modify it
004:         * under the terms of the GNU Lesser General Public License as published by the Free Software
005:         * Foundation; version 2.1 of the License. This library is distributed in the hope that it will be
006:         * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
007:         * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
008:         */
009:        package net.refractions.udig.project.render;
010:
011:        import java.awt.Dimension;
012:        import java.awt.Point;
013:        import java.awt.geom.AffineTransform;
014:
015:        import net.refractions.udig.project.IMap;
016:        import net.refractions.udig.project.internal.render.impl.ViewportModelImpl;
017:
018:        import org.opengis.referencing.crs.CoordinateReferenceSystem;
019:
020:        import com.vividsolutions.jts.geom.Coordinate;
021:        import com.vividsolutions.jts.geom.Envelope;
022:
023:        /**
024:         * Models the Viewport on the map.
025:         * 
026:         * @author Jesse
027:         * @since 0.5
028:         */
029:        public interface IViewportModel {
030:
031:            /**
032:             * A Default setting to use for the viewport CRS.
033:             */
034:            public static final CoordinateReferenceSystem DEFAULT_CRS = ViewportModelImpl.DEFAULT_CRS;
035:
036:            /**
037:             * Returns the local coordinate system. The local coordinate system is the CRS that all the
038:             * layer data will be transformed into. Once the layer data is transformed into the local CRS
039:             * then it is transformed for display onto the screen
040:             * 
041:             * @return the local coordinate system
042:             * @see CoordinateReferenceSystem
043:             */
044:            public CoordinateReferenceSystem getCRS();
045:
046:            /**
047:             * Returns the bounding box of the Viewport in world coordinates.
048:             * <p>
049:             * Note: Since Envelope is not a UDIG element changes to the bounds envelope object will not
050:             * raise events. Therefore the bounds should only be modified via the ViewportModel interface
051:             * </p>
052:             * The bounds are in the same CRS as returned by {@linkplain #getCRS()}
053:             * 
054:             * @return the bounding box of the Viewport in world coordinates.
055:             * @see Envelope
056:             */
057:            public Envelope getBounds(); // TODO: THIS MUST BE A REFERENCED ENVELOPE!
058:
059:            /**
060:             * Returns the center of the viewport in world coordinates. The bounds are in the same CRS as
061:             * returned by {@linkplain #getCRS()}
062:             * 
063:             * @return the center of the viewport in world coordinates
064:             * @see Coordinate
065:             */
066:            public Coordinate getCenter();
067:
068:            /**
069:             * Returns the Viewport's height in world coordinates. The bounds are in the same CRS as
070:             * returned by {@linkplain #getCRS()}
071:             * 
072:             * @return the Viewport's height in world coordinates.
073:             */
074:            public double getHeight();
075:
076:            /**
077:             * Returns the Viewport's width in world coordinates. The bounds are in the same CRS as returned
078:             * by {@linkplain #getCRS()}
079:             * 
080:             * @return the Viewport's width in world coordinates.
081:             */
082:            public double getWidth();
083:
084:            /**
085:             * Returns the aspect ratio of the viewport.
086:             * 
087:             * @return The aspect ratio of the viewport.
088:             */
089:            public double getAspectRatio();
090:
091:            /**
092:             * Gets the Map that contains the current ViewportModel
093:             * 
094:             * @return the Map that contains the current ViewportModel
095:             */
096:            public IMap getMap();
097:
098:            /**
099:             * Gets up the affine transform that will transform from the world to screen. A convenience
100:             * method.
101:             * 
102:             * @return a transform that maps from real world coordinates to the screen
103:             * @see AffineTransform
104:             */
105:            public AffineTransform worldToScreenTransform();
106:
107:            /**
108:             * Returns the pixel on the screen for a given coordinate in world space.
109:             * 
110:             * @param coord A coordinate in world space.
111:             * @return The pixel on the screen that the world coordinate is drawn on.
112:             * @see Point
113:             * @see Coordinate
114:             */
115:            public Point worldToPixel(Coordinate coord);
116:
117:            /**
118:             * Gets up the affine transform that will transform from the world to the display of size
119:             * destination. A convenience method. This method is independent of the CRS.
120:             * 
121:             * @return a transform that maps from real world coordinates to the screen
122:             */
123:            public AffineTransform worldToScreenTransform(Envelope mapExtent,
124:                    Dimension destination);
125:
126:            /**
127:             * Converts a coordinate expressed on the device space back to real world coordinates
128:             * 
129:             * @param x horizontal coordinate on device space
130:             * @param y vertical coordinate on device space
131:             * @return The correspondent real world coordinate
132:             * @see Coordinate
133:             */
134:            public Coordinate pixelToWorld(int x, int y);
135:
136:            /**
137:             * Returns the size of a pixel in world units.
138:             * 
139:             * @return the size of a pixel in world units.
140:             * @see Coordinate
141:             */
142:            public Coordinate getPixelSize();
143:
144:            /**
145:             * Find the scale denominator of the map.
146:             *   Method:
147:             *    1. find the diagonal distance (meters)
148:             *    2. find the diagonal distance (pixels)
149:             *    3. find the diagonal distance (meters) -- use DPI
150:             *    4. calculate scale (#1/#2)
151:             * 
152:             *   NOTE: return the scale denominator not the actual scale (1/scale = denominator)
153:             * 
154:             * TODO:  (SLD spec page 28):
155:             * Since it is common to integrate the output of multiple servers into a single displayed result in the 
156:             * web-mapping environment, it is important that different map servers have consistent behaviour with respect to 
157:             * processing scales, so that all of the independent servers will select or deselect rules at the same scales.
158:             * To insure consistent behaviour, scales relative to coordinate spaces must be handled consistently between map 
159:             * servers. For geographic coordinate systems, which use angular units, the angular coverage of a map should be 
160:             * converted to linear units for computation of scale by using the circumference of the Earth at the equator and 
161:             * by assuming perfectly square linear units. For linear coordinate systems, the size of the coordinate space 
162:             * should be used directly without compensating for distortions in it with respect to the shape of the real Earth.
163:             * 
164:             * NOTE: we are actually doing a a much more exact calculation, and accounting for non-square pixels
165:             * 
166:             * @return the scale denominator of the map on the current display.  Return -1 if something is wrong.  For example the display has not
167:             * yet been created.
168:             */
169:            public double getScaleDenominator();
170:
171:            /**
172:             * Adds a IViewportModelListener to this map.  A given listener will only be added once.
173:             *
174:             * @param listener Listener to be added
175:             * @see net.refractions.udig.project.ViewportModelEvent.ViewportModelEventType
176:             */
177:            public void addViewportModelListener(IViewportModelListener listener);
178:
179:            /**
180:             * Removes a IViewportModelListener from this map.
181:             *
182:             * @param listener Listener to be removed
183:             */
184:            public void removeViewportModelListener(
185:                    IViewportModelListener listener);
186:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.