Java Doc for GeometryFactory.java in  » GIS » jts » com » vividsolutions » jts » geom » 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 » jts » com.vividsolutions.jts.geom 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.vividsolutions.jts.geom.GeometryFactory

GeometryFactory
public class GeometryFactory implements Serializable(Code)
Supplies a set of utility methods for building Geometry objects from lists of Coordinates.

Note that the factory constructor methods do not change the input coordinates in any way. In particular, they are not rounded to the supplied PrecisionModel. It is assumed that input Coordinates meet the given precision.
version:
   1.7




Constructor Summary
public  GeometryFactory(PrecisionModel precisionModel, int SRID, CoordinateSequenceFactory coordinateSequenceFactory)
     Constructs a GeometryFactory that generates Geometries having the given PrecisionModel, spatial-reference ID, and CoordinateSequence implementation.
public  GeometryFactory(CoordinateSequenceFactory coordinateSequenceFactory)
     Constructs a GeometryFactory that generates Geometries having the given CoordinateSequence implementation, a double-precision floating PrecisionModel and a spatial-reference ID of 0.
public  GeometryFactory(PrecisionModel precisionModel)
     Constructs a GeometryFactory that generates Geometries having the given PrecisionModel and the default CoordinateSequence implementation.
public  GeometryFactory(PrecisionModel precisionModel, int SRID)
     Constructs a GeometryFactory that generates Geometries having the given PrecisionModel and spatial-reference ID, and the default CoordinateSequence implementation.
public  GeometryFactory()
     Constructs a GeometryFactory that generates Geometries having a floating PrecisionModel and a spatial-reference ID of 0.

Method Summary
public  GeometrybuildGeometry(Collection geomList)
     Build an appropriate Geometry, MultiGeometry, or GeometryCollection to contain the Geometrys in it.
public  GeometrycreateGeometry(Geometry g)
    
public  GeometryCollectioncreateGeometryCollection(Geometry[] geometries)
     Creates a GeometryCollection using the given Geometries; a null or empty array will create an empty GeometryCollection.
public  LineStringcreateLineString(Coordinate[] coordinates)
     Creates a LineString using the given Coordinates; a null or empty array will create an empty LineString.
public  LineStringcreateLineString(CoordinateSequence coordinates)
     Creates a LineString using the given CoordinateSequence; a null or empty CoordinateSequence will create an empty LineString.
public  LinearRingcreateLinearRing(Coordinate[] coordinates)
     Creates a LinearRing using the given Coordinates; a null or empty array will create an empty LinearRing.
public  LinearRingcreateLinearRing(CoordinateSequence coordinates)
     Creates a LinearRing using the given CoordinateSequence; a null or empty CoordinateSequence will create an empty LinearRing.
public  MultiLineStringcreateMultiLineString(LineString[] lineStrings)
     Creates a MultiLineString using the given LineStrings; a null or empty array will create an empty MultiLineString.
public  MultiPointcreateMultiPoint(Point[] point)
     Creates a MultiPoint using the given Points.
public  MultiPointcreateMultiPoint(Coordinate[] coordinates)
     Creates a MultiPoint using the given Coordinate s.
public  MultiPointcreateMultiPoint(CoordinateSequence coordinates)
     Creates a MultiPoint using the given CoordinateSequence.
public  MultiPolygoncreateMultiPolygon(Polygon[] polygons)
     Creates a MultiPolygon using the given Polygons; a null or empty array will create an empty Polygon.
public  PointcreatePoint(Coordinate coordinate)
     Creates a Point using the given Coordinate; a null Coordinate will create an empty Geometry.
public  PointcreatePoint(CoordinateSequence coordinates)
     Creates a Point using the given CoordinateSequence; a null or empty CoordinateSequence will create an empty Point.
public static  PointcreatePointFromInternalCoord(Coordinate coord, Geometry exemplar)
    
public  PolygoncreatePolygon(LinearRing shell, LinearRing[] holes)
     Constructs a Polygon with the given exterior boundary and interior boundaries.
public  CoordinateSequenceFactorygetCoordinateSequenceFactory()
    
public  PrecisionModelgetPrecisionModel()
     Returns the PrecisionModel that Geometries created by this factory will be associated with.
public  intgetSRID()
    
public  GeometrytoGeometry(Envelope envelope)
     If the Envelope is a null Envelope, returns an empty Point.
public static  Geometry[]toGeometryArray(Collection geometries)
     Converts the List to an array.
public static  LineString[]toLineStringArray(Collection lineStrings)
     Converts the List to an array.
public static  LinearRing[]toLinearRingArray(Collection linearRings)
     Converts the List to an array.
