Java Doc for GeometryFixture.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.GeometryFixture

GeometryFixture
public class GeometryFixture (Code)
Construct geometry used by test cases.

Several examples are from the the Oracle Spatial Geometry Spec.


See Also:   net.refractions.jspatial.jts
author:
   jgarnett, Refractions Reasearch Inc.
version:
   CVS Version


Field Summary
public  GeometryCollectiongeometryCollection
    
 GeometryFactorygf
    
public  LineStringlineString
    
public  MultiLineStringmultiLineString
    
public  MultiPointmultiPoint
    
public  MultiPolygonmultiPolygon
    
public  MultiPolygonmultiPolygonWithHole
    
public  Pointpoint
     Geometry Example "2.3.5 Point".
public  Polygonpolygon
    
public  PolygonpolygonWithHole
     Geometry Example "2.3.2 Polygon with Hole".
public  Polygonrectangle
     Geometry Example "2.3.1 Rectangle".

Constructor Summary
public  GeometryFixture()
     Construct Fixture for use with default GeometryFactory.
public  GeometryFixture(GeometryFactory geometryFactory)
     Construct Fixture for use with provided GeometryFactory.

Method Summary
protected  CoordinateSequencecoords(double coords)
    
protected  GeometryCollectioncreateGeometryCollection()
     General Geometry Collection - with point, line, polygon, and a polygonWithHole.
protected  LineStringcreateLineString()
     LineString geometry for testing fixture.
protected  MultiLineStringcreateMultiLineString()
     MultiLineString geometry for testing fixture.
protected  MultiPointcreateMultiPoint()
     MultiPoint geometry for testing fixture.
protected  MultiPolygoncreateMultiPolygon()
     Construct a multipolyugon with a square and a triangle.
protected  MultiPolygoncreateMultiPolygonWithHole()
     Construct a multipolyugon with a square with a hole and a triangle.
protected  PointcreatePoint()
     Geometry Example "2.3.5 Point".
protected  PolygoncreatePolygon()
     Construct a polygon of a triangle.
protected  PolygoncreatePolygonWithHole()
     Construct a polygon with hole according to Geometry Examples 2.3.2.
protected  PolygoncreateRectangle()
     Construct a rectangle according to Geometry Examples "2.3.1 Rectangle".
protected  LinearRingring(double coords)
    

Field Detail
geometryCollection
public GeometryCollection geometryCollection(Code)
GeometryCollection used for testing



gf
GeometryFactory gf(Code)



lineString
public LineString lineString(Code)
LineString used for testing



multiLineString
public MultiLineString multiLineString(Code)
MultiLineString used for testing



multiPoint
public MultiPoint multiPoint(Code)
MultiPoint used for testing



multiPolygon
public MultiPolygon multiPolygon(Code)
MultiPolygon used for testing



multiPolygonWithHole
public MultiPolygon multiPolygonWithHole(Code)
MultiPolygon used for testing



point
public Point point(Code)
Geometry Example "2.3.5 Point".

Simple Point used to test POINT_TYPE array use.

 +   12,14
 



polygon
public Polygon polygon(Code)
Polygon used for testing



polygonWithHole
public Polygon polygonWithHole(Code)
Geometry Example "2.3.2 Polygon with Hole".

A Polygon with a Hole as follows:

 5,13+-------------+   11,13
 /               \
 2,11+                 \
 | 7,10+----+10,10  \
 |     |    |       +13,9
 |     |    |       |
 |     |    |       |
 |  7,5+----+10,5   +13,5
 2,4+                  /
 \                /
 4,3+---------------+10,3
 



rectangle
public Polygon rectangle(Code)
Geometry Example "2.3.1 Rectangle".

A simple rectangle as used with CAD applications

 (1,7)         (5,7)
 +-------------+
 |             |
 |             |
 +-------------+
 (1,1)          (5,1)
 




Constructor Detail
GeometryFixture
public GeometryFixture()(Code)
Construct Fixture for use with default GeometryFactory.



