|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.wkb4j.factories.AbstractWKBFactory
|
+--org.wkb4j.postgis.PostGISFactory
This class has the capability to transform data in the WKB format into
PostGIS objects. Since they conforms to the
Simple Features Specification for SQL
published by the Open GIS Consortium,
the mapping is straighforward: each feature described in the WKB is mapped to a corresponding feature in
PostGIS.
Implementation notes:
| Field Summary | |
private org.postgis.Point[] |
coordinatesBuffer
Stores a array of Point objects. |
private org.postgis.Geometry |
currentGeometry
The Geometry being constructed now. |
private java.util.ArrayList |
geometries
Keeps a list of all the object created by this Factory. |
private org.postgis.Geometry[] |
geometryBuffer
|
private int |
geometryPointer
Points to the next free slot in the pointsBuffer. |
private org.postgis.LinearRing[] |
linearRingBuffer
Stores a array of LinearRing objects. |
private int |
linearRingPointer
Points to the next free slot in the linearRingBuffer. |
private org.postgis.LineString[] |
lineStringBuffer
Stores a array of LineString objects. |
private int |
lineStringPointer
Points to the next free slot in the lineStringBuffer. |
protected static org.apache.log4j.Logger |
Log
|
private org.postgis.Point[] |
pointsBuffer
Stores a array of Point objects, for MultiPoint. |
private int |
pointsPointer
Points to the next free slot in the pointsBuffer. |
private org.postgis.Polygon[] |
polygonBuffer
Stores a array of Polygon objects. |
private int |
polygonPointer
Points to the next free slot in the polygonBuffer. |
private int |
srid
The SRID of the top-level Geometry being created. |
| Fields inherited from class org.wkb4j.factories.AbstractWKBFactory |
depthPointer, geometryDepth, inUnit, inWork, log, typeStack, values, words |
| Fields inherited from interface org.wkb4j.engine.WKBGeometryTypes |
linearRing, wkbGeometryCollection, wkbLineString, wkbMultiLineString, wkbMultiPoint, wkbMultiPolygon, wkbPoint, wkbPolygon |
| Constructor Summary | |
PostGISFactory()
Construct a JTSFactory. |
|
| Method Summary | |
void |
abortGeometryCollection()
Signals a malformed GeometryCollection. |
void |
abortLineString()
Signals a malformed LineString. |
void |
abortPoint()
Signals a malformed Point. |
boolean |
addPoints(double[] points)
Transforms an array of Points in an array of Points. |
boolean |
addPoints3D(double[] points)
Transforms an array of doubles into an array of 3D Point objects. |
boolean |
beginGeometryCollection(int count)
Signals the beginning of a new GeometryCollection. |
boolean |
beginMultiLineString(int count)
Constructs a new array of LineStrings with the supplied number of elements. |
boolean |
beginMultiPoint(int count)
Constructs a new array of Points with the supplied number of elements. |
boolean |
beginMultiPolygon(int count)
Constructs a new array of Polygons with the supplied number of elements. |
boolean |
beginPolygon(int count)
Constructs a new array of LinearRings with the supplied number of elements. |
boolean |
endGeometryCollection()
Signals the end of a GeometryCollection. |
boolean |
endLinearRing()
Constructs a LinearRing using the current buffer of Points, resets the Points buffer, add the LinearRing to the linearRingBuffer and defines the new LineString as the currentGeometry. |
boolean |
endLineString()
Constructs a LineString using the current buffer of Points, resets the Points buffer, add the LineString to the lineStringBuffer and defines the new LineString as the currentGeometry. |
boolean |
endMultiLineString()
Constructs a MultiLineString using the current buffer of LineStrings, resets the LineStrings buffer and defines the new MultiLineString as the currentGeometry. |
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()
Constructs a MultiPolygon using the current buffer of LinearRings, resets the LinearRings buffer and defines the new LineString as the currentGeometry. |
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()
Constructs a Polygon using the current buffer of LinearRings, resets the LinearRings buffer, add the Polygon to the polygonBuffer and defines the new Polygon as the currentGeometry. |
void |
endUnit()
Signals the end of the transcription process for a Geometry. |
java.util.ArrayList |
getGeometries()
Returns the geometries. |
boolean |
newGeometryCollectionComponent()
Signals that a new component for the geometry factory is about to processed OR that all components has been used. |
void |
reset()
|
| Methods inherited from class org.wkb4j.factories.AbstractWKBFactory |
abortLinearRing, abortMultiLineString, abortMultiPoint, abortMultiPolygon, abortPolygon, abortUnit, abortWork, beginLinearRing, beginLineString, beginPoint, beginUnit, beginUnit, beginWork, endWork, getValues, getWords, init, setValues, setWords |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static org.apache.log4j.Logger Log
private org.postgis.Point[] coordinatesBuffer
private org.postgis.Point[] pointsBuffer
private org.postgis.LineString[] lineStringBuffer
private org.postgis.Polygon[] polygonBuffer
private org.postgis.LinearRing[] linearRingBuffer
private org.postgis.Geometry[] geometryBuffer
private volatile int lineStringPointer
private volatile int polygonPointer
private volatile int linearRingPointer
private volatile int pointsPointer
private volatile int geometryPointer
private int srid
private final java.util.ArrayList geometries
private org.postgis.Geometry currentGeometry
| Constructor Detail |
public PostGISFactory()
| Method Detail |
public final void endUnit()
WKBFactoryGeometry.
endUnit in interface WKBFactoryendUnit in class AbstractWKBFactoryWKBFactory.endUnit()public final boolean beginGeometryCollection(int count)
WKBFactoryGeometryCollection.
beginGeometryCollection in interface WKBFactorybeginGeometryCollection in class AbstractWKBFactoryorg.wkb4j.engine.WKBFactory#beginGeometryCollection()public final boolean endGeometryCollection()
WKBFactoryGeometryCollection.
endGeometryCollection in interface WKBFactoryendGeometryCollection in class AbstractWKBFactoryWKBFactory.endGeometryCollection()public boolean newGeometryCollectionComponent()
WKBFactory
newGeometryCollectionComponent in interface WKBFactorynewGeometryCollectionComponent in class AbstractWKBFactoryWKBFactory.abortGeometryCollection()public final void abortGeometryCollection()
WKBFactoryGeometryCollection. This can happen at any time,
and Factories should just skip the malformed Geometry and maybe escalate the error.
abortGeometryCollection in interface WKBFactoryabortGeometryCollection in class AbstractWKBFactoryWKBFactory.abortGeometryCollection()public final boolean endLineString()
endLineString in interface WKBFactoryendLineString in class AbstractWKBFactoryWKBFactory.endLineString()public final void abortLineString()
WKBFactoryLineString. This can happen at any time,
and Factories should just skip the malformed
abortLineString in interface WKBFactoryabortLineString in class AbstractWKBFactoryWKBFactory.abortLineString()public final boolean beginMultiLineString(int count)
beginMultiLineString in interface WKBFactorybeginMultiLineString in class AbstractWKBFactoryorg.wkb4j.engine.WKBFactory#beginMultiLineString()public final boolean endMultiLineString()
endMultiLineString in interface WKBFactoryendMultiLineString in class AbstractWKBFactoryWKBFactory.endMultiLineString()public final boolean endPoint()
endPoint in interface WKBFactoryendPoint in class AbstractWKBFactoryWKBFactory.endPoint()public final void abortPoint()
WKBFactoryPoint. This can happen at any time,
and Factories should just skip the malformed
abortPoint in interface WKBFactoryabortPoint in class AbstractWKBFactoryWKBFactory.abortPoint()public final boolean beginMultiPoint(int count)
beginMultiPoint in interface WKBFactorybeginMultiPoint in class AbstractWKBFactoryorg.wkb4j.engine.WKBFactory#beginMultiPoint()public final boolean endMultiPoint()
endMultiPoint in interface WKBFactoryendMultiPoint in class AbstractWKBFactoryWKBFactory.endMultiPoint()public final boolean beginMultiPolygon(int count)
beginMultiPolygon in interface WKBFactorybeginMultiPolygon in class AbstractWKBFactoryorg.wkb4j.engine.WKBFactory#beginMultiPolygon()public final boolean endMultiPolygon()
endMultiPolygon in interface WKBFactoryendMultiPolygon in class AbstractWKBFactoryWKBFactory.endMultiPolygon()public final boolean beginPolygon(int count)
beginPolygon in interface WKBFactorybeginPolygon in class AbstractWKBFactoryorg.wkb4j.engine.WKBFactory#beginPolygon()public final boolean endPolygon()
endPolygon in interface WKBFactoryendPolygon in class AbstractWKBFactoryWKBFactory.endPolygon()public final boolean endLinearRing()
endLinearRing in interface WKBFactoryendLinearRing in class AbstractWKBFactoryWKBFactory.endLinearRing()public final boolean addPoints(double[] points)
addPoints in interface WKBFactoryaddPoints in class AbstractWKBFactoryWKBFactory.addPoints(double[])public final boolean addPoints3D(double[] points)
addPoints3D in interface WKBFactory3DaddPoints3D in class AbstractWKBFactoryWKBFactory.addPoints(double[])public final java.util.ArrayList getGeometries()
public void reset()
reset in class AbstractWKBFactoryAbstractWKBFactory.reset()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||