Class TLcdOGCVendorSpecificFunctions
This class contains the documentation of all the custom, vendor-specific TLcdOGCFunctions 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 TLcdOGCLiteralminY: 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
FieldsModifier and TypeFieldDescriptionstatic final StringThe dateFormat function formats a date property according to the provided format.static final StringThe dateParse function parses a date from aStringproperty to aDate.static final StringThe "endAngle" function returns the end angle of a geometry.static final StringThe "endPoint" function returns the end point of a geometry.static final StringThe "geometryType" function returns the geometry type of an object as a String (Point,MultiPoint,LineString,LinearRing,MultiLineString,Polygon,MultiPolygon,MultiLinearRing,GeometryCollection).static final StringThe in_x function checks whether a candidate equals to at least one of a number of values.static final StringThe in_x function checks whether a candidate equals to at least one of a number of values.static final StringThe in_x function checks whether a candidate equals to at least one of a number of values.static final StringThe in_x function checks whether a candidate equals to at least one of a number of values.static final StringThe in_x function checks whether a candidate equals to at least one of a number of values.static final StringThe in_x function checks whether a candidate equals to at least one of a number of values.static final StringThe in_x function checks whether a candidate equals to at least one of a number of values.static final StringThe in_x function checks whether a candidate equals to at least one of a number of values.static final StringThe in_x function checks whether a candidate equals to at least one of a number of values.static final StringThe "interiorPoint" function returns a point that is interior to the geometry in case of a polygon, or sitting on its boundary otherwise.static final StringThe "minBoundsSize" function evaluates a minimum size filter on geometries, excluding point geometries.static final StringThe "Recode" function transforms a set of discrete property values into another set of values.static final StringThe "startAngle" function returns the start angle of a geometry.static final StringThe "startPoint" function returns the start point of a geometry.static final StringThe string length function returns the length of the input string.static final StringThe string replace function returns the string with the pattern replaced with the given replacement text.static final StringThe substring function returns a substring of an input string.static final StringThe substring start function returns a substring of an input string.static final StringThe to lower case function returns a lower case version of an input string.static final StringThe to upper case function returns a upper case version of an input string.static final StringThe string trim function returns a version of an input string with leading and trailing spaces removed.static final StringThe "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 numericalTLcdOGCLiteralrepresenting 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 numericalTLcdOGCLiteralrepresenting model units of the target model, for example meters. For geodetic references, the unit is degrees.
Return value
ABoolean:trueif the object is larger than either of the given sizes,falseif it is smaller. If the result can't be calculated, it also evaluates totrue.Example
Example of how to use this in anOGC filterusing 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:TLcdOGCPropertyNamerepresenting a geometry
Return value
AStringrepresenting the geometry type, ornullwhen 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:TLcdOGCPropertyNamerepresenting a geometry of typeILcdCurve
Return value
ADoublerepresenting the angle in degrees clockwise from the direction at 12 o'clock, ornullwhen 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:TLcdOGCPropertyNamerepresenting a geometry of typeILcdCurve
Return value
ADoublerepresenting the angle in degrees clockwise from the direction at 12 o'clock, ornullwhen 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:TLcdOGCPropertyNamerepresenting a geometry of typeILcdCurve
Return value
AnILcdPointrepresenting the start point, ornullwhen 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:TLcdOGCPropertyNamerepresenting a geometry of typeILcdCurve
Return value
AnILcdPointrepresenting the end point, ornullwhen 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:TLcdOGCPropertyNamerepresenting a geometry of typeILcdCurve
Return value
AnILcdPointrepresenting 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,nullis returned.- Since:
- 2022.0
- See Also:
-
VERTICES_FUNCTION_NAME
The "vertices" function returns all points of a geometry.Arguments
geometry:TLcdOGCPropertyNamerepresenting a geometry of typeILcdCurve
Return value
An array ofILcdPointinstances representing the points of a geometry. If the geometry type could not be determined,nullis 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: aTLcdOGCPropertyNamerepresenting 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
AnObjectrepresenting the new value for the property, ornullwhen 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:TLcdOGCPropertyNamerepresenting aStringproperty
Return value
The length of the string as anInteger, or0when 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:TLcdOGCPropertyNamerepresenting aStringpropertybegin: an integer representing the begin index (typically anTLcdOGCLiteral)end: an integer representing the end index (typically anTLcdOGCLiteral)
Return value
The substring, ornullwhen the indices or the input string arenull. The function will also returnnullwhen 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:TLcdOGCPropertyNamerepresenting aStringpropertybegin: an integer representing the begin index (typically anTLcdOGCLiteral)
Return value
The substring, ornullwhen the index or the input string arenull. The function will also returnnullwhen 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:TLcdOGCPropertyNamerepresenting aStringproperty
Return value
A string which is the lower case version of the input string, ornullwhen 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:TLcdOGCPropertyNamerepresenting aStringproperty
Return value
A string which is the upper case version of the input string, ornullwhen 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:TLcdOGCPropertyNamerepresenting aStringproperty
Return value
A string that is the trimmed version of the input string, ornullwhen 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:TLcdOGCPropertyNamerepresenting aStringpropertypattern: 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 ornullwhen 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_NAMEfor 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_NAMEfor 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_NAMEfor 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_NAMEfor 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_NAMEfor 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_NAMEfor 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_NAMEfor 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_NAMEfor 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:TLcdOGCLiteralrepresenting the date format according to theSimpleDateFormatsyntaxdate:TLcdOGCPropertyNamerepresenting a date property
Return value
The formatted date as aString, ornullwhen the date property isnull.- Since:
- 2022.1
- See Also:
-
DATE_PARSE_FUNCTION_NAME
The dateParse function parses a date from aStringproperty to aDate.Arguments
format:TLcdOGCLiteralrepresenting the date format according to theSimpleDateFormatsyntax; if this argument is not provided,TLcdISO8601DateFormat is used as fallbackdateString:TLcdOGCPropertyNamerepresenting a date property encoded as aString
Return value
The parsed date as aDate, ornullwhen the dateString property isnull.- Since:
- 2022.1
- See Also:
-