GeometryFixture
public GeometryFixture(GeometryFactory geometryFactory)(Code)
Construct Fixture for use with provided GeometryFactory.




Method Detail
coords
protected CoordinateSequence coords(double coords)(Code)



createGeometryCollection
protected GeometryCollection createGeometryCollection()(Code)
General Geometry Collection - with point, line, polygon, and a polygonWithHole.
 5,5+-------+9,5
 |  +6,4/
 | /|  /
 |/ | / 
 2,3 +---+3,3  5,3+--+/6,3
 |2,2|        |  /
 1,2+ +---+3,2     | / 
 \             |/
 1,1+ +2,1      5,1+
 
A GeometryCollection with expected encoding:

  • SDO_GTYPE:2004
    2000 dimensional polygon, 000 for no LRS, 4 for geometry collection
  • SDO_SRID:0
  • SDO_POINT:NULL>
  • SDO_ELEM_INFO: (1,1,1, 3,2,1, 7,1003,1, 15,1003,1, 23,2003,1)
    Two triplets
    • (1,1,1): starting at 1, a point(1) (single(1))
    • (3,2,1): starting at 3, a line(2) with straight segments(1)
    • (7,1003,1): starting at 5, an exterior(1000), polygon(3)
    • (15,1003,1, 23,2003,1) polygon with:
      • starting at 15 and exterior(1003) and straight edges 1
      • starting at 23 and interior(2003) and straight edges 1
  • SDO_ORDINATES:
     (1,1,
     1,2, 2,1,
     2,2, 3,2, 3,3, 2,3, 2,2
     5,1, 5,5, 9,5, 5,1,
     5,3, 6,4, 6,3, 5,3)
     
     

SQL:

 MDSYS.SDO_GEOMETRY(
 2004,
 NULL,
 NULL,
 MDSYS.SDO_ELEM_INFO_ARRAY(1,1,1, 3,2,1, 7,1003,1, 17,1003,1, 25,2003,1),
 MDSYS.SDO_ORDINATE_ARRAY(
 1,1,
 1,2, 2,1,
 2,2, 3,2, 3,3, 2,3, 2,2,
 5,1, 5,5, 9,5, 5,1,
 5,3, 6,4, 6,3, 5,3
 )
 )
 



createLineString
protected LineString createLineString()(Code)
LineString geometry for testing fixture.
 +4,7
 |
 |
 |
 1,2+   +4,2
 \   /
 2,1+-+3,1
 

Expected Encoding:

  • SDO_GTYPE:2002
    2 dimensional, 0 measures, 02 for Line
  • SDO_SRID:NULL
  • SDO_POINT:NULL
  • SDO_ELEM_INFO:(1,2,5)
  • SDO_ORDINATES:(1,2, 2,1, 3,1, 4,2 4,7)

SQL:

 MDSYS.SDO_GEOMETRY(
 2002,
 NULL,
 NULL,
 (1,2,5),
 (1,2, 2,1, 3,1, 4,2 4,7)
 )
 



createMultiLineString
protected MultiLineString createMultiLineString()(Code)
MultiLineString geometry for testing fixture.
 2,7+==+==+5,7
 |4,7
 |
 |
 1,2+   +4,2
 \   /
 2,1+-+3,1
 

Expected Encoding:

  • SDO_GTYPE:2005
    2 dimensional, 0 measures, 05 for MultiLine
  • SDO_SRID:NULL
  • SDO_POINT:NULL
  • SDO_ELEM_INFO:(1,2,1,11,2,1)
    Two triplets
    • (1,2,1): linestring(2) of straight lines(1) starting at 1
    • (11,2,1): linestring(2) of straight lines(1) starting at 1
  • SDO_ORDINATES:(1,2, 2,1, 3,1, 4,2 4,7, 2,7, 4,7, 5,7)

SQL:

 MDSYS.SDO_GEOMETRY(
 2005,
 NULL,
 NULL,
 (1,2,1,11,2,1),
 (1,2, 2,1, 3,1, 4,2 4,7, 2,7, 4,7, 5,7)
 )
 



