Java Doc for GMLGeometryAdapter.java in  » GIS » deegree » org » deegree » model » spatialschema » 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 » deegree » org.deegree.model.spatialschema 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.deegree.model.spatialschema.GMLGeometryAdapter

GMLGeometryAdapter
public class GMLGeometryAdapter (Code)
Adapter class for converting GML geometries to deegree geometries and vice versa. Some logical problems results from the fact that an envelope isn't a geometry according to ISO 19107 (where the deegree geometry model is based on) but according to GML2/3 specification it is.
So if the wrap(..) method is called with an envelope a Surface will be returned representing the envelops shape. To export an Envelope to a GML box/envelope two specialized export methods are available.
The export method(s) doesn't return a DOM element as one may expect but a StringBuffer. This is done because the transformation from deegree geometries to GML mainly is required when a GML representation of a geometry shall be serialized to a file or to a network connection. For both cases the string representation is required and it is simply faster to create the string directly instead of first creating a DOM tree that after this must be serialized to a string.
In future version geometries will be serialized to a stream.
author:
   Andreas Poth
author:
   last edited by: $Author: rbezema $
version:
   $Revision: 10287 $, $Date: 2008-02-25 09:00:04 -0800 (Mon, 25 Feb 2008) $




Method Summary
public static  PrintWriterexport(Geometry geometry, OutputStream target)
    
public static  StringBufferexport(Geometry geometry)
     Creates a GML representation from the passed Geometry.
public static  StringBufferexportAsBox(Envelope envelope)
     creates a GML representation from the passed Envelope.
public static  StringBufferexportAsEnvelope(Envelope envelope)
     creates a GML representation from the passed Envelope.
public static  booleanisGeometrieSupported(String localName)
     Returns true if the given localName != null or empty and matches one of the following:
  • Point
  • Center
  • LineString
  • Polygon
  • MultiPoint
  • MultiLineString
  • MultiPolygon
  • Box
  • Envelope
  • Curve
  • Surface
  • MultiCurve
  • MultiSurface
  • CompositeSurface

Parameters:
  localName - to check.
public static  Geometrywrap(String gml, String srsName)
     Converts the given string representation of a GML geometry object to a corresponding Geometry.
public static  Geometrywrap(Element element, String srsName)
     Converts the given DOM representation of a GML geometry to a corresponding Geometry.
public static  Geometrywrap(String gml)
     Converts the string representation of a GML geometry object to a corresponding Geometry.
public static  Geometrywrap(Element gml)
     Converts a GML geometry object to a corresponding Geometry.
public static  EnvelopewrapBox(Element element, String srsName)
     Returns an instance of Envelope created from the passed gml:Box or gml:Envelope element.
public static  EnvelopewrapBox(Element element)
    
protected static  CurvewrapCurveAsCurve(Element element, String srsName)
     Returns an instance of Curve created from the passed gml:Curve element.
protected static  MultiCurvewrapMultiCurveAsMultiCurve(Element element, String srsName)
     Returns an instance of MultiCurve created from the passed gml:MultiCurve element.
protected static  MultiSurfacewrapMultiSurfaceAsMultiSurface(Element element, String srsName)
     Returns an instance of MultiSurface created from the passed gml:MultiSurface element.
protected static  SurfacewrapSurfaceAsSurface(Element element, String srsName)
     Returns an instance of Surface created from the passed gml:Surface element.



Method Detail
export
public static PrintWriter export(Geometry geometry, OutputStream target) throws GeometryException(Code)
Creates a GML representation from the passed Geometry
Parameters:
  geometry -
Parameters:
  target -
throws:
  GeometryException -



export
public static StringBuffer export(Geometry geometry) throws GeometryException(Code)
Creates a GML representation from the passed Geometry.
Parameters:
  geometry - a string buffer containing the XML
throws:
  GeometryException -



exportAsBox
public static StringBuffer exportAsBox(Envelope envelope)(Code)
creates a GML representation from the passed Envelope. This method is required because in ISO 19107 Envelops are no geometries.
Parameters:
  envelope -
throws:
  GeometryException -



exportAsEnvelope
public static StringBuffer exportAsEnvelope(Envelope envelope)(Code)
creates a GML representation from the passed Envelope. This method is required because in ISO 19107 Envelops are no geometries.
Parameters:
  envelope -
throws:
  GeometryException -



isGeometrieSupported
public static boolean isGeometrieSupported(String localName)(Code)
Returns true if the given localName != null or empty and matches one of the following:
  • Point
  • Center
  • LineString
  • Polygon
  • MultiPoint
  • MultiLineString
  • MultiPolygon
  • Box
  • Envelope
  • Curve
  • Surface
  • MultiCurve
  • MultiSurface
  • CompositeSurface

Parameters:
  localName - to check. true if localName equal-ignore-case's one of the above strings.



wrap
public static Geometry wrap(String gml, String srsName) throws GeometryException, XMLParsingException(Code)
Converts the given string representation of a GML geometry object to a corresponding Geometry. Notice that GML Boxes will be converted to Surfaces because in ISO 19107 Envelopes are no geometries.
Parameters:
  gml -
Parameters:
  srsName - default SRS for the geometry (may be overwritten in geometry elements) corresponding geometry object
