public final class TLcdOGCVendorSpecificFunctions extends Object
This class contains the documentation of all the custom, vendor-specific TLcdOGCFunction
s that are supported
in Luciad's OGC Filter implementation.
These functions can be used in querying a model, in TLcdOGCFilter
and
in SLD.
Name | Arguments | Result | Description |
---|---|---|---|
"minBoundsSize" |
minX : numerical TLcdOGCLiteral minY : numerical TLcdOGCLiteral |
Boolean
|
Can be used to discard objects that are too small to see when zoomed out. Returns true if the object is larger than either of the given sizes,
false if it is smaller.
|
"geometryType" |
geometry : TLcdOGCPropertyName representing a geometry
|
String
|
Returns the type of the geometry as a string.
May be Point , MultiPoint , LineString , LinearRing , MultiLineString , Polygon , MultiPolygon , MultiLinearRing , GeometryCollection
|
"startAngle" |
geometry : TLcdOGCPropertyName representing a geometry
|
Double
|
Returns the start angle of the geometry, measured in degrees clockwise from the direction at 12 o'clock. An example use case within OGC SLD is to rotate a graphic according to the start angle of a geometry. |
"endAngle" |
geometry : TLcdOGCPropertyName representing a geometry
|
Double
|
Returns the end angle of the geometry, measured in degrees clockwise from the direction at 12 o'clock. An example use case within OGC SLD is to rotate a graphic according to the end angle of a geometry. |
"startPoint" |
geometry : TLcdOGCPropertyName representing a geometry
|
ILcdPoint
|
Returns the start point of the geometry. An example use case within OGC SLD is the ability to define a point symbolizer for the start point of a geometry. |
"endPoint" |
geometry : TLcdOGCPropertyName representing a geometry
|
ILcdPoint
|
Returns the end point of the geometry. An example use case within OGC SLD is the ability to define a point symbolizer for the end point of a geometry. |
"interiorPoint" |
geometry : TLcdOGCPropertyName representing a geometry
|
ILcdPoint
|
Returns a point that is interior to the geometry in case of a polygon, or sitting on its boundary otherwise. An example use case within OGC SLD is the ability to define an icon or label inside an area. |
"vertices" |
geometry : TLcdOGCPropertyName representing a geometry
|
Array of ILcdPoint instances
|
Returns the points of a geometry. An example use case within OGC SLD is the ability to style the points of a polyline with an icon. |
Name | Arguments | Result | Description |
---|---|---|---|
"in2", "in3", ..., "in10" |
candidate : the object to comparev1 : the first object to compare withv2 : the second object to compare with... v10 : the tenth object to compare with |
Boolean
|
Returns true if candidate is equal to one of the v1 , v2 , ... , v10 values.
The function name indicates how many values the function expects.For example "in5" expects 6 arguments: 1 candidate, and 5 values to compare with. |
Name | Arguments | Result | Description |
---|---|---|---|
"strLength" |
string : a string |
Integer
|
Returns the length of the string. |
"strSubstring" |
string : a stringbegin : an Integer representing the begin indexend : an Integer representing the end index
|
String
|
Returns a new string that is a substring of the input string.
The substring begins at the specified begin index, and extends to the character at index end-1 .
The indices are zero-based.
|
"strSubstringStart" |
string : a stringbegin : an Integer representing the begin index
|
String
|
Returns a new string that is a substring of the input string. The substring begins at the specified begin index, and extends to the last character of the string. The indices are zero-based. |
"strToLowerCase" |
string : a string |
String
|
Returns the lower case version of the input string. |
"strToUpperCase" |
string : a string |
String
|
Returns the upper case version of the input string. |
"strTrim" |
string : a string |
String
|
Returns a version of the input string with leading and trailing spaces removed. |
Name | Arguments | Result | Description |
---|---|---|---|
"dateFormat" |
format : a string indicating the date format according to the SimpleDateFormat syntaxdate : a TLcdOGCPropertyName representing a date |
String
|
Returns the formatted date according to the provided format. |
"dateParse" |
format : a string indicating the date format according to the SimpleDateFormat syntaxdateString : a TLcdOGCPropertyName representing a date encoded as a string |
Date
|
Returns the parsed date. |
Name | Arguments | Result | Description |
---|---|---|---|
"Recode" |
property : a TLcdOGCPropertyName representing the property for which you want to transform the values.inputValue1 : the first property value you want to map to another valueoutputValue1 : the output value mapping for the first input value if the property matches that input value... vx : the x-th input / output value mapping to which the property will be compared.
|
Object
|
Transforms a set of discrete property values into another set of values. Use it to map property values to other values. Returns a string with the new property value. For example, map the state names in a STATE_NAME property to colors using the state name as input value and a Hex color code as output value.
|
Modifier and Type | Field and Description |
---|---|
static String |
DATE_FORMAT_FUNCTION_NAME
The dateFormat function formats a date property according to the provided format.
|
static String |
DATE_PARSE_FUNCTION_NAME
The dateParse function parses a date from a
String property to a Date . |
static String |
END_ANGLE_FUNCTION_NAME
The "endAngle" function returns the end angle of a geometry.
|
static String |
END_POINT_FUNCTION_NAME
The "endPoint" function returns the end point of a geometry.
|
static String |
GEOMETRY_TYPE_FUNCTION_NAME
The "geometryType" function returns the geometry type of an object as a String
(
Point , MultiPoint , LineString , LinearRing , MultiLineString , Polygon , MultiPolygon , MultiLinearRing , GeometryCollection ). |
static String |
IN_10_FUNCTION_NAME
The in_x function checks whether a candidate equals to at least one of a number of values.
|
static String |
IN_2_FUNCTION_NAME
The in_x function checks whether a candidate equals to at least one of a number of values.
|
static String |
IN_3_FUNCTION_NAME
The in_x function checks whether a candidate equals to at least one of a number of values.
|
static String |
IN_4_FUNCTION_NAME
The in_x function checks whether a candidate equals to at least one of a number of values.
|
static String |
IN_5_FUNCTION_NAME
The in_x function checks whether a candidate equals to at least one of a number of values.
|
static String |
IN_6_FUNCTION_NAME
The in_x function checks whether a candidate equals to at least one of a number of values.
|
static String |
IN_7_FUNCTION_NAME
The in_x function checks whether a candidate equals to at least one of a number of values.
|
static String |
IN_8_FUNCTION_NAME
The in_x function checks whether a candidate equals to at least one of a number of values.
|
static String |
IN_9_FUNCTION_NAME
The in_x function checks whether a candidate equals to at least one of a number of values.
|
static String |
INTERIOR_POINT_FUNCTION_NAME
The "interiorPoint" function returns a point that is interior to the geometry in case of a polygon,
or sitting on its boundary otherwise.
|
static String |
MIN_BOUNDS_SIZE_FUNCTION_NAME
The "minBoundsSize" function evaluates a minimum size filter on geometries, excluding point geometries.
|
static String |
RECODE_FUNCTION_NAME
The "Recode" function transforms a set of discrete property values into another set of values.
|
static String |
START_ANGLE_FUNCTION_NAME
The "startAngle" function returns the start angle of a geometry.
|
static String |
START_POINT_FUNCTION_NAME
The "startPoint" function returns the start point of a geometry.
|
static String |
STRING_LENGTH_FUNCTION_NAME
The string length function returns the length of the input string.
|
static String |
STRING_REPLACE_FUNCTION_NAME
The string replace function returns the string with the pattern replaced with the given replacement text.
|
static String |
STRING_SUBSTRING_FUNCTION_NAME
The substring function returns a substring of an input string.
|
static String |
STRING_SUBSTRING_START_FUNCTION_NAME
The substring start function returns a substring of an input string.
|
static String |
STRING_TO_LOWER_CASE_FUNCTION_NAME
The to lower case function returns a lower case version of an input string.
|
static String |
STRING_TO_UPPER_CASE_FUNCTION_NAME
The to upper case function returns a upper case version of an input string.
|
static String |
STRING_TRIM_FUNCTION_NAME
The string trim function returns a version of an input string with leading and trailing spaces removed.
|
static String |
VERTICES_FUNCTION_NAME
The "vertices" function returns all points of a geometry.
|
public static final String MIN_BOUNDS_SIZE_FUNCTION_NAME
"main"
geometry.
You can use this for example to discard objects that are too small to see when zoomed out.
minX
: the minimum size in the X direction.
This is a numerical TLcdOGCLiteral
representing model units of the target model, for example meters.
For geodetic references, the unit is degrees.minY
: the minimum size in the Y direction.
This is a numerical TLcdOGCLiteral
representing model units of the target model, for example meters.
For geodetic references, the unit is degrees.Boolean
: true
if the object is larger than either of the given sizes, false
if it is smaller.
If the result can't be calculated, it also evaluates to true
.
OGC filter
using the factory
:
new TLcdOGCFilter(function(MIN_BOUNDS_SIZE_FUNCTION_NAME, literal(150), literal(150)));
Or, using TLcdOGCFilterFactory.minBoundsSize(double, double)
:
new TLcdOGCFilter(minBoundsSize(150, 150));
public static final String GEOMETRY_TYPE_FUNCTION_NAME
Point
, MultiPoint
, LineString
, LinearRing
, MultiLineString
, Polygon
, MultiPolygon
, MultiLinearRing
, GeometryCollection
).
You can use this for example in SLD to define a rule per geometry type.
geometry
: TLcdOGCPropertyName
representing a geometryString
representing the geometry type, or null
when the geometry type could not be determined.
Possible string return values are Point
, MultiPoint
, LineString
, LinearRing
, MultiLineString
,
Polygon
, MultiPolygon
, MultiLinearRing
, GeometryCollection
.
TLcdOGCFilter filter =
new TLcdOGCFilter(eq(function(GEOMETRY_TYPE_FUNCTION_NAME, property("Geometry")), literal("Point")
));
public static final String START_ANGLE_FUNCTION_NAME
geometry
: TLcdOGCPropertyName
representing a geometry of type ILcdCurve
Double
representing the angle in degrees clockwise from the direction at 12 o'clock,
or null
when the geometry type could not be determined.
TLcdOGCFilter filter =
new TLcdOGCFilter(between(function(START_ANGLE_FUNCTION_NAME, property("Geometry")), literal(0), literal(180.0)
));
public static final String END_ANGLE_FUNCTION_NAME
geometry
: TLcdOGCPropertyName
representing a geometry of type ILcdCurve
Double
representing the angle in degrees clockwise from the direction at 12 o'clock,
or null
when the geometry type could not be determined.
TLcdOGCFilter filter =
new TLcdOGCFilter(between(function(END_ANGLE_FUNCTION_NAME, property("Geometry")), literal(0), literal(180.0)
));
public static final String START_POINT_FUNCTION_NAME
geometry
: TLcdOGCPropertyName
representing a geometry of type ILcdCurve
ILcdPoint
representing the start point,
or null
when the geometry type could not be determined.
TLcdOGCFilter filter =
new TLcdOGCFilter(eq(function(START_POINT_FUNCTION_NAME, property("Geometry")), function(END_POINT_FUNCTION_NAME, property("Geometry"))
));
public static final String END_POINT_FUNCTION_NAME
geometry
: TLcdOGCPropertyName
representing a geometry of type ILcdCurve
ILcdPoint
representing the end point,
or null
when the geometry type could not be determined.
START_POINT_FUNCTION_NAME
.public static final String INTERIOR_POINT_FUNCTION_NAME
geometry
: TLcdOGCPropertyName
representing a geometry of type ILcdCurve
ILcdPoint
representing a point that is interior to the geometry in case of a polygon, or sitting on its
boundary otherwise. If the geometry type could not be determined, null
is returned.public static final String VERTICES_FUNCTION_NAME
geometry
: TLcdOGCPropertyName
representing a geometry of type ILcdCurve
ILcdPoint
instances representing the points of a geometry.
If the geometry type could not be determined, null
is returned.public static final String RECODE_FUNCTION_NAME
property
: a TLcdOGCPropertyName
representing the property for which the values need to be transformedinputValue1
: the first input value to which the property will be comparedoutputValue1
: the output value if the property matches the first input valuevx
: the x-th input / output value to which the property will be compared.Object
representing the new value for the property, or null
when a new value could not be determined.
TLcdOGCFunction function = function(RECODE_FUNCTION_NAME, property("STATE_NAME"), literal("Washington"), literal("#6495ED"), literal("New York"), literal("#B0C4DE"));
public static final String STRING_LENGTH_FUNCTION_NAME
inputString
: TLcdOGCPropertyName
representing a String
propertyInteger
, or 0
when the input string is null
.
new TLcdOGCFilter(eq(function(STRING_LENGTH_FUNCTION_NAME, property("roadType")), literal(5)));
public static final String STRING_SUBSTRING_FUNCTION_NAME
endIndex-1
.
The indices are zero-based.
inputString
: TLcdOGCPropertyName
representing a String
propertybegin
: an integer representing the begin index (typically an TLcdOGCLiteral
)end
: an integer representing the end index (typically an TLcdOGCLiteral
)null
when the indices or the input string are null
.
The function will also return null
when the indices are outside the valid range for the input string.
new TLcdOGCFilter(eq(function(STRING_SUBSTRING_FUNCTION_NAME, property("name"), literal(0), literal(2)), literal("foo")));
public static final String STRING_SUBSTRING_START_FUNCTION_NAME
inputString
: TLcdOGCPropertyName
representing a String
propertybegin
: an integer representing the begin index (typically an TLcdOGCLiteral
)null
when the index or the input string are null
.
The function will also return null
when the index is outside the valid range for the input string.
new TLcdOGCFilter(eq(function(STRING_SUBSTRING_START_FUNCTION_NAME, property("name"), literal(2)), literal("foo")));
public static final String STRING_TO_LOWER_CASE_FUNCTION_NAME
inputString
: TLcdOGCPropertyName
representing a String
propertynull
when the input string is null
.
new TLcdOGCFilter(eq(function(STRING_TO_LOWER_CASE_FUNCTION_NAME, property("name")), literal("lucy")));
public static final String STRING_TO_UPPER_CASE_FUNCTION_NAME
inputString
: TLcdOGCPropertyName
representing a String
propertynull
when the input string is null
.
new TLcdOGCFilter(eq(function(STRING_TO_LOWER_CASE_FUNCTION_NAME, property("name")), literal("LUCY")));
public static final String STRING_TRIM_FUNCTION_NAME
inputString
: TLcdOGCPropertyName
representing a String
propertynull
when the input string is null
.
new TLcdOGCFilter(eq(function(STRING_TRIM_FUNCTION_NAME, property("name")), literal("Lucy")));
public static final String STRING_REPLACE_FUNCTION_NAME
inputString
: TLcdOGCPropertyName
representing a String
propertypattern
: a string representing the pattern to be replaced (typically an TLcdOGCLiteral
)replacement
: a string representing the pattern's replacement (typically an TLcdOGCLiteral
)global
: a boolean indicating whether all occurrences need to be replaced (true) or only the first (false) (typically an TLcdOGCLiteral
)null
when the input string is null
.public static final String IN_2_FUNCTION_NAME
candidate
: an object which will be compared against the valuesv1
: the first value object to which the candidate will be comparedv2
: the second value object to which the candidate will be comparedvx
: the x-th value object to which the candidate will be compared.
new TLcdOGCFilter(
eq(function(IN_3_FUNCTION_NAME, property("type"), literal("primary"), literal("secondary"), literal("trunk")),
literal(true)
)
);
public static final String IN_3_FUNCTION_NAME
The in_x function checks whether a candidate equals to at least one of a number of values. The number in the function name indicates how many possible values the function expects.
See the documentation ofIN_2_FUNCTION_NAME
for more details.IN_2_FUNCTION_NAME
,
Constant Field Valuespublic static final String IN_4_FUNCTION_NAME
The in_x function checks whether a candidate equals to at least one of a number of values. The number in the function name indicates how many possible values the function expects.
See the documentation ofIN_2_FUNCTION_NAME
for more details.IN_2_FUNCTION_NAME
,
Constant Field Valuespublic static final String IN_5_FUNCTION_NAME
The in_x function checks whether a candidate equals to at least one of a number of values. The number in the function name indicates how many possible values the function expects.
See the documentation ofIN_2_FUNCTION_NAME
for more details.IN_2_FUNCTION_NAME
,
Constant Field Valuespublic static final String IN_6_FUNCTION_NAME
The in_x function checks whether a candidate equals to at least one of a number of values. The number in the function name indicates how many possible values the function expects.
See the documentation ofIN_2_FUNCTION_NAME
for more details.IN_2_FUNCTION_NAME
,
Constant Field Valuespublic static final String IN_7_FUNCTION_NAME
The in_x function checks whether a candidate equals to at least one of a number of values. The number in the function name indicates how many possible values the function expects.
See the documentation ofIN_2_FUNCTION_NAME
for more details.IN_2_FUNCTION_NAME
,
Constant Field Valuespublic static final String IN_8_FUNCTION_NAME
The in_x function checks whether a candidate equals to at least one of a number of values. The number in the function name indicates how many possible values the function expects.
See the documentation ofIN_2_FUNCTION_NAME
for more details.IN_2_FUNCTION_NAME
,
Constant Field Valuespublic static final String IN_9_FUNCTION_NAME
The in_x function checks whether a candidate equals to at least one of a number of values. The number in the function name indicates how many possible values the function expects.
See the documentation ofIN_2_FUNCTION_NAME
for more details.IN_2_FUNCTION_NAME
,
Constant Field Valuespublic static final String IN_10_FUNCTION_NAME
The in_x function checks whether a candidate equals to at least one of a number of values. The number in the function name indicates how many possible values the function expects.
See the documentation ofIN_2_FUNCTION_NAME
for more details.IN_2_FUNCTION_NAME
,
Constant Field Valuespublic static final String DATE_FORMAT_FUNCTION_NAME
format
: TLcdOGCLiteral
representing the date format according to the SimpleDateFormat
syntaxdate
: TLcdOGCPropertyName
representing a date propertyString
, or null
when the date property is null
.public static final String DATE_PARSE_FUNCTION_NAME
String
property to a Date
.
format
: TLcdOGCLiteral
representing the date format according to the SimpleDateFormat
syntax;
if this argument is not provided, TLcdISO8601DateFormat is used as fallback
dateString
: TLcdOGCPropertyName
representing a date property encoded as a String
Date
, or null
when the dateString property is null
.