createMultiPoint
protected MultiPoint createMultiPoint()(Code)
MultiPoint geometry for testing fixture.
 5,5+
 3,3+
 2,2+
 1,1+
 

Expected Encoding:

  • SDO_GTYPE:2004
    2 dimensional, 0 measures, 05 for MultiPoint
  • SDO_SRID:NULL
  • SDO_POINT:NULL
  • SDO_ELEM_INFO:(1,1,4)
  • SDO_ORDINATES:(1,1, 2,2, 3,3, 5,5)

SQL:

 MDSYS.SDO_GEOMETRY(
 2005,
 NULL,
 NULL,
 (1,1,4),
 (1,1, 2,2, 3,3, 5,5)
 )
 



createMultiPolygon
protected MultiPolygon createMultiPolygon()(Code)
Construct a multipolyugon with a square and a triangle.

Used to illustrate multi polyugon encoding.

 2,9+------+7,9   
 |      |      +11,8
 |      |     / \
 |      |    /   \
 |      |9,5-----+13,5
 |      |
 2,3+------+7,3
 

A MultiPolygon with expected encoding:

  • SDO_GTYPE:2006
    2 dimensional polygon, 6 for multi polygon
  • SDO_SRID:NULL
  • SDO_POINT:NULL>
  • SDO_ELEM_INFO:(1,1003,1,11,1003,1)
    Three triplets
    • (1,1003,1): exterior(1000) polygon(3) starting at 1 with straight edges(1)
    • (11,1003,1): exterior(1000) polygon(3) starting at 11 with straight edges(1)
  • SDO_ORDINATES:
     (2,3, 7,3, 7,9, 2,9, 2,3,
     9,5, 13,5, 11,5, 9,5)
     
     

SQL:

 MDSYS.SDO_GEOMETRY(
 2006,
 NULL,
 NULL,
 MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1, 11,1003,1),
 MDSYS.SDO_ORDINATE_ARRAY(2,3, 7,3, 7,9, 2,9, 2,3,
 9,5, 13,5, 11,5, 9,5)
 )
 



createMultiPolygonWithHole
protected MultiPolygon createMultiPolygonWithHole()(Code)
Construct a multipolyugon with a square with a hole and a triangle.

Used to illustrate multi polyugon encoding.

 2,9+-------+7,9   
 |3,8 6,8|        +11,8
 | +---+ |      / \
 | |  /  |     /   \
 | | /   |    /     \
 | +     |9,5+-------+13,5
 |3,4    |
 2,3+-------+7,3
 

A MultiPolygon with expected encoding:

  • SDO_GTYPE:2007
    2 dimensional, 6 for multipolygon
  • SDO_SRID:0
  • SDO_POINT:NULL>
  • SDO_ELEM_INFO:(1,1003,1,11,2003,1,19,1003,1)
    Two triplets
    • (1,1003,1): exterior(1000) polygon(3) starting at 1 with straight edges(1)
      • (1,2003,1): interior(2000) polygon(3) starting at 11 with straight edges(1)
    • (11,1003,1): exterior(1000) polygon(3) starting at 19 with straight edges(1)
  • SDO_ORDINATES:
     (2,3, 7,3, 7,9, 2,9, 2,3,
     3,4, 3,8, 6,8, 3,4,
     9,5, 13,5, 11,8, 9,5)
     
     

SQL:

 MDSYS.SDO_GEOMETRY(
 2006,
 NULL,
 NULL,
 MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1,11,2003,1,19,1003,1),
 MDSYS.SDO_ORDINATE_ARRAY(2,3, 7,3, 7,9, 2,9, 2,3,
 3,4, 3,8, 6,8, 3,4, 
 9,5, 13,5, 11,8, 9,5)
 )
 



createPoint
protected Point createPoint()(Code)
Geometry Example "2.3.5 Point".

Simple Point used to test POINT_TYPE array use.

 +   12,14
 

