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


java.lang.Object
   org.geotools.renderer.lite.RendererUtilities

RendererUtilities
final public class RendererUtilities (Code)
Class for holding utility functions that are common tasks for people using the "StreamingRenderer/Renderer".
author:
   dblasby
author:
   Simone Giannecchini


Field Summary
final static  doubleOGC_DEGREE_TO_METERS
    


Method Summary
public static  doublecalculateOGCScale(ReferencedEnvelope envelope, int imageWidth, Map hints)
     This method performs the computation using the methods suggested by the OGC SLD specification, page 26.
public static  doublecalculateScale(Envelope envelope, CoordinateReferenceSystem coordinateReferenceSystem, int imageWidth, int imageHeight, double DPI)
     Find the scale denominator of the map.
public static  doublecalculateScale(ReferencedEnvelope envelope, int imageWidth, int imageHeight, Map hints)
     First searches the hints for the scale denominator hint otherwise calls RendererUtilities.calculateScale(Envelope,CoordinateReferenceSystem,int,int,double) .
public static  doublecalculateScale(ReferencedEnvelope envelope, int imageWidth, int imageHeight, double DPI)
     Find the scale denominator of the map.
public static  EnvelopecreateMapEnvelope(Rectangle paintArea, AffineTransform worldToScreen)
    
public static  ReferencedEnvelopecreateMapEnvelope(Rectangle paintArea, AffineTransform worldToScreen, CoordinateReferenceSystem crs)
     Creates the map's bounding box in real world coordinates

NOTE It is worth to note that here we do not take into account the half a pixel translation stated by ogc for coverages bounds.

public static  AffineTransformworldToScreenTransform(Envelope mapExtent, Rectangle paintArea)
    
public static  AffineTransformworldToScreenTransform(ReferencedEnvelope mapExtent, Rectangle paintArea)
     Sets up the affine transform

NOTE It is worth to note that here we do not take into account the half a pixel translation stated by ogc for coverages bounds.

public static  AffineTransformworldToScreenTransform(Envelope mapExtent, Rectangle paintArea, CoordinateReferenceSystem destinationCrs)
     This worldToScreenTransform method makes the assumption that the crs is in Lon,Lat or Lat,Lon.

Field Detail
OGC_DEGREE_TO_METERS
final static double OGC_DEGREE_TO_METERS(Code)





Method Detail
calculateOGCScale
public static double calculateOGCScale(ReferencedEnvelope envelope, int imageWidth, Map hints)(Code)
This method performs the computation using the methods suggested by the OGC SLD specification, page 26.
Parameters:
  envelope -
Parameters:
  imageWidth -



