|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.postgresql.util.PGobject
org.postgis.java2d.PGShapeGeometry
public class PGShapeGeometry
PostGIS Java2D geometry implementation (read-only). Supports PostGIS 1.x (lwgeom hexwkb). As the java.awt.Shape methods currently are implemented by using a java.awt.geom.GeneralPath object, they have the same semantics. BUG/TODO: MultiPoints or Points in a Geometry Collection currently don't work as expected, as some GeneralPath implementations throw away adjacent MoveTo commands as an optimization (e. G. sun 1.5 and ibm 1.5). Points thus are translated into MoveTo() followed by a closePath. This may change when we implement our own path logics. We have to evaluate whether Graphics2D renders a single MoveTo command as a single "brush tip", or we need the closePath() command nevertheless to get any drawing. Maybe we need a LineTo() to the same coordinages instead. (Multi)LineStrings are translated into a sequence of a single MoveTo and multiple LineTo vertices, and Polygon rings into a sequence of a single MoveTo, multiple LineTo and a closePath command. To allow correct Polygon filling, our PathIterators have GeneralPath.WIND_EVEN_ODD as winding rule.
GeneralPath,
Shape,
PGobject,
Serialized Form| Field Summary |
|---|
| Fields inherited from class org.postgresql.util.PGobject |
|---|
type, value |
| Constructor Summary | |
|---|---|
PGShapeGeometry()
Constructor called by JDBC drivers. |
|
PGShapeGeometry(java.awt.geom.GeneralPath path,
int srid)
Construct directly from a General Path |
|
PGShapeGeometry(java.lang.String value)
Reads the HexWKB representation |
|
| Method Summary | |
|---|---|
boolean |
contains(double x,
double y)
|
boolean |
contains(double x,
double y,
double w,
double h)
|
boolean |
contains(java.awt.geom.Point2D p)
|
boolean |
contains(java.awt.geom.Rectangle2D r)
|
boolean |
equals(java.lang.Object obj)
|
java.awt.Rectangle |
getBounds()
|
java.awt.geom.Rectangle2D |
getBounds2D()
|
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform at)
|
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform at,
double flatness)
|
int |
getSRID()
Return the SRID or Geometry.UNKNOWN_SRID if none was available |
java.lang.String |
getValue()
We currently have read-only support, so this method returns null |
boolean |
intersects(double x,
double y,
double w,
double h)
|
boolean |
intersects(java.awt.geom.Rectangle2D r)
|
void |
setValue(java.lang.String value)
Reads the HexWKB representation - to be called by the jdbc drivers. |
java.lang.String |
toString()
|
| Methods inherited from class org.postgresql.util.PGobject |
|---|
clone, getType, setType |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PGShapeGeometry()
public PGShapeGeometry(java.awt.geom.GeneralPath path,
int srid)
public PGShapeGeometry(java.lang.String value)
throws java.sql.SQLException
java.sql.SQLException| Method Detail |
|---|
public void setValue(java.lang.String value)
throws java.sql.SQLException
setValue in class org.postgresql.util.PGobjectjava.sql.SQLExceptionpublic java.lang.String toString()
toString in class org.postgresql.util.PGobjectpublic java.lang.String getValue()
getValue in class org.postgresql.util.PGobjectpublic boolean equals(java.lang.Object obj)
equals in class org.postgresql.util.PGobjectpublic int getSRID()
public boolean contains(double x,
double y)
contains in interface java.awt.Shape
public boolean contains(double x,
double y,
double w,
double h)
contains in interface java.awt.Shape
public boolean intersects(double x,
double y,
double w,
double h)
intersects in interface java.awt.Shapepublic java.awt.Rectangle getBounds()
getBounds in interface java.awt.Shapepublic boolean contains(java.awt.geom.Point2D p)
contains in interface java.awt.Shapepublic java.awt.geom.Rectangle2D getBounds2D()
getBounds2D in interface java.awt.Shapepublic boolean contains(java.awt.geom.Rectangle2D r)
contains in interface java.awt.Shapepublic boolean intersects(java.awt.geom.Rectangle2D r)
intersects in interface java.awt.Shapepublic java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at)
getPathIterator in interface java.awt.Shape
public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at,
double flatness)
getPathIterator in interface java.awt.Shape
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||