Expected Encoding:

  • SDO_GTYPE:2001
    2 dimensional, 0 measures, 01 for point
  • SDO_SRID:NULL
  • SDO_POINT:(12,14,NULL)
  • SDO_ELEM_INFO:(1,1,1)
  • SDO_ORDINATES:(12,14)

SQL:

 MDSYS.SDO_GEOMETRY(
 2001,
 NULL,
 MDSYS.SDO_POINT_TYPE(12, 14, NULL),
 NULL,
 NULL
 )
 



createPolygon
protected Polygon createPolygon()(Code)
Construct a polygon of a triangle.

Used to illustrate polyugon encoding.

 +11,8
 / \
 /   \
 /     \
 9,5+-------+13,5
 

A Rectangle with expected encoding:

  • SDO_GTYPE:2003
    2 dimensional polygon
  • SDO_SRID:NULL
  • SDO_POINT:NULL>
  • SDO_ELEM_INFO:(1,1003,1)
    1000 for external, 03 for polygon, 1 indicates this polygon uses strait edges
  • SDO_ORDINATES:(1,1,5,7)
    bottom left and upper right

SQL:

 MDSYS.SDO_GEOMETRY(
 2003,
 NULL,
 NULL,
 MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1),
 MDSYS.SDO_ORDINATE_ARRAY(9,5, 13,5, 11,8, 9,5)
 )
 



createPolygonWithHole
protected Polygon createPolygonWithHole()(Code)
Construct a polygon with hole according to Geometry Examples 2.3.2.

Polygon examples used to illustrate compound encoding.

 5,13+-------------+   11,13
 /               \
 2,11+                 \
 | 7,10+----+10,10  \
 |     |    |       +13,9
 |     |    |       |
 |     |    |       |
 |  7,5+----+10,5   +13,5
 2,4+                  /
 \                /
 4,3+---------------+10,3
 

A Polygon with expected encoding:

  • SDO_GTYPE:2003
    2 dimensional polygon, 3 for polygon
  • SDO_SRID:NULL
  • SDO_POINT:NULL>
  • SDO_ELEM_INFO:(1,1003,1,19,2003,1)
    Two triplets
    • (1,1003,1): exterior polygon ring starting at 1
    • (19,2003,1): interior polygon ring starting at 19
  • SDO_ORDINATES:
     (2,4, 4,3, 10,3, 13,5, 13,9, 11,13, 5,13, 2,11, 2,4,
     7,5, 7,10, 10,10, 10,5, 7,5)
     
     

SQL:

 MDSYS.SDO_GEOMETRY(
 2003,
 NULL,
 NULL,
 MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1, 19,2003,1),
 MDSYS.SDO_ORDINATE_ARRAY(2,4, 4,3, 10,3, 13,5, 13,9, 11,13, 5,13, 2,11, 2,4,
 7,5, 7,10, 10,10, 10,5, 7,5)
 )
 



createRectangle
protected Polygon createRectangle()(Code)
Construct a rectangle according to Geometry Examples "2.3.1 Rectangle".

A simple rectangle as used with CAD applications

 (1,7)         (5,7)
 +-------------+
 |             |
 |             |
 +-------------+
 (1,1)          (5,1)
 

The polygon is not consturcted with an SRID (ie srid == -1)

A Rectangle with expected encoding:

  • SDO_GTYPE:2003
    2 dimensional polygon
  • SDO_SRID:NULL
  • SDO_POINT:NULL>
  • SDO_ELEM_INFO:(1,1003,3)
    03 indicates this is a rectangle
  • SDO_ORDINATES:(1,1,5,7)
    bottom left and upper right

SQL:

 MDSYS.SDO_GEOMETRY(
 2003,
 NULL,
 NULL,
 MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),
 MDSYS.SDO_ORDINATE_ARRAY(1,1,5,7)
 )
 

See Also:   GeometryFixture.rectangle



ring
protected LinearRing ring(double coords)(Code)



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.