org.wkb4j.jts
Class FastJTSFactory

java.lang.Object
  |
  +--org.wkb4j.jts.FastJTSFactory

public class FastJTSFactory
extends java.lang.Object

Expiremental implementation of a ligther JTSFactory. Not really worth it. NOTE: It doesn't work because of a bug in Point and Polygon handling that is fixed in the normal version. Creation date: 6 juil. 2002 23:10:29

Version:
$Revision: 1.1 $ $Date: 2003/08/02 23:52:18 $
Author:
David Garnier

Field Summary
private  com.vividsolutions.jts.geom.Coordinate[] coordinatesBuffer
           
private  com.vividsolutions.jts.geom.Geometry currentGeometry
           
private  java.util.ArrayList geometries
           
private  com.vividsolutions.jts.geom.LinearRing[] linearRingBuffer
           
private  int linearRingPointer
           
private  com.vividsolutions.jts.geom.LineString[] lineStringBuffer
           
private  int lineStringPointer
           
protected static org.apache.log4j.Logger log
           
private  com.vividsolutions.jts.geom.Point[] pointBuffer
          Stores a array of Point objects.
private  int pointPointer
          Points to the next free slot in the pointPointer.
private  com.vividsolutions.jts.geom.Polygon[] polygonBuffer
           
private  int polygonPointer
           
private  com.vividsolutions.jts.geom.PrecisionModel precisionModel
           
private  int srid
           
 
Constructor Summary
FastJTSFactory()
           
FastJTSFactory(com.vividsolutions.jts.geom.PrecisionModel pm)
           
 
Method Summary
 void abortGeometryCollection()
           
 void abortLinearRing()
           
 void abortLineString()
           
 void abortMultiLineString()
           
 void abortMultiPoint()
           
 void abortMultiPolygon()
           
 void abortPoint()
           
 void abortPolygon()
           
 void abortUnit()
           
 void abortWork()
           
 boolean addPoints(double[] points)
           
 boolean beginGeometryCollection(int count)
           
 boolean beginLinearRing(int count)
           
 boolean beginLineString(int count)
           
 boolean beginMultiLineString(int count)
           
 boolean beginMultiPoint(int count)
          Constructs a new array of Points with the supplied number of elements.
 boolean beginMultiPolygon(int count)
           
 boolean beginPoint()
           
 boolean beginPolygon(int count)
           
 void beginUnit(java.lang.String[] words, int[] values)
           
 void beginWork()
           
 boolean endGeometryCollection()
           
 boolean endLinearRing()
           
 boolean endLineString()
           
 boolean endMultiLineString()
           
 boolean endMultiPoint()
          Constructs a MultiPoint using the current buffer of Points, resets the Points buffer and defines the new MultiPoint as the currentGeometry.
 boolean endMultiPolygon()
           
 boolean endPoint()
          Constructs a Point using the current buffer of Coordinates, resets the Coordinates buffer, add the Point to the PointBuffer and defines the new Point as the currentGeometry.
 boolean endPolygon()
           
 void endUnit()
           
 void endWork()
           
 java.util.ArrayList getGeometries()
          Returns the geometries.
 com.vividsolutions.jts.geom.PrecisionModel getPrecisionModel()
          Returns the precisionModel.
 int getSrid()
          Returns the srid.
 void setPrecisionModel(com.vividsolutions.jts.geom.PrecisionModel precisionModel)
          Sets the precisionModel.
private  void setSrid(int srid)
          Sets the srid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.log4j.Logger log

precisionModel

private com.vividsolutions.jts.geom.PrecisionModel precisionModel

coordinatesBuffer

private com.vividsolutions.jts.geom.Coordinate[] coordinatesBuffer

lineStringBuffer

private com.vividsolutions.jts.geom.LineString[] lineStringBuffer

polygonBuffer

private com.vividsolutions.jts.geom.Polygon[] polygonBuffer

linearRingBuffer

private com.vividsolutions.jts.geom.LinearRing[] linearRingBuffer

pointBuffer

private com.vividsolutions.jts.geom.Point[] pointBuffer
Stores a array of Point objects.


lineStringPointer

private volatile int lineStringPointer

polygonPointer

private volatile int polygonPointer

linearRingPointer

private volatile int linearRingPointer

pointPointer

private volatile int pointPointer
Points to the next free slot in the pointPointer.


srid

private int srid

geometries

private final java.util.ArrayList geometries

currentGeometry

private com.vividsolutions.jts.geom.Geometry currentGeometry
Constructor Detail

FastJTSFactory

public FastJTSFactory()

FastJTSFactory

