Package io.github.sebasbaumh.postgis
Class PGboxbase
java.lang.Object
org.postgresql.util.PGobject
io.github.sebasbaumh.postgis.PGboxbase
- All Implemented Interfaces:
Serializable
,Cloneable
@NonNullByDefault({PARAMETER,RETURN_TYPE})
public abstract class PGboxbase
extends org.postgresql.util.PGobject
Base class for bounding boxes.
- Author:
- Sebastian Baumhekel
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Point
The lower left bottom corner of the box.protected Point
The upper right top corner of the box.Fields inherited from class org.postgresql.util.PGobject
type, value
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
getLLB()
Returns the lower left bottom corner of the box as a Point objectprotected abstract String
The Prefix we have in WKT rep.int
getSrid()
The OGIS geometry type number of this geometry.getURT()
Returns the upper right top corner of the box as a Point objectgetValue()
int
hashCode()
abstract boolean
is3d()
Checks if this box is 3d.boolean
isEmpty()
Ist this box empty, so does it contain no coordinates?void
setSrid
(int srid) Recursively sets the srid on this geometry and all contained subgeometriesvoid
toString()
Unlike geometries, toString() does _not_ contain the srid, as server-side PostGIS cannot parse this.Methods inherited from class org.postgresql.util.PGobject
clone, equals, getType, 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
Constructs an instance.- Parameters:
type
- type of thisPGobject
-
PGboxbase
Constructs an instance. -
PGboxbase
Constructs an instance.- Parameters:
type
- type of thisPGobject
value
- WKT- Throws:
SQLException
-
-
Method Details
-
equals
- Overrides:
equals
in classorg.postgresql.util.PGobject
-
getLLB
Returns the lower left bottom corner of the box as a Point object- Returns:
- lower left bottom corner of this box
-
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
-
getSrid
public int getSrid()The OGIS geometry type number of this geometry.- Returns:
- the SRID of this geometry
-
getURT
Returns the upper right top corner of the box as a Point object- Returns:
- upper right top corner of this box
-
getValue
- Overrides:
getValue
in classorg.postgresql.util.PGobject
-
hashCode
public int hashCode()- Overrides:
hashCode
in classorg.postgresql.util.PGobject
-
is3d
public abstract boolean is3d()Checks if this box is 3d.- Returns:
- true on success, else false
-
isEmpty
public boolean isEmpty()Ist this box empty, so does it contain no coordinates?- Returns:
- true on success, else false
-
setSrid
public void setSrid(int srid) Recursively sets the srid on this geometry and all contained subgeometries- Parameters:
srid
- the SRID for this geometry
-
setValue
- Overrides:
setValue
in classorg.postgresql.util.PGobject
- Throws:
SQLException
-
toString
Unlike geometries, toString() does _not_ contain the srid, as server-side PostGIS cannot parse this.- Overrides:
toString
in classorg.postgresql.util.PGobject
- Returns:
- String representation of this box
-