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


java.lang.Object
   org.geotools.arcsde.data.ArcSDEGeometryBuilder

ArcSDEGeometryBuilder
abstract public class ArcSDEGeometryBuilder (Code)
Creates propper JTS Geometry objects from SeShape objects and viceversa.

SeShape's are gathered from an SeRow ArcSDE API's result object and holds it's geometry attributes as a three dimensional array of double primitives as explained bellow.

By this way, we avoid the creation of ArcSDE's java implementation of OGC geometries for later translation to JTS, avoiding too the dependency on the ArcSDE native library wich the geometry package of the ArcSDE Java API depends on.

Given double [][][]coords the meaning of this array is as follow:

  • coords.length reprsents the number of geometries this geometry is composed of. In deed, this only applies for multipolygon geometries, for all other geometry types, this will be allways 1
  • coords[n] holds the coordinate arrays of the n'th geometry this geometry is composed of. Except for multipolygons, this will allways be coords[0].
  • coords[n][m] holds the coordinates array for a given geometry. (i.e. [0][m] for a multilinestring or [2][m] for a multipolygon composed of 3 polygons)
  • coords[n][m][l] holds the {x1, y1, x2, y2, ...,Xn, Yn} coordinates for a given geometry part

This abstract class will use specialized subclass for constructing the propper geometry type


author:
   Gabriel Roldan, Axios Engineering
version:
   $Id: ArcSDEGeometryBuilder.java 27863 2007-11-12 20:34:34Z desruisseaux $


Field Summary
protected  GeometryFactoryfactory
    


Method Summary
public static  ArcSDEGeometryBuilderbuilderFor(Class jtsGeometryClass)
     Factory method that returns an instance of ArcSDEGeometryBuilder specialized in contructing JTS geometries of the JTS Geometry class passed as argument.
public  Geometryconstruct(SeShape shape)
     Takes an ArcSDE's SeShape and builds a JTS Geometry.
public  SeShapeconstructShape(Geometry geometry, SeCoordinateReference seSrs)
     Creates the ArcSDE Java API representation of a Geometry object in its shape format, suitable to filter expressions as the SDE API expects
Parameters:
  geometry - the JTS Geometry object to get the SDE representation from
Parameters:
  seSrs - Coordinate Reference System of the underlyingSeLayer object for wich theSeShape is constructed.
public static  GeometrydefaultValueFor(Class geoClass)
    
protected  GeometrygetEmpty()
     returns an empty JTS geometry who's type is given by the ArcSDEGeometryBuilder subclass instance specialization that implements it.
abstract protected  GeometrynewGeometry(double[][][] coords)
    
protected  Coordinate[]toCoords(double[] coordList)
     Builds an array of JTS Coordinate instances that's geometrically equals to the SeShape single coordinates array passed as argument.
protected  SDEPoint[]toPointsArray(Coordinate[] coords)
    

Field Detail
factory
protected GeometryFactory factory(Code)
JTS geometry factory subclasses use to map SeShapes to JTS ones





Method Detail
builderFor
public static ArcSDEGeometryBuilder builderFor(Class jtsGeometryClass) throws IllegalArgumentException(Code)
Factory method that returns an instance of ArcSDEGeometryBuilder specialized in contructing JTS geometries of the JTS Geometry class passed as argument. Note that jtsGeometryClass must be one of the supported concrete JTS Geometry classes.
Parameters:
  jtsGeometryClass -
throws:
  IllegalArgumentException - if jtsGeometryClass is not a concrete JTSGeometry class (likecom.vividsolutions.jts.geom.MultiPoint.classi.e.)



construct
public Geometry construct(SeShape shape) throws SeException, DataSourceException(Code)
Takes an ArcSDE's SeShape and builds a JTS Geometry. The geometry type constructed depends on this ArcSDEGeometryBuilder specialized subclass
Parameters:
  shape - the ESRI's ArcSDE java api shape upon wich to create the newJTS geometry the type of JTS Geometry this subclass instance is specializedfor or an empty geometry of the same class ifshape.isNil()
throws:
  SeException - if it occurs fetching the coordinates array fromshape
throws:
  DataSourceException - if thecom.vividsolutions.jts.geom.GeometryFactorythis builder is backed by can't create thecom.vividsolutions.jts.geom.Geometry with thecom.vividsolutions.jts.geom.Coordinate[]provided by newGeometry



constructShape
public SeShape constructShape(Geometry geometry, SeCoordinateReference seSrs) throws ArcSDEGeometryBuildingException(Code)
Creates the ArcSDE Java API representation of a Geometry object in its shape format, suitable to filter expressions as the SDE API expects
Parameters:
  geometry - the JTS Geometry object to get the SDE representation from
Parameters:
  seSrs - Coordinate Reference System of the underlyingSeLayer object for wich theSeShape is constructed. the SeShape representation of passedGeometry
throws:
  ArcSDEGeometryBuildingException - DOCUMENT ME!



defaultValueFor
public static Geometry defaultValueFor(Class geoClass)(Code)
DOCUMENT ME!
Parameters:
  geoClass - DOCUMENT ME! DOCUMENT ME!
throws:
  NullPointerException - DOCUMENT ME!



getEmpty
protected Geometry getEmpty()(Code)
returns an empty JTS geometry who's type is given by the ArcSDEGeometryBuilder subclass instance specialization that implements it.

this method is called in case that SeShape.isNil() == true

an empty JTS geometry
throws:
  UnsupportedOperationException - DOCUMENT ME!



newGeometry
abstract protected Geometry newGeometry(double[][][] coords) throws DataSourceException(Code)
Builds a JTS Geometry who't type is given by the ArcSDEGeometryBuilder subclass instance specialization that implements it
Parameters:
  coords - SeShape's coordinate array to build thegeometry from the JST form of the passed geometry coordinates
throws:
  DataSourceException - if an error occurs while creating the JTS Geometry



toCoords
protected Coordinate[] toCoords(double[] coordList)(Code)
Builds an array of JTS Coordinate instances that's geometrically equals to the SeShape single coordinates array passed as argument.
Parameters:
  coordList - array of coordinates of a single shape part to build aCoordinate from a geometrically equal to coordList array ofCoordinate instances



toPointsArray
protected SDEPoint[] toPointsArray(Coordinate[] coords)(Code)
DOCUMENT ME!
Parameters:
  coords - DOCUMENT ME! DOCUMENT ME!



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.