throws:
  GeometryException -
throws:
  XMLParsingException -



wrap
public static Geometry wrap(Element element, String srsName) throws GeometryException(Code)
Converts the given DOM representation of a GML geometry to a corresponding Geometry. Notice that GML Boxes will be converted to Surfaces because in ISO 19107 Envelopes are no geometries.

Currently, the following conversions are supported:

  • GML Point -> Point
  • GML MultiPoint -> MultiPoint
  • GML LineString -> Curve
  • GML MultiLineString -> MultiCurve
  • GML Polygon -> Surface
  • GML MultiPolygon -> MultiSurface
  • GML Box -> Surface
  • GML Curve -> Curve
  • GML Surface -> Surface
  • GML MultiCurve -> MultiCurve
  • GML MultiSurface -> MultiSurface


Parameters:
  element -
Parameters:
  srsName - default SRS for the geometry corresponding Geometry instance
throws:
  GeometryException - if type unsupported or conversion failed




wrap
public static Geometry wrap(String gml) throws GeometryException, XMLParsingException(Code)
Converts the string representation of a GML geometry object to a corresponding Geometry. Notice that GML Boxes will be converted to Surfaces because in ISO 19107 Envelopes are no geometries.
Parameters:
  gml - corresponding geometry object
throws:
  GeometryException -
throws:
  XMLParsingException - GMLGeometryAdapter.wrap(String,String)



wrap
public static Geometry wrap(Element gml) throws GeometryException(Code)
Converts a GML geometry object to a corresponding Geometry. Notice that GML Boxes will be converted to Surfaces because in ISO 19107 Envelops are no geometries.

Currently, the following conversions are supported:

  • GML Point -> Point
  • GML MultiPoint -> MultiPoint
  • GML LineString -> Curve
  • GML MultiLineString -> MultiCurve
  • GML Polygon -> Surface
  • GML MultiPolygon -> MultiSurface
  • GML Box -> Surface
  • GML Curve -> Curve
  • GML Surface -> Surface
  • GML MultiCurve -> MultiCurve
  • GML MultiSurface -> MultiSurface


Parameters:
  gml - the corresponding Geometry
throws:
  GeometryException - if type unsupported or conversion failedGMLGeometryAdapter.wrap(Element,String)




wrapBox
public static Envelope wrapBox(Element element, String srsName) throws XMLParsingException, InvalidGMLException, UnknownCRSException(Code)
Returns an instance of Envelope created from the passed gml:Box or gml:Envelope element.
Parameters:
  element - gml:Box or gml:Envelope element
Parameters:
  srsName - default SRS for the geometry instance of Envelope
throws:
  XMLParsingException -
throws:
  InvalidGMLException -
throws:
  UnknownCRSException -



wrapBox
public static Envelope wrapBox(Element element) throws XMLParsingException, InvalidGMLException, UnknownCRSException(Code)
returns a Envelope created from Box element
Parameters:
  element - instance of Envelope
throws:
  XMLParsingException -
throws:
  InvalidGMLException -
throws:
  UnknownCRSException - GMLGeometryAdapter.wrapBox(Element,String)



wrapCurveAsCurve
protected static Curve wrapCurveAsCurve(Element element, String srsName) throws XMLParsingException, GeometryException, UnknownCRSException(Code)
Returns an instance of Curve created from the passed gml:Curve element.
Parameters:
  element - gml:Curve element
Parameters:
  srsName - default SRS for the geometry corresponding Curve instance
throws:
  XMLParsingException -
throws:
  GeometryException -
throws:
  UnknownCRSException -



wrapMultiCurveAsMultiCurve
protected static MultiCurve wrapMultiCurveAsMultiCurve(Element element, String srsName) throws XMLParsingException, GeometryException, UnknownCRSException, InvalidGMLException(Code)
Returns an instance of MultiCurve created from the passed gml:MultiCurve element.
Parameters:
  element - gml:MultiCurve element
Parameters:
  srsName - default SRS for the geometry MultiCurve instance
throws:
  XMLParsingException -
throws:
  GeometryException -
throws:
  UnknownCRSException -
throws:
  InvalidGMLException -



wrapMultiSurfaceAsMultiSurface
protected static MultiSurface wrapMultiSurfaceAsMultiSurface(Element element, String srsName) throws XMLParsingException, GeometryException, InvalidGMLException, UnknownCRSException(Code)
Returns an instance of MultiSurface created from the passed gml:MultiSurface element.
Parameters:
  element - gml:MultiSurface element
Parameters:
  srsName - default SRS for the geometry MultiSurface
throws:
  XMLParsingException -
throws:
  GeometryException -
throws:
  InvalidGMLException -
throws:
  UnknownCRSException -



wrapSurfaceAsSurface
protected static Surface wrapSurfaceAsSurface(Element element, String srsName) throws XMLParsingException, GeometryException, UnknownCRSException(Code)
Returns an instance of Surface created from the passed gml:Surface element.
Parameters:
  element -
Parameters:
  srsName - default SRS for the geometry Surface
throws:
  XMLParsingException -
throws:
  GeometryException -
throws:
  UnknownCRSException -



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.