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


java.lang.Object
   org.geotools.data.oracle.sdo.GeometryConverter

GeometryConverter
public class GeometryConverter (Code)
Sample use of SDO class for simple JTS Geometry.

If needed I can make a LRSGeometryConverter that allows JTS Geometries with additional ordinates beyond xyz.


author:
   jgarnett


Field Summary
final public static  StringDATATYPE
    
protected  OracleConnectionconnection
    
 GeometryFactorygeometryFactory
    

Constructor Summary
public  GeometryConverter(OracleConnection connection)
    
public  GeometryConverter(OracleConnection connection, GeometryFactory geometryFactory)
    

Method Summary
protected  doubleasDouble(Datum datum, double DEFAULT)
    
protected  double[]asDoubleArray(STRUCT struct, double DEFAULT)
    
protected  double[]asDoubleArray(ARRAY array, double DEFAULT)
    
protected  double[]asDoubleArray(Datum data, double DEFAULT)
    
protected  STRUCTasEmptyDataType()
     Representation of null as an Empty SDO_GEOMETRY.
public  GeometryasGeometry(STRUCT sdoGeometry)
     Convert provided SDO_GEOMETRY to JTS Geometry.
protected  int[]asIntArray(ARRAY array, int DEFAULT)
    
protected  int[]asIntArray(Datum data, int DEFAULT)
    
protected  intasInteger(Datum datum, int DEFAULT)
    
public  StringgetDataTypeName()
     Used to handle MDSYS.SDO_GEOMETRY.
public  booleanisCapable(Geometry geom)
     Ensure that obj is a JTS Geometry (2D or 3D) with no LRS measures.
final protected  ARRAYtoARRAY(double doubles, String dataType)
     Convience method for ARRAY construction.
final protected  ARRAYtoARRAY(int ints, String dataType)
     Convience method for ARRAY construction.
final protected  ARRAYtoATTRIBUTE(double ords, String desc)
    
final protected  CHARtoCHAR(String s)
    
final protected  NUMBERtoNUMBER(double number)
     Convience method for NUMBER construction.
final protected  NUMBERtoNUMBER(int number)
    
final protected  ARRAYtoORDINATE(CoordinateList list, double measures, int D)
     Convience method for ARRAY construction.
final protected  ARRAYtoORDINATE(double ords)
    
public  STRUCTtoSDO(Geometry geom)
     Used to convert double[] to SDO_ODINATE_ARRAY.
final protected  STRUCTtoSTRUCT(Datum attributes, String dataType)
     Convience method for STRUCT construction.

Field Detail
DATATYPE
final public static String DATATYPE(Code)



connection
protected OracleConnection connection(Code)



geometryFactory
GeometryFactory geometryFactory(Code)




Constructor Detail
GeometryConverter
public GeometryConverter(OracleConnection connection)(Code)



GeometryConverter
public GeometryConverter(OracleConnection connection, GeometryFactory geometryFactory)(Code)




Method Detail
asDouble
protected double asDouble(Datum datum, double DEFAULT) throws SQLException(Code)
Presents datum as a double



asDoubleArray
protected double[] asDoubleArray(STRUCT struct, double DEFAULT) throws SQLException(Code)
Presents struct as a double[]



asDoubleArray
protected double[] asDoubleArray(ARRAY array, double DEFAULT) throws SQLException(Code)
Presents array as a double[]



asDoubleArray
protected double[] asDoubleArray(Datum data, double DEFAULT) throws SQLException(Code)
Presents Datum[] as a double[]



asEmptyDataType
protected STRUCT asEmptyDataType() throws SQLException(Code)
Representation of null as an Empty SDO_GEOMETRY. null as a SDO_GEOMETRY



asGeometry
public Geometry asGeometry(STRUCT sdoGeometry) throws SQLException(Code)
Convert provided SDO_GEOMETRY to JTS Geometry.

Will return null as null.


Parameters:
  sdoGeometry - datum STRUCT to be converted to a double[] JTS Geometry representing the provided datum
throws:
  SQLException -
See Also:   net.refractions.jspatial.Converter.toObject(oracle.sql.STRUCT)



asIntArray
protected int[] asIntArray(ARRAY array, int DEFAULT) throws SQLException(Code)



asIntArray
protected int[] asIntArray(Datum data, int DEFAULT) throws SQLException(Code)
Presents Datum[] as a int[]



asInteger
protected int asInteger(Datum datum, int DEFAULT) throws SQLException(Code)
Presents datum as an int



getDataTypeName
public String getDataTypeName()(Code)
Used to handle MDSYS.SDO_GEOMETRY. MDSYS.SDO_GEOMETRY
See Also:   net.refractions.jspatial.Converter.getDataType



isCapable
public boolean isCapable(Geometry geom)(Code)
Ensure that obj is a JTS Geometry (2D or 3D) with no LRS measures.

This Converter does not support SpatialCoordinates


Parameters:
  geom - the Geometry to be converted true if obj is a JTS Geometry
See Also:   net.refractions.jspatial.Converter.isCapable(java.lang.Object)



toARRAY
final protected ARRAY toARRAY(double doubles, String dataType) throws SQLException(Code)
Convience method for ARRAY construction.

Compare and contrast with toORDINATE - which treats Double.NaN asNULL




toARRAY
final protected ARRAY toARRAY(int ints, String dataType) throws SQLException(Code)
Convience method for ARRAY construction.



toATTRIBUTE
final protected ARRAY toATTRIBUTE(double ords, String desc) throws SQLException(Code)



toCHAR
final protected CHAR toCHAR(String s)(Code)
Convience method for CHAR construction



toNUMBER
final protected NUMBER toNUMBER(double number) throws SQLException(Code)
Convience method for NUMBER construction.

Double.NaN is represented as NULL to agree with JTS use.




toNUMBER
final protected NUMBER toNUMBER(int number)(Code)
Convience method for NUMBER construction



toORDINATE
final protected ARRAY toORDINATE(CoordinateList list, double measures, int D) throws SQLException(Code)
Convience method for ARRAY construction.

Forced to burn memory here - only way to actually place NULL numbers in the ordinate stream.

  • JTS: records lack of data as Double.NaN
  • SDO: records lack of data as NULL

The alternative is to construct the array from a array of doubles, which does not record NULL NUMBERs.

The results is an "MDSYS.SDO_ORDINATE_ARRAY"

 list     = c1(1,2,0), c2(3,4,Double.NaN)
 measures = {{5,6},{7,8}
 toORDINATE( list, measures, 2 )
 = (1,2,5,7, 3,4,6,8)
 toORDINATE( list, measures, 3 )
 = (1,2,0,5,7, 3,4,NULL,6,8)
 toORDINATE( list, null, 2 )
 = (1,2, 3,4)
 

Parameters:
  list - CoordinateList to be represented
Parameters:
  measures - Per Coordiante Measures, null if not required
Parameters:
  D - Dimension of Coordinates (limited to 2d, 3d)



toORDINATE
final protected ARRAY toORDINATE(double ords) throws SQLException(Code)



toSDO
public STRUCT toSDO(Geometry geom) throws SQLException(Code)
Used to convert double[] to SDO_ODINATE_ARRAY.

Will return null as an empty SDO_GEOMETRY


Parameters:
  geom - Map to be represented as a STRUCT STRUCT representing provided Map
See Also:   net.refractions.jspatial.Converter.toDataType(java.lang.Object)



toSTRUCT
final protected STRUCT toSTRUCT(Datum attributes, String dataType) throws SQLException(Code)
Convience method for STRUCT construction.



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.