SpatialQueryDescriptor Class Reference
Describes a spatial selection. More...
#include "SpatialQueryDescriptor.hpp"
Inheritance diagram for SpatialQueryDescriptor:Classes | |
| struct | KNNDim |
| Dimensionality of nearest neighbor selection. More... | |
| struct | KNNSelection |
| k-Nearest neighbor mode More... | |
| struct | RegionType |
| Types supported by region queries. More... | |
| struct | SortOrder |
| Sort order of results. More... | |
Public Types | |
| typedef bool(SpatialQueryDescriptor::* | unspecified_bool_type )() const |
Public Member Functions | |
| SpatialQueryDescriptor (const String &definition=String()) | |
| Construct from the given string that must adhere to the syntax, if not empty. | |
| operator unspecified_bool_type () const | |
| bool | isEmpty () const |
kNN query | |
| bool | isKNNQuery () const |
| unsigned | getKNNCount () const |
| KNNDim::Type | getKNNDim () const |
| KNNSelection::Type | getKNNSelection () const |
| void | setKNN (unsigned k, KNNDim::Type knnDim, KNNSelection::Type knnSelection=KNNSelection::ordinary) |
| void | resetKNN () |
region query | |
}@ | |
| bool | isRegionQuery () const |
| RegionType::Type | getRegionType () const |
| const Vector< double > & | getRegionCoords () const |
| void | setRegion (RegionType::Type type, const Vector< double > &coords) |
| void | resetRegion () |
| DM::IGeometry * | createRegion () const |
| create geometry from regionType and regionCoords | |
| void | setRegion (const DM::IGeometry &geometry) |
| set regionType and regionCoords from geometry | |
sort order | |
}@ | |
| SortOrder::Type | getSortOrder () const |
| void | setSortOrder (SortOrder::Type type) |
CustomOptionType interface | |
| static const char * | help () |
| static const char * | syntax () |
| static bool | exportsPythonType () |
Additional Inherited Members | |
Static Public Member Functions inherited from CustomOptionType< SpatialQueryDescriptor > | |
| static const char * | _help () |
| get general help on this type | |
| static const char * | _syntax () |
| get the syntax used for parsing this type | |
| static bool | _exportsPythonType () |
| returns true if this type is exposed to Python as a custom type, false otherwise (if it is represented as Python-string) | |
Protected Member Functions inherited from CustomOptionType< SpatialQueryDescriptor > | |
| ~CustomOptionType () | |
| protected, must be derived from | |
Detailed Description
Describes a spatial selection.
OPALS supports two types of spatial queries:
- k nearest neighbour queries (kNN) and
- region queries based on 2D or 3D geometry objects (see RegionType::Type). SpatialQueryDescriptor describes one of those query types, or a combination thereof, which returns up to k objects that are inside the given region. kNN queries return the results ordered in ascending distance from the queried position, where distance is defined according to the kNN-Dimension (2d or 3d). Region queries return objects in unspecified order. A certain order of results for kNN, region, and combined queries can be forced via SortOrder::Type.
Syntax for constructor represented as railroad diagrams:
Syntax for constructor in EBNF:
SpatialQuery ::=
( GeometryQuery ( NnQuery )?
| NnQuery ( GeometryQuery )?
)
( ( "ORDER" "=" )? ( "UNSORTED" | "ASC2D" | "ASC3D" ) )?
RegionQuery ::=
RegionQuery2D
| RegionQuery3D
RegionQuery2D ::=
"WINDOW" "(" Length Width? ")"
| "CIRCLE" "(" Radius ")"
RegionQuery3D ::=
"CYLINDER" "(" Radius ( Height | MinMax ) ")"
| "BOX" "(" Length Width? ( Height | MinMax )? ")"
| "SPHERE" "(" Radius ")"
NnQuery ::=
NnQuery2D
| NnQuery3D
NnQuery2D ::=
"NN2D" "(" Count ( ( "MODE" "=" )? ( "ORDINARY" | "QUADRANT" ) )? ")"
NnQuery3D ::=
Length ::= ( "LENGTH" "=" )? Real
Width ::= ( "WIDTH" "=" )? Real
Height ::= ( "HEIGHT" "=" )? Real
Radius ::= ( "RADIUS" "=" )? Real
MinMax ::= ( "MIN" "=" )? Real ( "MAX" "=" )? Real
- Date
- 24.05.2013
