Java Doc for KMLWriter.java in  » GIS » GeoServer » org » vfny » geoserver » wms » responses » map » kml » 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 » GeoServer » org.vfny.geoserver.wms.responses.map.kml 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.io.OutputStreamWriter
   org.vfny.geoserver.wms.responses.map.kml.KMLWriter

KMLWriter
public class KMLWriter extends OutputStreamWriter (Code)
Writer for KML/KMZ (Keyhole Markup Language) files. Normaly controled by an EncodeKML instance, this class handles the styling information and ensures that the geometries produced match the pseudo GML expected by GE.
author:
   James Macgill
author:
   $Author: Alessio Fabiani (alessio.fabiani@gmail.com) $
author:
   $Author: Simone Giannecchini (simboss1@gmail.com) $
author:
   Brent OwensKMLTransformer



Constructor Summary
public  KMLWriter(OutputStream out, WMSMapContext mapContext)
     Creates a new KMLWriter object.

Method Summary
public  voidendDocument()
    
public  voidendFolder()
    
public  GeometrygetCentroid(Geometry g)
    
public  intgetMaximunFractionDigits()
     Gets the maximum number of digits allowed in the fraction portion of a number.
public  intgetMinimunFractionDigits()
    
protected static  StringintToHex(int i)
     Utility method to convert an int into hex, padded to two characters.
protected  booleanisMultiPart(Geometry geom)
    
public  voidnewline()
    
public  voidsetMaximunFractionDigits(int numDigits)
     Sets the maximum number of digits allowed in the fraction portion of a number.
public  voidsetMinimunFractionDigits(int numDigits)
     Sets the minimum number of digits allowed in the fraction portion of a number.
public  voidsetRequestedScale(double scale)
    
public  voidsetSourceCrs(CoordinateReferenceSystem crs)
    
public  voidstartDocument(String name, String description)
    
public  voidstartFolder(String name, String description)
     Start a new KML folder.
public  voidwrite(double d)
    
public  voidwriteCoverages(FeatureCollection features, MapLayer layer)
    
public  voidwriteFeaturesAsRaster(FeatureCollection features, MapLayer layer, int order)
    
public  voidwriteFeaturesAsVectors(FeatureCollection features, MapLayer layer)
    
protected  voidwriteGeometry(Geometry geom, GeometryTransformer trans)
     Write out the geometry.
protected  voidwriteLookAt(Geometry geom, GeometryTransformer trans)
    
protected  voidwritePlaceMarkPoint(Geometry geom, GeometryTransformer trans)
    


Constructor Detail
KMLWriter
public KMLWriter(OutputStream out, WMSMapContext mapContext)(Code)
Creates a new KMLWriter object.
Parameters:
  out - OutputStream to write the KML into
Parameters:
  config - WMSMapContext describing the map to be generated.




Method Detail
endDocument
public void endDocument() throws IOException(Code)



endFolder
public void endFolder() throws IOException(Code)



getCentroid
public Geometry getCentroid(Geometry g)(Code)
Finds the centroid of the input geometry if input = point, line, polygon --> return a point that represents the centroid of that geom if input = geometry collection --> return a multipoint that represents the centoid of each sub-geom
Parameters:
  g -



getMaximunFractionDigits
public int getMaximunFractionDigits()(Code)
Gets the maximum number of digits allowed in the fraction portion of a number. int numDigits
See Also:   NumberFormat.getMaximumFractionDigits



getMinimunFractionDigits
public int getMinimunFractionDigits()(Code)



intToHex
protected static String intToHex(int i)(Code)
Utility method to convert an int into hex, padded to two characters. handy for generating colour strings.
Parameters:
  i - Int to convert String a two character hex representation of i NOTE: this is autility method and should be put somewhere more useful.



isMultiPart
protected boolean isMultiPart(Geometry geom)(Code)
Test to see if the geometry is a Multi geometry true if geom instance of MultiPolygon, MultiPoint orMultiLineString



newline
public void newline() throws IOException(Code)
Convinience method to add a newline char to the output
throws:
  IOException -



setMaximunFractionDigits
public void setMaximunFractionDigits(int numDigits)(Code)
Sets the maximum number of digits allowed in the fraction portion of a number.
Parameters:
  numDigits -
See Also:   NumberFormat.setMaximumFractionDigits



setMinimunFractionDigits
public void setMinimunFractionDigits(int numDigits)(Code)
Sets the minimum number of digits allowed in the fraction portion of a number.
Parameters:
  numDigits -
See Also:   NumberFormat.setMinimumFractionDigits



setRequestedScale
public void setRequestedScale(double scale)(Code)



setSourceCrs
public void setSourceCrs(CoordinateReferenceSystem crs)(Code)



startDocument
public void startDocument(String name, String description) throws IOException(Code)



startFolder
public void startFolder(String name, String description) throws IOException(Code)
Start a new KML folder. From the spec 2.0: A top-level, optional tag used to structure hierarchical arrangement of other folders, placemarks, ground overlays, and screen overlays. Use this tag to structure and organize your information in the Google Earth client. In this context we should be using a Folder per map layer.
Parameters:
  name - A String to label this folder with, if null the name tag willbe ommited
Parameters:
  description - Supplies descriptive information. This description appears inthe Places window when the user clicks on the folder or groundoverlay, and in a pop-up window when the user clicks on eitherthe Placemark name in the Places window, or the placemarkicon. The description element supports plain text as well asHTML formatting. A valid URL string for the World Wide Web isautomatically converted to a hyperlink to that URL (e.g.http://www.google.com). if null the description tag will beommited



write
public void write(double d) throws IOException(Code)
Formated version of standard write double
Parameters:
  d - The double to format and write out.
throws:
  IOException -



writeCoverages
public void writeCoverages(FeatureCollection features, MapLayer layer) throws IOException, AbortedException(Code)



writeFeaturesAsRaster
public void writeFeaturesAsRaster(FeatureCollection features, MapLayer layer, int order) throws IOException, AbortedException(Code)



writeFeaturesAsVectors
public void writeFeaturesAsVectors(FeatureCollection features, MapLayer layer) throws IOException, AbortedException(Code)



writeGeometry
protected void writeGeometry(Geometry geom, GeometryTransformer trans) throws IOException, TransformerException(Code)
Write out the geometry. Contains workaround for the fact that KML2.0 does not support multipart geometries in the same way that GML does.
Parameters:
  geom - The Geometry to be encoded, multi part geometries will bewritten as a sequence.
Parameters:
  trans - A GeometryTransformer to produce the gml output, its output ispost processed to remove gml namespace prefixes.



writeLookAt
protected void writeLookAt(Geometry geom, GeometryTransformer trans) throws IOException, TransformerException(Code)



writePlaceMarkPoint
protected void writePlaceMarkPoint(Geometry geom, GeometryTransformer trans) throws IOException, TransformerException(Code)



Methods inherited from java.io.OutputStreamWriter
public void close() throws IOException(Code)(Java Doc)
public void flush() throws IOException(Code)(Java Doc)
public String getEncoding()(Code)(Java Doc)
public void write(int c) throws IOException(Code)(Java Doc)
public void write(char cbuf, int off, int len) throws IOException(Code)(Java Doc)
public void write(String str, int off, int len) throws IOException(Code)(Java Doc)

www___.ja___v_a2s_.___c_o__m | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.