calculateScale
public static double calculateScale(Envelope envelope, CoordinateReferenceSystem coordinateReferenceSystem, int imageWidth, int imageHeight, double DPI) throws TransformException, FactoryException(Code)
Find the scale denominator of the map. Method: 1. find the diagonal distance (meters) 2. find the diagonal distance (pixels) 3. find the diagonal distance (meters) -- use DPI 4. calculate scale (#1/#2) NOTE: return the scale denominator not the actual scale (1/scale = denominator) TODO: (SLD spec page 28): Since it is common to integrate the output of multiple servers into a single displayed result in the web-mapping environment, it is important that different map servers have consistent behaviour with respect to processing scales, so that all of the independent servers will select or deselect rules at the same scales. To insure consistent behaviour, scales relative to coordinate spaces must be handled consistently between map servers. For geographic coordinate systems, which use angular units, the angular coverage of a map should be converted to linear units for computation of scale by using the circumference of the Earth at the equator and by assuming perfectly square linear units. For linear coordinate systems, the size of the coordinate space should be used directly without compensating for distortions in it with respect to the shape of the real Earth. NOTE: we are actually doing a a much more exact calculation, and accounting for non-square pixels (which are allowed in WMS) ADDITIONAL NOTE from simboss: I added soe minor fixes. See below.
Parameters:
  envelope -
Parameters:
  coordinateReferenceSystem -
Parameters:
  imageWidth -
Parameters:
  imageHeight -
Parameters:
  DPI - screen dots per inch (OGC standard is 90)
throws:
  TransformException -
throws:
  FactoryException -



calculateScale
public static double calculateScale(ReferencedEnvelope envelope, int imageWidth, int imageHeight, Map hints) throws TransformException, FactoryException(Code)
First searches the hints for the scale denominator hint otherwise calls RendererUtilities.calculateScale(Envelope,CoordinateReferenceSystem,int,int,double) . If the hints contains a DPI then that DPI is used otherwise 90 is used (the OGS default).



calculateScale
public static double calculateScale(ReferencedEnvelope envelope, int imageWidth, int imageHeight, double DPI) throws TransformException, FactoryException(Code)
Find the scale denominator of the map. Method: 1. find the diagonal distance (meters) 2. find the diagonal distance (pixels) 3. find the diagonal distance (meters) -- use DPI 4. calculate scale (#1/#2) NOTE: return the scale denominator not the actual scale (1/scale = denominator) TODO: (SLD spec page 28): Since it is common to integrate the output of multiple servers into a single displayed result in the web-mapping environment, it is important that different map servers have consistent behaviour with respect to processing scales, so that all of the independent servers will select or deselect rules at the same scales. To insure consistent behaviour, scales relative to coordinate spaces must be handled consistently between map servers. For geographic coordinate systems, which use angular units, the angular coverage of a map should be converted to linear units for computation of scale by using the circumference of the Earth at the equator and by assuming perfectly square linear units. For linear coordinate systems, the size of the coordinate space should be used directly without compensating for distortions in it with respect to the shape of the real Earth. NOTE: we are actually doing a a much more exact calculation, and accounting for non-square pixels (which are allowed in WMS) ADDITIONAL NOTE from simboss: I added soe minor fixes. See below.
Parameters:
  envelope -
Parameters:
  imageWidth -
Parameters:
  imageHeight -
Parameters:
  DPI - screen dots per inch (OGC standard is 90)TODO should I take into account also the destination CRS? Otherwise I amjust assuming that the final crs is lon,lat that is it maps lon to x (nraster space) and lat to y (in raster space).
throws:
  TransformException -
throws:
  FactoryException -



createMapEnvelope
public static Envelope createMapEnvelope(Rectangle paintArea, AffineTransform worldToScreen) throws NoninvertibleTransformException(Code)
Creates the map's bounding box in real world coordinates

((Taken from the old LiteRenderer))
Parameters:
  worldToScreen - a transform which converts World coordinates to screen pixelcoordinates.
Parameters:
  paintArea - the size of the rendering output area




createMapEnvelope
public static ReferencedEnvelope createMapEnvelope(Rectangle paintArea, AffineTransform worldToScreen, CoordinateReferenceSystem crs) throws NoninvertibleTransformException(Code)
Creates the map's bounding box in real world coordinates

NOTE It is worth to note that here we do not take into account the half a pixel translation stated by ogc for coverages bounds. One reason is that WMS 1.1.1 does not follow it!!!
Parameters:
  worldToScreen - a transform which converts World coordinates to screen pixelcoordinates.
Parameters:
  paintArea - the size of the rendering output area




worldToScreenTransform
public static AffineTransform worldToScreenTransform(Envelope mapExtent, Rectangle paintArea)(Code)
Sets up the affine transform

((Taken from the old LiteRenderer))
Parameters:
  mapExtent - the map extent
Parameters:
  paintArea - the size of the rendering output area a transform that maps from real world coordinates to the screen




worldToScreenTransform
public static AffineTransform worldToScreenTransform(ReferencedEnvelope mapExtent, Rectangle paintArea)(Code)
Sets up the affine transform

NOTE It is worth to note that here we do not take into account the half a pixel translation stated by ogc for coverages bounds. One reason is that WMS 1.1.1 does not follow it!!!
Parameters:
  mapExtent - the map extent
Parameters:
  paintArea - the size of the rendering output area a transform that maps from real world coordinates to the screen




worldToScreenTransform
public static AffineTransform worldToScreenTransform(Envelope mapExtent, Rectangle paintArea, CoordinateReferenceSystem destinationCrs)(Code)
This worldToScreenTransform method makes the assumption that the crs is in Lon,Lat or Lat,Lon. If the provided envelope does not carry along a crs the assumption that the map extent is in the classic Lon,Lat form. In case the provided envelope is of type. Note that this method takes into account also the OGC standard with respect to the relation between pixels and sample.
Parameters:
  mapExtent - The envelope of the map in lon,lat
Parameters:
  paintArea - The area to paint as a rectangle
Parameters:
  destinationCrs -



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.