public class Point2DExpression extends Spatial2DExpression<com.vividsolutions.jts.geom.Point,Point2DResult,DBPoint2D> implements Point2DResult
Use these methods to manipulate and transform point2d values and results.
Support DBvolution at Patreon
EqualExpression.ModeSimpleExpression, EqualExpression.ModeStrictExpression| Modifier | Constructor and Description |
|---|---|
protected |
Point2DExpression()
Default constructor
|
protected |
Point2DExpression(AnyResult<?> value)
Create a Point2DExpression that represents the point value provided.
|
|
Point2DExpression(double xValue,
double yValue) |
|
Point2DExpression(com.vividsolutions.jts.geom.Point point)
Create a Point2DExpression that represents the point value provided.
|
|
Point2DExpression(Point2DResult value)
Create a Point2DExpression that represents the point value provided.
|
| Modifier and Type | Method and Description |
|---|---|
DBPoint2D |
asExpressionColumn()
Creates a QueryableDatatype version of the expression suitable for use as a
column.
|
Polygon2DExpression |
boundingBox()
Return a rectangular Polygon2D that fully encompasses all point(s) within
this value.
|
Point2DExpression |
copy()
A Complete Copy Of This DBValue.
|
NumberExpression |
distanceTo(Point2DExpression otherPoint)
Calculate the distance between this point and the other point.
|
boolean |
equals(Object other) |
Point2DExpression |
expression(DBPoint2D value) |
Point2DExpression |
expression(Double xValue,
Double yValue)
Create a Point2DExpression that represents the values provided.
|
Point2DExpression |
expression(IntegerExpression xValue,
IntegerExpression yValue)
Create a Point2DExpression that represents the values provided.
|
Point2DExpression |
expression(Integer xValue,
Integer yValue)
Create a Point2DExpression that represents the values provided.
|
Point2DExpression |
expression(Long xValue,
Long yValue)
Create a Point2DExpression that represents the values provided.
|
Point2DExpression |
expression(NumberExpression xValue,
NumberExpression yValue)
Create a Point2DExpression that represents the values provided.
|
Point2DExpression |
expression(com.vividsolutions.jts.geom.Point point)
Create a Point2DExpression that represents the point value provided.
|
Point2DExpression |
expression(Point2DResult value) |
DBPoint2D |
getQueryableDatatypeForExpressionValue()
Provides a blank instance of the
QueryableDatatype used by this
expression. |
NumberExpression |
getX()
Retrieves the X value of this point expression.
|
NumberExpression |
getY()
Retrieves the Y value of this point expression.
|
int |
hashCode() |
BooleanExpression |
hasMagnitude()
Indicates whether this geometry has a magnitude value.
|
BooleanExpression |
is(com.vividsolutions.jts.geom.Point rightHandSide)
Creates a
BooleanExpression that compares the 2 instances using the
EQUALS operation. |
BooleanExpression |
is(Point2DResult rightHandSide)
Creates a
BooleanExpression that compares the 2 values using the
EQUALS operation. |
BooleanExpression |
isNot(com.vividsolutions.jts.geom.Point rightHandSide)
Creates a
BooleanExpression that compares the 2 instances using the
NOT EQUALS operation. |
BooleanExpression |
isNot(Point2DResult rightHandSide)
Creates a
BooleanExpression that compares the 2 values using the
NOT EQUALS operation. |
NumberExpression |
magnitude()
Returns the numerical magnitude value, if any, for this expression.
|
NumberExpression |
maxX()
Return a expression that provides the largest X value within the spatial
value.
|
NumberExpression |
maxY()
Return a expression that provides the largest Y value within the spatial
value.
|
NumberExpression |
measurableDimensions()
Return the measurableDimensions of this expression.
|
NumberExpression |
minX()
Return a expression that provides the smallest X value within the spatial
value.
|
NumberExpression |
minY()
Return a expression that provides the smallest Y value within the spatial
value.
|
Point2DExpression |
modeSimple()
Creates an expression that will return the most common value of the column
supplied.
|
Point2DExpression |
nullExpression()
Returns an expression that will evaluate to NULL in SQL.
|
NumberExpression |
spatialDimensions()
Return the spatial dimensions of this expression.
|
StringExpression |
stringResult()
Converts the expression into the standard string/character expression
representing the value.
|
StringExpression |
toWKTFormat()
Transform the value into the Well Known Text (WKT) format.
|
static Point2DExpression |
value(Double xValue,
Double yValue) |
static Point2DExpression |
value(IntegerExpression xValue,
IntegerExpression yValue) |
static Point2DExpression |
value(Integer xValue,
Integer yValue) |
static Point2DExpression |
value(Long xValue,
Long yValue) |
static Point2DExpression |
value(NumberExpression xValue,
NumberExpression yValue) |
static Point2DExpression |
value(Point2DResult point)
Create a Point2DExpression that represents the point value provided.
|
count, countAll, countIf, is, isNot, modeStrictcreateSQLForFromClause, getIncludesNull, getInnerResult, getTablesInvolved, isAggregator, isComplexExpression, isNullSafetyTerminator, isPurelyFunctional, nullBoolean, nullDate, nullDateRepeat, nullInteger, nullLine2D, nullLineSegment2D, nullMultiPoint2D, nullNumber, nullPoint2D, nullPolygon2D, nullString, toSQLString, value, value, value, value, value, value, value, value, value, value, value, value, value, value, value, value, value, value, value, valueclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitcreateSQLForFromClause, getTablesInvolved, isAggregator, isComplexExpression, isPurelyFunctional, toSQLStringgetIncludesNullprotected Point2DExpression()
protected Point2DExpression(AnyResult<?> value)
value - public Point2DExpression(Point2DResult value)
value - public Point2DExpression(com.vividsolutions.jts.geom.Point point)
point - public Point2DExpression(double xValue,
double yValue)
public Point2DExpression expression(com.vividsolutions.jts.geom.Point point)
expression in class AnyExpression<com.vividsolutions.jts.geom.Point,Point2DResult,DBPoint2D>point - the value of this value.
Support DBvolution at Patreon
public static Point2DExpression value(Point2DResult point)
point - the value of this value.
Support DBvolution at Patreon
public Point2DExpression expression(Integer xValue, Integer yValue)
xValue - the X value of this value.yValue - the Y value of this value.
Support DBvolution at Patreon
public static Point2DExpression value(Integer xValue, Integer yValue)
public Point2DExpression expression(Long xValue, Long yValue)
xValue - the X value of this value.yValue - the Y value of this value.
Support DBvolution at Patreon
public static Point2DExpression value(Long xValue, Long yValue)
public Point2DExpression expression(Double xValue, Double yValue)
xValue - the X value of this value.yValue - the Y value of this value.
Support DBvolution at Patreon
public static Point2DExpression value(Double xValue, Double yValue)
public Point2DExpression expression(NumberExpression xValue, NumberExpression yValue)
xValue - the X value of this value.yValue - the Y value of this value.
Support DBvolution at Patreon
public static Point2DExpression value(NumberExpression xValue, NumberExpression yValue)
public Point2DExpression expression(IntegerExpression xValue, IntegerExpression yValue)
xValue - the X value of this value.yValue - the Y value of this value.
Support DBvolution at Patreon
public static Point2DExpression value(IntegerExpression xValue, IntegerExpression yValue)
public Point2DExpression nullExpression()
AnyExpressionnullExpression in class AnyExpression<com.vividsolutions.jts.geom.Point,Point2DResult,DBPoint2D>public Point2DExpression expression(Point2DResult value)
expression in class AnyExpression<com.vividsolutions.jts.geom.Point,Point2DResult,DBPoint2D>public Point2DExpression expression(DBPoint2D value)
expression in class AnyExpression<com.vividsolutions.jts.geom.Point,Point2DResult,DBPoint2D>public DBPoint2D getQueryableDatatypeForExpressionValue()
DBExpressionQueryableDatatype used by this
expression.
You are probably looking for ExpressionColumn.asExpressionColumn().
Note that this method is not good for use in everyday DBvolution code and should probably be reserved for meta-programming.
Support DBvolution at Patreon
getQueryableDatatypeForExpressionValue in interface DBExpressionpublic Point2DExpression copy()
DBExpressionImmutability in DBvolution is maintain by internally copying objects.
This method enables immutability by performing a deep copy of the object.
Singletons may return themselves but all other objects must return a new instance with copies of all mutable fields.
Support DBvolution at Patreon
copy in interface DBExpressionDBValuepublic StringExpression toWKTFormat()
Spatial2DComparableSupport DBvolution at Patreon
toWKTFormat in interface Spatial2DComparable<com.vividsolutions.jts.geom.Point,Point2DResult>public StringExpression stringResult()
ExpressionHasStandardStringResultNot all types have a standard string/character representation, notably dates.
Please note that this is not the SQL version of the expression
(toSQLString() will provide that),
nor does this provide a String of the value.
To get the string value use the
stringValue method of the
appropriate QDT.
Support DBvolution at Patreon
stringResult in interface ExpressionHasStandardStringResultpublic BooleanExpression is(com.vividsolutions.jts.geom.Point rightHandSide)
BooleanExpression that compares the 2 instances using the
EQUALS operation.is in interface EqualComparable<com.vividsolutions.jts.geom.Point,Point2DResult>rightHandSide - the value to compare against.
Support DBvolution at Patreon
public BooleanExpression is(Point2DResult rightHandSide)
EqualComparableBooleanExpression that compares the 2 values using the
EQUALS operation.is in interface EqualComparable<com.vividsolutions.jts.geom.Point,Point2DResult>rightHandSide - an instance to compare to
Support DBvolution at Patreon
public BooleanExpression isNot(com.vividsolutions.jts.geom.Point rightHandSide)
BooleanExpression that compares the 2 instances using the
NOT EQUALS operation.isNot in interface EqualComparable<com.vividsolutions.jts.geom.Point,Point2DResult>rightHandSide - the value to compare against.
Support DBvolution at Patreon
public BooleanExpression isNot(Point2DResult rightHandSide)
EqualComparableBooleanExpression that compares the 2 values using the
NOT EQUALS operation.isNot in interface EqualComparable<com.vividsolutions.jts.geom.Point,Point2DResult>rightHandSide - and instance to compare to
Support DBvolution at Patreon
public NumberExpression getX()
Provides access to the X value of this point allowing for transforms and tests.
Support DBvolution at Patreon
public NumberExpression getY()
Provides access to the Y value of this point allowing for transforms and tests.
Support DBvolution at Patreon
public NumberExpression measurableDimensions()
Spatial2DComparableThis represents measurableDimensions in the sense of how many dimensions they can be measured in.
For instance points are zero dimensional in this sense, while lines have a single measurableDimensions, and polygons have 2.
Since this is a 2D expression, the maximum value of measurableDimensions() is 2.
All Spatial2D values are still defined in 2D space and require an X and a Y value.
Support DBvolution at Patreon
measurableDimensions in interface Spatial2DComparable<com.vividsolutions.jts.geom.Point,Point2DResult>public NumberExpression spatialDimensions()
Spatial2DComparableThis represents spatial dimensions in the sense of how many dimensions the locations of the geometry in defined in. That is to say how many of X, Y, Z, and W the geometry must be defined in.
For instance 2D geometries have 2 spatial dimensions: X and Y. 3D geometries use X, Y, and Z. Presumably hyper-geometries have X, Y, Z, W, etc dimensions.
Support DBvolution at Patreon
spatialDimensions in interface Spatial2DComparable<com.vividsolutions.jts.geom.Point,Point2DResult>public BooleanExpression hasMagnitude()
Spatial2DComparableMagnitude is a single value that has been measured at this point. For instance density, depth, color, or temperature. The particular meaning of magnitude is not defined and it can be anything with a numerical value.
Magnitude isn't actually a very good way to store this information but it is used sometimes.
Support DBvolution at Patreon
hasMagnitude in interface Spatial2DComparable<com.vividsolutions.jts.geom.Point,Point2DResult>public NumberExpression magnitude()
Spatial2DComparableMagnitude is a single value that has been measured at this point. For instance density, depth, color, or temperature. The particular meaning of magnitude is not defined and it can be anything with a numerical value.
Magnitude isn't actually a very good way to store this information but it is used sometimes.
This value will be null if the actual value is null OR if the spatial type does not support magnitudes.
Support DBvolution at Patreon
magnitude in interface Spatial2DComparable<com.vividsolutions.jts.geom.Point,Point2DResult>public NumberExpression distanceTo(Point2DExpression otherPoint)
Creates an SQL value that will report the distance (in units) between these two points.
Essentially this utilizes a database specific method to calculate sqrt((x2-x1)^2+(y2-y1)^2).
otherPoint - the point from which to derive the distance.
Support DBvolution at Patreon
public Polygon2DExpression boundingBox()
Spatial2DComparableSupport DBvolution at Patreon
boundingBox in interface Spatial2DComparable<com.vividsolutions.jts.geom.Point,Point2DResult>public NumberExpression maxX()
Spatial2DComparableSupport DBvolution at Patreon
maxX in interface Spatial2DComparable<com.vividsolutions.jts.geom.Point,Point2DResult>public NumberExpression maxY()
Spatial2DComparableSupport DBvolution at Patreon
maxY in interface Spatial2DComparable<com.vividsolutions.jts.geom.Point,Point2DResult>public NumberExpression minX()
Spatial2DComparableSupport DBvolution at Patreon
minX in interface Spatial2DComparable<com.vividsolutions.jts.geom.Point,Point2DResult>public NumberExpression minY()
Spatial2DComparableSupport DBvolution at Patreon
minY in interface Spatial2DComparable<com.vividsolutions.jts.geom.Point,Point2DResult>public Point2DExpression modeSimple()
MODE: The number which appears most often in a set of numbers. For example: in {6, 3, 9, 6, 6, 5, 9, 3} the Mode is 6.
Support DBvolution at Patreon
modeSimple in class EqualExpression<com.vividsolutions.jts.geom.Point,Point2DResult,DBPoint2D>public DBPoint2D asExpressionColumn()
ExpressionColumn
For example: @DBColumn public DBString title =
person.column(person.fullname).substringBefore("
").asExpressionColumn();
Support DBvolution at Patreon
asExpressionColumn in interface ExpressionColumn<DBPoint2D>Copyright © 2018. All Rights Reserved.