Package net.postgis.jdbc
Class PGboxbase
java.lang.Object
org.postgresql.util.PGobject
net.postgis.jdbc.PGboxbase
- All Implemented Interfaces:
Serializable,Cloneable
public abstract class PGboxbase
extends org.postgresql.util.PGobject
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected PointThe lower left bottom corner of the box.protected PointThe upper right top corner of the box.Fields inherited from class org.postgresql.util.PGobject
type, value -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()protected static booleancompareLazyDim(Point first, Point second) Compare two coordinates with lazy dimension checking.booleangetLLB()Returns the lower left bottom corner of the box as a Point objectabstract StringThe Postgres type we have (same construct as getPrefix())abstract StringThe Prefix we have in WKT rep.getURT()Returns the upper right top corner of the box as a Point objectgetValue()protected abstract PGboxbaseObtain a new instance of a PGboxbase We could have used this.getClass().newInstance() here, but this forces us dealing with InstantiationException and IllegalAccessException.voidtoString()Unlike geometries, toString() does _not_ contain the srid, as server-side PostGIS cannot parse this.Methods inherited from class org.postgresql.util.PGobject
equals, getType, hashCode, isNull, setType
-
Field Details
-
llb
The lower left bottom corner of the box. -
urt
The upper right top corner of the box.
-
-
Constructor Details
-
PGboxbase
public PGboxbase() -
PGboxbase
-
PGboxbase
- Throws:
SQLException
-
-
Method Details
-
getPrefix
The Prefix we have in WKT rep. I use an abstract method here so we do not need to replicate the String object in every instance.- Returns:
- the prefix, as a string
-
getPGtype
The Postgres type we have (same construct as getPrefix())- Returns:
- String containing the name of the type for this box.
-
setValue
- Overrides:
setValuein classorg.postgresql.util.PGobject- Throws:
SQLException
-
getValue
- Overrides:
getValuein classorg.postgresql.util.PGobject
-
toString
Unlike geometries, toString() does _not_ contain the srid, as server-side PostGIS cannot parse this.- Overrides:
toStringin classorg.postgresql.util.PGobject- Returns:
- String representation of this box
-
getLLB
Returns the lower left bottom corner of the box as a Point object- Returns:
- lower left bottom corner of this box
-
getURT
Returns the upper right top corner of the box as a Point object- Returns:
- upper right top corner of this box
-
equals
- Overrides:
equalsin classorg.postgresql.util.PGobject
-
compareLazyDim
Compare two coordinates with lazy dimension checking. As the Server always returns Box3D with three dimensions, z==0 equals dimensions==2- Parameters:
first- First of two points to be comparedsecond- Second of two points to be compared- Returns:
- true if the points are the same, false otherwise
-
clone
- Overrides:
clonein classorg.postgresql.util.PGobject
-
newInstance
Obtain a new instance of a PGboxbase We could have used this.getClass().newInstance() here, but this forces us dealing with InstantiationException and IllegalAccessException. Due to the PGObject.clone() brokennes that does not allow clone() to throw CloneNotSupportedException, we cannot even pass this exceptions down to callers in a sane way.- Returns:
- a new instance of PGboxbase
-