public FastJTSFactory(com.vividsolutions.jts.geom.PrecisionModel pm)
Method Detail

beginWork

public final void beginWork()
See Also:
WKBFactory.beginWork()

endWork

public final void endWork()
See Also:
WKBFactory.endWork()

abortWork

public final void abortWork()
See Also:
WKBFactory.abortWork()

beginUnit

public final void beginUnit(java.lang.String[] words,
                            int[] values)
See Also:
org.wkb4j.engine.WKBFactory#beginUnit()

endUnit

public final void endUnit()
See Also:
WKBFactory.endUnit()

abortUnit

public final void abortUnit()
See Also:
WKBFactory.abortUnit()

beginGeometryCollection

public final boolean beginGeometryCollection(int count)
See Also:
org.wkb4j.engine.WKBFactory#beginGeometryCollection()

endGeometryCollection

public final boolean endGeometryCollection()
See Also:
WKBFactory.endGeometryCollection()

abortGeometryCollection

public final void abortGeometryCollection()
See Also:
WKBFactory.abortGeometryCollection()

beginLineString

public final boolean beginLineString(int count)
See Also:
org.wkb4j.engine.WKBFactory#beginLineString()

endLineString

public final boolean endLineString()
See Also:
WKBFactory.endLineString()

abortLineString

public final void abortLineString()
See Also:
WKBFactory.abortLineString()

beginPoint

public final boolean beginPoint()
See Also:
WKBFactory.beginPoint()

endPoint

public final boolean endPoint()
Constructs a Point using the current buffer of Coordinates, resets the Coordinates buffer, add the Point to the PointBuffer and defines the new Point as the currentGeometry.

See Also:
WKBFactory.endPoint()

abortPoint

public final void abortPoint()
See Also:
WKBFactory.abortPoint()

beginMultiPoint

public final boolean beginMultiPoint(int count)
Constructs a new array of Points with the supplied number of elements.

See Also:
org.wkb4j.engine.WKBFactory#beginMultiPoint()

endMultiPoint

public final boolean endMultiPoint()
Constructs a MultiPoint using the current buffer of Points, resets the Points buffer and defines the new MultiPoint as the currentGeometry.

See Also:
WKBFactory.endMultiPoint()

abortMultiPoint

public final void abortMultiPoint()
See Also:
WKBFactory.abortMultiPoint()

beginMultiLineString

public final boolean beginMultiLineString(int count)
See Also:
org.wkb4j.engine.WKBFactory#beginMultiLineString()

endMultiLineString

public final boolean endMultiLineString()
See Also:
WKBFactory.endMultiLineString()

abortMultiLineString

public final void abortMultiLineString()
See Also:
WKBFactory.abortMultiLineString()

beginMultiPolygon

public final boolean beginMultiPolygon(int count)
See Also:
org.wkb4j.engine.WKBFactory#beginMultiPolygon()

endMultiPolygon

public final boolean endMultiPolygon()
See Also:
WKBFactory.endMultiPolygon()

abortMultiPolygon

public final void abortMultiPolygon()
See Also:
WKBFactory.abortMultiPolygon()

beginPolygon

public final boolean beginPolygon(int count)
See Also:
org.wkb4j.engine.WKBFactory#beginPolygon()

endPolygon

public final boolean endPolygon()
See Also:
WKBFactory.endPolygon()

abortPolygon

public final void abortPolygon()
See Also:
WKBFactory.abortPolygon()

beginLinearRing

public final boolean beginLinearRing(int count)
See Also:
org.wkb4j.engine.WKBFactory#beginLinearRing()

endLinearRing

public final boolean endLinearRing()
See Also:
WKBFactory.endLinearRing()

abortLinearRing

public final void abortLinearRing()
See Also:
WKBFactory.abortLinearRing()

addPoints

public final boolean addPoints(double[] points)
See Also:
WKBFactory.addPoints(double[])

getPrecisionModel

public final com.vividsolutions.jts.geom.PrecisionModel getPrecisionModel()
Returns the precisionModel.

Returns:
PrecisionModel

setPrecisionModel

public final void setPrecisionModel(com.vividsolutions.jts.geom.PrecisionModel precisionModel)
Sets the precisionModel.

Parameters:
precisionModel - The precisionModel to set

getGeometries

public final java.util.ArrayList getGeometries()
Returns the geometries.

Returns:
ArrayList

getSrid

public final int getSrid()
Returns the srid.

Returns:
int

setSrid

private void setSrid(int srid)
Sets the srid.

Parameters:
srid - The srid to set


Copyright © 2002-2003 David Garnier. All Rights Reserved.