public static  MultiLineString[]toMultiLineStringArray(Collection multiLineStrings)
     Converts the List to an array.
public static  MultiPoint[]toMultiPointArray(Collection multiPoints)
     Converts the List to an array.
public static  MultiPolygon[]toMultiPolygonArray(Collection multiPolygons)
     Converts the List to an array.
public static  Point[]toPointArray(Collection points)
     Converts the List to an array.
public static  Polygon[]toPolygonArray(Collection polygons)
     Converts the List to an array.


Constructor Detail
GeometryFactory
public GeometryFactory(PrecisionModel precisionModel, int SRID, CoordinateSequenceFactory coordinateSequenceFactory)(Code)
Constructs a GeometryFactory that generates Geometries having the given PrecisionModel, spatial-reference ID, and CoordinateSequence implementation.



GeometryFactory
public GeometryFactory(CoordinateSequenceFactory coordinateSequenceFactory)(Code)
Constructs a GeometryFactory that generates Geometries having the given CoordinateSequence implementation, a double-precision floating PrecisionModel and a spatial-reference ID of 0.



GeometryFactory
public GeometryFactory(PrecisionModel precisionModel)(Code)
Constructs a GeometryFactory that generates Geometries having the given PrecisionModel and the default CoordinateSequence implementation.
Parameters:
  precisionModel - the PrecisionModel to use



GeometryFactory
public GeometryFactory(PrecisionModel precisionModel, int SRID)(Code)
Constructs a GeometryFactory that generates Geometries having the given PrecisionModel and spatial-reference ID, and the default CoordinateSequence implementation.
Parameters:
  precisionModel - the PrecisionModel to use
Parameters:
  SRID - the SRID to use



GeometryFactory
public GeometryFactory()(Code)
Constructs a GeometryFactory that generates Geometries having a floating PrecisionModel and a spatial-reference ID of 0.




Method Detail
buildGeometry
public Geometry buildGeometry(Collection geomList)(Code)
Build an appropriate Geometry, MultiGeometry, or GeometryCollection to contain the Geometrys in it. For example:
  • If geomList contains a single Polygon, the Polygon is returned.
  • If geomList contains several Polygons, a MultiPolygon is returned.
  • If geomList contains some Polygons and some LineStrings, a GeometryCollection is returned.
  • If geomList is empty, an empty GeometryCollection is returned
Note that this method does not "flatten" Geometries in the input, and hence if any MultiGeometries are contained in the input a GeometryCollection containing them will be returned.
Parameters:
  geomList - the Geometrys to combine a Geometry of the "smallest", "mosttype-specific" class that can contain the elements of geomList.



createGeometry
public Geometry createGeometry(Geometry g)(Code)
a clone of g based on a CoordinateSequence created by thisGeometryFactory's CoordinateSequenceFactory



createGeometryCollection
public GeometryCollection createGeometryCollection(Geometry[] geometries)(Code)
Creates a GeometryCollection using the given Geometries; a null or empty array will create an empty GeometryCollection.
Parameters:
  geometries - Geometries, each of which may be empty but not null



createLineString
public LineString createLineString(Coordinate[] coordinates)(Code)
Creates a LineString using the given Coordinates; a null or empty array will create an empty LineString. Consecutive points must not be equal.
Parameters:
  coordinates - an array without null elements, or an empty array, or null



createLineString
public LineString createLineString(CoordinateSequence coordinates)(Code)
Creates a LineString using the given CoordinateSequence; a null or empty CoordinateSequence will create an empty LineString. Consecutive points must not be equal.
Parameters:
  coordinates - a CoordinateSequence possibly empty, or null



createLinearRing
public LinearRing createLinearRing(Coordinate[] coordinates)(Code)
Creates a LinearRing using the given Coordinates; a null or empty array will create an empty LinearRing. The points must form a closed and simple linestring. Consecutive points must not be equal.
Parameters:
  coordinates - an array without null elements, or an empty array, or null



createLinearRing
public LinearRing createLinearRing(CoordinateSequence coordinates)(Code)
Creates a LinearRing using the given CoordinateSequence; a null or empty CoordinateSequence will create an empty LinearRing. The points must form a closed and simple linestring. Consecutive points must not be equal.
Parameters:
  coordinates - a CoordinateSequence possibly empty, or null



createMultiLineString
public MultiLineString createMultiLineString(LineString[] lineStrings)(Code)
Creates a MultiLineString using the given LineStrings; a null or empty array will create an empty MultiLineString.
Parameters:
  lineStrings - LineStrings, each of which may be empty but not null



createMultiPoint
public MultiPoint createMultiPoint(Point[] point)(Code)
Creates a MultiPoint using the given Points. A null or empty array will create an empty MultiPoint.
Parameters:
  coordinates - an array (without null elements), or an empty array, or null a MultiPoint object



