Class TLcdOGCVendorSpecificFunctions
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.
Geometric functions
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. |
Comparison functions
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. |
String functions
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. |
Parsing and formatting functions
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. |
Transformation functions
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.
|
- Since:
- 2017.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The dateFormat function formats a date property according to the provided format.static final String
The dateParse function parses a date from aString
property to aDate
.static final String
The "endAngle" function returns the end angle of a geometry.static final String
The "endPoint" function returns the end point of a geometry.static final String
The "geometryType" function returns the geometry type of an object as a String (Point
,MultiPoint
,LineString
,LinearRing
,MultiLineString
,Polygon
,MultiPolygon
,MultiLinearRing
,GeometryCollection
).static final String
The in_x function checks whether a candidate equals to at least one of a number of values.static final String
The in_x function checks whether a candidate equals to at least one of a number of values.static final String
The in_x function checks whether a candidate equals to at least one of a number of values.static final String
The in_x function checks whether a candidate equals to at least one of a number of values.static final String
The in_x function checks whether a candidate equals to at least one of a number of values.static final String
The in_x function checks whether a candidate equals to at least one of a number of values.static final String
The in_x function checks whether a candidate equals to at least one of a number of values.static final String
The in_x function checks whether a candidate equals to at least one of a number of values.static final String
The in_x function checks whether a candidate equals to at least one of a number of values.static final String
The "interiorPoint" function returns a point that is interior to the geometry in case of a polygon, or sitting on its boundary otherwise.static final String
The "minBoundsSize" function evaluates a minimum size filter on geometries, excluding point geometries.static final String
The "Recode" function transforms a set of discrete property values into another set of values.static final String
The "startAngle" function returns the start angle of a geometry.static final String
The "startPoint" function returns the start point of a geometry.static final String
The string length function returns the length of the input string.static final String
The string replace function returns the string with the pattern replaced with the given replacement text.static final String
The substring function returns a substring of an input string.static final String
The substring start function returns a substring of an input string.static final String
The to lower case function returns a lower case version of an input string.static final String
The to upper case function returns a upper case version of an input string.static final String
The string trim function returns a version of an input string with leading and trailing spaces removed.static final String
The "vertices" function returns all points of a geometry. -
Method Summary
-
Field Details
-
MIN_BOUNDS_SIZE_FUNCTION_NAME
The "minBoundsSize" function evaluates a minimum size filter on geometries, excluding point geometries. The minimum size is checked against the bounds of the"main"
geometry. You can use this for example to discard objects that are too small to see when zoomed out.Arguments
minX
: the minimum size in the X direction. This is a numericalTLcdOGCLiteral
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 numericalTLcdOGCLiteral
representing model units of the target model, for example meters. For geodetic references, the unit is degrees.
Return value
ABoolean
: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 totrue
.Example
Example of how to use this in anOGC filter
using thefactory
:
Or, usingnew TLcdOGCFilter(function(MIN_BOUNDS_SIZE_FUNCTION_NAME, literal(150), literal(150)));
TLcdOGCFilterFactory.minBoundsSize(double, double)
:new TLcdOGCFilter(minBoundsSize(150, 150));
- See Also:
-
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
). You can use this for example in SLD to define a rule per geometry type.Arguments
geometry
:TLcdOGCPropertyName
representing a geometry
Return value
AString
representing the geometry type, ornull
when the geometry type could not be determined. Possible string return values arePoint
,MultiPoint
,LineString
,LinearRing
,MultiLineString
,Polygon
,MultiPolygon
,MultiLinearRing
,GeometryCollection
.Example
Example which retrieves all points:TLcdOGCFilter filter = new TLcdOGCFilter(eq(function(GEOMETRY_TYPE_FUNCTION_NAME, property("Geometry")), literal("Point") ));
- See Also:
-
START_ANGLE_FUNCTION_NAME
The "startAngle" function returns the start angle of a geometry.Arguments
geometry
:TLcdOGCPropertyName
representing a geometry of typeILcdCurve
Return value
ADouble
representing the angle in degrees clockwise from the direction at 12 o'clock, ornull
when the geometry type could not be determined.Example
Example which retrieves all geometries with a start angle between 0 and 180 degrees:TLcdOGCFilter filter = new TLcdOGCFilter(between(function(START_ANGLE_FUNCTION_NAME, property("Geometry")), literal(0), literal(180.0) ));
- Since:
- 2019.1.01
- See Also:
-
END_ANGLE_FUNCTION_NAME
The "endAngle" function returns the end angle of a geometry.Arguments
geometry
:TLcdOGCPropertyName
representing a geometry of typeILcdCurve
Return value
ADouble
representing the angle in degrees clockwise from the direction at 12 o'clock, ornull
when the geometry type could not be determined.Example
Example which retrieves all geometries with an end angle between 0 and 180 degrees:TLcdOGCFilter filter = new TLcdOGCFilter(between(function(END_ANGLE_FUNCTION_NAME, property("Geometry")), literal(0), literal(180.0) ));
- Since:
- 2019.1.01
- See Also:
-
START_POINT_FUNCTION_NAME
The "startPoint" function returns the start point of a geometry.Arguments
geometry
:TLcdOGCPropertyName
representing a geometry of typeILcdCurve
Return value
AnILcdPoint
representing the start point, ornull
when the geometry type could not be determined.Example
Example which retrieves all geometries with an equal start and end point:TLcdOGCFilter filter = new TLcdOGCFilter(eq(function(START_POINT_FUNCTION_NAME, property("Geometry")), function(END_POINT_FUNCTION_NAME, property("Geometry")) ));
- Since:
- 2019.1.01
- See Also:
-
END_POINT_FUNCTION_NAME
The "endPoint" function returns the end point of a geometry.Arguments
geometry
:TLcdOGCPropertyName
representing a geometry of typeILcdCurve
Return value
AnILcdPoint
representing the end point, ornull
when the geometry type could not be determined.Example
SeeSTART_POINT_FUNCTION_NAME
.- Since:
- 2019.1.01
- See Also:
-
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.Arguments
geometry
:TLcdOGCPropertyName
representing a geometry of typeILcdCurve
Return value
AnILcdPoint
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.- Since:
- 2022.0
- See Also:
-
VERTICES_FUNCTION_NAME
The "vertices" function returns all points of a geometry.Arguments
geometry
:TLcdOGCPropertyName
representing a geometry of typeILcdCurve
Return value
An array ofILcdPoint
instances representing the points of a geometry. If the geometry type could not be determined,null
is returned.- Since:
- 2022.0
- See Also:
-
RECODE_FUNCTION_NAME
The "Recode" function transforms a set of discrete property values into another set of values.Arguments
property
: aTLcdOGCPropertyName
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 value- ...
vx
: the x-th input / output value to which the property will be compared.
Return value
AnObject
representing the new value for the property, ornull
when a new value could not be determined.Example
This function is primarily used within OGC SLD / SE to compute styling parameters from property values in a concise way. An example use case is the computation of a color based on a property value. The following example illustrating this for a US states dataset, by defining a different fill color for each state:TLcdOGCFunction function = function(RECODE_FUNCTION_NAME, property("STATE_NAME"), literal("Washington"), literal("#6495ED"), literal("New York"), literal("#B0C4DE"));
- Since:
- 2021.0
- See Also:
-
STRING_LENGTH_FUNCTION_NAME
The string length function returns the length of the input string.Arguments
inputString
:TLcdOGCPropertyName
representing aString
property
Return value
The length of the string as anInteger
, or0
when the input string isnull
.Example
Example which selects objects where a certain string property has length 5:new TLcdOGCFilter(eq(function(STRING_LENGTH_FUNCTION_NAME, property("roadType")), literal(5)));
- See Also:
-
STRING_SUBSTRING_FUNCTION_NAME
The substring function returns a substring of an input string. The range of the substring is defined by the specified start and end indices: the substring begins at the specified begin index, and extends to the character at indexendIndex-1
. The indices are zero-based.Arguments
inputString
:TLcdOGCPropertyName
representing aString
propertybegin
: an integer representing the begin index (typically anTLcdOGCLiteral
)end
: an integer representing the end index (typically anTLcdOGCLiteral
)
Return value
The substring, ornull
when the indices or the input string arenull
. The function will also returnnull
when the indices are outside the valid range for the input string.Example
Example which selects the first 3 characters of a string and compares it with a hardcoded value "foo":new TLcdOGCFilter(eq(function(STRING_SUBSTRING_FUNCTION_NAME, property("name"), literal(0), literal(2)), literal("foo")));
- See Also:
-
STRING_SUBSTRING_START_FUNCTION_NAME
The substring start function returns a substring of an input string. The range of the substring is defined by the specified start index: the substring begins at the specified begin index, and extends to the last character of the string. The indices are zero-based.Arguments
inputString
:TLcdOGCPropertyName
representing aString
propertybegin
: an integer representing the begin index (typically anTLcdOGCLiteral
)
Return value
The substring, ornull
when the index or the input string arenull
. The function will also returnnull
when the index is outside the valid range for the input string.Example
Example which selects a substring from index 2 until the end, and compares it with a hardcoded value "foo":new TLcdOGCFilter(eq(function(STRING_SUBSTRING_START_FUNCTION_NAME, property("name"), literal(2)), literal("foo")));
- See Also:
-
STRING_TO_LOWER_CASE_FUNCTION_NAME
The to lower case function returns a lower case version of an input string.Arguments
inputString
:TLcdOGCPropertyName
representing aString
property
Return value
A string which is the lower case version of the input string, ornull
when the input string isnull
.Example
Example which compares a property with a hard-coded lower case stringnew TLcdOGCFilter(eq(function(STRING_TO_LOWER_CASE_FUNCTION_NAME, property("name")), literal("lucy")));
- See Also:
-
STRING_TO_UPPER_CASE_FUNCTION_NAME
The to upper case function returns a upper case version of an input string.Arguments
inputString
:TLcdOGCPropertyName
representing aString
property
Return value
A string which is the upper case version of the input string, ornull
when the input string isnull
.Example
Example which compares a property with a hard-coded upper case stringnew TLcdOGCFilter(eq(function(STRING_TO_LOWER_CASE_FUNCTION_NAME, property("name")), literal("LUCY")));
- See Also:
-
STRING_TRIM_FUNCTION_NAME
The string trim function returns a version of an input string with leading and trailing spaces removed.Arguments
inputString
:TLcdOGCPropertyName
representing aString
property
Return value
A string that is the trimmed version of the input string, ornull
when the input string isnull
.Example
Example which compares a property with a string without spacesnew TLcdOGCFilter(eq(function(STRING_TRIM_FUNCTION_NAME, property("name")), literal("Lucy")));
- Since:
- 2021.0
- See Also:
-
STRING_REPLACE_FUNCTION_NAME
The string replace function returns the string with the pattern replaced with the given replacement text.Arguments
inputString
:TLcdOGCPropertyName
representing aString
propertypattern
: a string representing the pattern to be replaced (typically anTLcdOGCLiteral
)replacement
: a string representing the pattern's replacement (typically anTLcdOGCLiteral
)global
: a boolean indicating whether all occurrences need to be replaced (true) or only the first (false) (typically anTLcdOGCLiteral
)
Return value
The input string with the pattern replaced with the given replacement text ornull
when the input string isnull
.- Since:
- 2023.0
- See Also:
-
IN_2_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.Arguments
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 compared- ...
vx
: the x-th value object to which the candidate will be compared.
Return value
A Boolean indicating whether the candidate object matches "primary", "secondary" or "trunk".Example
Example which compares whether a road type matches any of the types from a predefined set:new TLcdOGCFilter( eq(function(IN_3_FUNCTION_NAME, property("type"), literal("primary"), literal("secondary"), literal("trunk")), literal(true) ) );
- Since:
- 2018.0
- See Also:
-
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.- Since:
- 2018.0
- See Also:
-
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.- Since:
- 2018.0
- See Also:
-
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.- Since:
- 2018.0
- See Also:
-
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.- Since:
- 2018.0
- See Also:
-
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.- Since:
- 2018.0
- See Also:
-
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.- Since:
- 2018.0
- See Also:
-
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.- Since:
- 2018.0
- See Also:
-
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.- Since:
- 2018.0
- See Also:
-
DATE_FORMAT_FUNCTION_NAME
The dateFormat function formats a date property according to the provided format.Arguments
format
:TLcdOGCLiteral
representing the date format according to theSimpleDateFormat
syntaxdate
:TLcdOGCPropertyName
representing a date property
Return value
The formatted date as aString
, ornull
when the date property isnull
.- Since:
- 2022.1
- See Also:
-
DATE_PARSE_FUNCTION_NAME
The dateParse function parses a date from aString
property to aDate
.Arguments
format
:TLcdOGCLiteral
representing the date format according to theSimpleDateFormat
syntax; if this argument is not provided,TLcdISO8601DateFormat is used as fallback
dateString
:TLcdOGCPropertyName
representing a date property encoded as aString
Return value
The parsed date as aDate
, ornull
when the dateString property isnull
.- Since:
- 2022.1
- See Also:
-