com.hardcode.gdbms.engine.spatial
Class GeometryFactory

java.lang.Object
  extended by com.hardcode.gdbms.engine.spatial.GeometryFactory

public class GeometryFactory
extends java.lang.Object


Field Summary
static GeometryFactory instance
           
 
Constructor Summary
GeometryFactory()
           
 
Method Summary
 Geometry createLineString(GeneralPath gp)
          Creates a new linestring Geometry
 Geometry createMultiLineString(GeneralPath[] linestrings)
          Creates a new MultiLineString geometry
 Geometry createMultiLineString(Geometry[] linestrings)
          Creates a new MultiLineString geometry
 Geometry createMultiPoint(double[] x, double[] y)
          Creates a multipoint geometry
 Geometry createMultiPoint(MultipointGeneralPath gp)
          Creates a multipoint geometry.
 Geometry createMultiPolygon(Geometry[] polygons)
          Creates a new MultiPolygonString geometry
 Geometry createPoint(double x, double y)
          Creates a point Geometry
 Geometry createPolygon(ClosedGeneralPath shell)
          Creates a polygon with no holes
 Geometry createPolygon(ClosedGeneralPath shell, ClosedGeneralPath[] holes)
          Creates a new polygon geometry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

public static GeometryFactory instance
Constructor Detail

GeometryFactory

public GeometryFactory()
Method Detail

createPoint

public Geometry createPoint(double x,
                            double y)
Creates a point Geometry

Parameters:
gp -
Returns:

createMultiPoint

public Geometry createMultiPoint(MultipointGeneralPath gp)
Creates a multipoint geometry. Each point in the general path will be a point in the multipoint geometry

Parameters:
gp -
Returns:

createMultiPoint

public Geometry createMultiPoint(double[] x,
                                 double[] y)
Creates a multipoint geometry

Parameters:
x -
y -
Returns:

createLineString

public Geometry createLineString(GeneralPath gp)
Creates a new linestring Geometry

Parameters:
gp -
Returns:

createPolygon

public Geometry createPolygon(ClosedGeneralPath shell)
Creates a polygon with no holes

Parameters:
shell -
Returns:

createPolygon

public Geometry createPolygon(ClosedGeneralPath shell,
                              ClosedGeneralPath[] holes)
Creates a new polygon geometry. The polygon shell vertices will be in clockwise order and the holes vertices will be in counterclockwise order. The shell and the holes are accesible by the getGeometry method in Geometry interface. The shell is always at the first position (getGeometry(0))

Parameters:
shell -
holes -
Returns:

createMultiLineString

public Geometry createMultiLineString(GeneralPath[] linestrings)
Creates a new MultiLineString geometry

Parameters:
linestrings -
Returns:

createMultiLineString

public Geometry createMultiLineString(Geometry[] linestrings)
Creates a new MultiLineString geometry

Parameters:
linestrings -
Returns:

createMultiPolygon

public Geometry createMultiPolygon(Geometry[] polygons)
Creates a new MultiPolygonString geometry

Parameters:
polygons -
Returns:


Copyright © 2005-2006 . All Rights Reserved.