createMultiPoint
public MultiPoint createMultiPoint(Coordinate[] coordinates)(Code)
Creates a MultiPoint using the given Coordinate s. A null or empty array will create an empty MultiPoint.
Parameters:
  coordinates - an array (without null elements), or an empty array, or null a MultiPoint object



createMultiPoint
public MultiPoint createMultiPoint(CoordinateSequence coordinates)(Code)
Creates a MultiPoint using the given CoordinateSequence. A a null or empty CoordinateSequence will create an empty MultiPoint.
Parameters:
  coordinates - a CoordinateSequence (possibly empty), or null a MultiPoint object



createMultiPolygon
public MultiPolygon createMultiPolygon(Polygon[] polygons)(Code)
Creates a MultiPolygon using the given Polygons; a null or empty array will create an empty Polygon. The polygons must conform to the assertions specified in the OpenGIS Simple Features Specification for SQL.
Parameters:
  polygons - Polygons, each of which may be empty but not null



createPoint
public Point createPoint(Coordinate coordinate)(Code)
Creates a Point using the given Coordinate; a null Coordinate will create an empty Geometry.



createPoint
public Point createPoint(CoordinateSequence coordinates)(Code)
Creates a Point using the given CoordinateSequence; a null or empty CoordinateSequence will create an empty Point.



createPointFromInternalCoord
public static Point createPointFromInternalCoord(Coordinate coord, Geometry exemplar)(Code)



createPolygon
public Polygon createPolygon(LinearRing shell, LinearRing[] holes)(Code)
Constructs a Polygon with the given exterior boundary and interior boundaries.
Parameters:
  shell - the outer boundary of the new Polygon, ornull or an empty LinearRing ifthe empty geometry is to be created.
Parameters:
  holes - the inner boundaries of the new Polygon, ornull or empty LinearRing s ifthe empty geometry is to be created.



getCoordinateSequenceFactory
public CoordinateSequenceFactory getCoordinateSequenceFactory()(Code)



getPrecisionModel
public PrecisionModel getPrecisionModel()(Code)
Returns the PrecisionModel that Geometries created by this factory will be associated with.



getSRID
public int getSRID()(Code)



toGeometry
public Geometry toGeometry(Envelope envelope)(Code)
If the Envelope is a null Envelope, returns an empty Point. If the Envelope is a point, returns a non-empty Point. If the Envelope is a rectangle, returns a Polygon whose points are (minx, miny), (maxx, miny), (maxx, maxy), (minx, maxy), (minx, miny).
Parameters:
  envelope - the Envelope to convert to a Geometry
Parameters:
  precisionModel - the specification of the grid of allowable pointsfor the new Geometry
Parameters:
  SRID - the ID of the Spatial Reference System used by theEnvelope an empty Point (for null Envelopes), a Point (when min x = max x and min y = max y) or aPolygon (in all other cases) TopologyException if coordinatesis not a closed linestring, that is, if the first and last coordinatesare not equal



toGeometryArray
public static Geometry[] toGeometryArray(Collection geometries)(Code)
Converts the List to an array.
Parameters:
  geometries - the list of Geometry's to convert the List in array format



toLineStringArray
public static LineString[] toLineStringArray(Collection lineStrings)(Code)
Converts the List to an array.
Parameters:
  lineStrings - the List of LineStrings to convert the List in array format



toLinearRingArray
public static LinearRing[] toLinearRingArray(Collection linearRings)(Code)
Converts the List to an array.
Parameters:
  linearRings - the List of LinearRings to convert the List in array format



toMultiLineStringArray
public static MultiLineString[] toMultiLineStringArray(Collection multiLineStrings)(Code)
Converts the List to an array.
Parameters:
  multiLineStrings - the List of MultiLineStrings to convert the List in array format



toMultiPointArray
public static MultiPoint[] toMultiPointArray(Collection multiPoints)(Code)
Converts the List to an array.
Parameters:
  multiPoints - the List of MultiPoints to convert the List in array format



toMultiPolygonArray
public static MultiPolygon[] toMultiPolygonArray(Collection multiPolygons)(Code)
Converts the List to an array.
Parameters:
  multiPolygons - the List of MultiPolygons to convert the List in array format



toPointArray
public static Point[] toPointArray(Collection points)(Code)
Converts the List to an array.
Parameters:
  points - the List of Points to convert the List in array format



toPolygonArray
public static Polygon[] toPolygonArray(Collection polygons)(Code)
Converts the List to an array.
Parameters:
  polygons - the List of Polygons to convert the List in array format



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.