Codota Logo
SpatialOperator
Code IndexAdd Codota to your IDE (free)

How to use
SpatialOperator
in
org.deegree.filter.spatial

Best Java code snippets using org.deegree.filter.spatial.SpatialOperator (Showing top 10 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: deegree/deegree3

private static void export( SpatialOperator operator, XMLStreamWriter writer )
            throws XMLStreamException, UnknownCRSException, TransformationException {
  QName elementName = spatialOperatorTypeToElementName.get( operator.getSubType() );
  if ( elementName == null )
    throw new IllegalArgumentException( "Encoding of spatial operator subtype " + operator.getSubType()
                      + " is not supported yet!" );
  writer.writeStartElement( elementName.getNamespaceURI(), elementName.getLocalPart() );
  switch ( operator.getSubType() ) {
  case BBOX:
    geometry = ( (BBOX) operator ).getBoundingBox();
    break;
  default:
    throw new IllegalArgumentException( "Encoding of spatial operator subtype " + operator.getSubType()
                      + " is not supported yet!" );
  export( operator.getParam1(), writer );
  exportGeometry( geometry, gmlWriter );
  exportDistance( distance, writer );
origin: deegree/deegree3

private static void addGeometries( Operator operator, List<Geometry> geometries ) {
  Operator.Type type = operator.getType();
  switch ( type ) {
  case LOGICAL:
    LogicalOperator logicalOper = (LogicalOperator) operator;
    for ( Operator param : logicalOper.getParams() ) {
      addGeometries( param, geometries );
    }
    break;
  case SPATIAL:
    SpatialOperator spatialOper = (SpatialOperator) operator;
    for ( Object param : spatialOper.getParams() ) {
      if ( param instanceof Geometry ) {
        geometries.add( (Geometry) param );
      }
    }
    break;
  case COMPARISON:
    // nothing to do
    break;
  }
}
origin: deegree/deegree3

  GenericXMLElement xml = (GenericXMLElement) value;
  if ( xml.getChildren().isEmpty() ) {
    String msg = Messages.getMessage( "FILTER_EVALUATION_NOT_GEOMETRY", getType().name(), value );
    throw new FilterEvaluationException( msg );
    return (Geometry) maybeGeom;
  String msg = Messages.getMessage( "FILTER_EVALUATION_NOT_GEOMETRY", getType().name(), value );
  throw new FilterEvaluationException( msg );
} else {
  String msg = Messages.getMessage( "FILTER_EVALUATION_NOT_GEOMETRY", getType().name(), value );
  throw new FilterEvaluationException( msg );
origin: deegree/deegree3

SQLExpression propNameExpr = toProtoSQLSpatial( op.getPropName() );
if ( !propNameExpr.isSpatial() ) {
  String msg = "Cannot evaluate spatial operator on database. Targeted property name '" + op.getPropName()
         + "' does not denote a spatial column.";
  throw new FilterEvaluationException( msg );
int srid = propNameExpr.getSRID() != null ? Integer.parseInt( propNameExpr.getSRID() ) : 0;
switch ( op.getSubType() ) {
case BBOX: {
  BBOX bbox = (BBOX) op;
origin: deegree/deegree3

          throws XMLStreamException, UnknownCRSException, TransformationException {
QName elementName = spatialOperatorTypeToElementName.get( operator.getSubType() );
writer.writeStartElement( elementName.getNamespaceURI(), elementName.getLocalPart() );
Measure distance = null;
switch ( operator.getSubType() ) {
origin: deegree/deegree3

private static SpatialOperator repair( SpatialOperator o, Map<String, QName> bindings, Set<QName> validNames ) {
  Object[] os = o.getParams();
  for ( int i = 0; i < os.length; ++i ) {
    if ( os[i] instanceof Expression ) {
  switch ( o.getSubType() ) {
  case BBOX:
    return new BBOX( (Expression) os[0], (Envelope) os[1] );
origin: deegree/deegree3

SQLExpression propNameExpr = toProtoSQLSpatial( op.getPropName() );
if ( !propNameExpr.isSpatial() ) {
  String msg = "Cannot evaluate spatial operator on database. Targeted property name '" + op.getPropName()
         + "' does not denote a spatial column.";
  throw new InvalidParameterValueException( msg );
int srid = propNameExpr.getSRID() != null ? Integer.parseInt( propNameExpr.getSRID() ) : -1;
switch ( op.getSubType() ) {
case BBOX: {
  BBOX bbox = (BBOX) op;
origin: deegree/deegree3

private static BBOX extractBBox( SpatialOperator oper ) {
  SubType type = oper.getSubType();
  switch ( type ) {
  case BBOX:
    return (BBOX) oper;
  case CONTAINS:
    // Oracle does not like zero-extent bboxes
    if ( !( ( (Contains) oper ).getGeometry() instanceof Point ) )
      return new BBOX( ( (Contains) oper ).getParam1(), ( (Contains) oper ).getGeometry().getEnvelope() );
    return null;
  case CROSSES:
    return new BBOX( ( (Crosses) oper ).getParam1(), ( (Crosses) oper ).getGeometry().getEnvelope() );
  case DWITHIN:
    // TOOD use enlarged bbox
    return null;
  case EQUALS:
    return new BBOX( ( (Equals) oper ).getParam1(), ( (Equals) oper ).getGeometry().getEnvelope() );
  case INTERSECTS:
    return new BBOX( ( (Intersects) oper ).getParam1(), ( (Intersects) oper ).getGeometry().getEnvelope() );
  case OVERLAPS:
    return new BBOX( ( (Overlaps) oper ).getParam1(), ( (Overlaps) oper ).getGeometry().getEnvelope() );
  case WITHIN:
    return new BBOX( ( (Within) oper ).getParam1(), ( (Within) oper ).getGeometry().getEnvelope() );
  default: {
    return null;
  }
  }
}
origin: deegree/deegree3

case SPATIAL:
  GeometryFactory gf = new GeometryFactory();
  switch ( ( (SpatialOperator) op ).getSubType() ) {
  case BBOX:
    BBOX bbox = (BBOX) op;
origin: deegree/deegree3

private static void addPropertyNames( Operator operator, List<ValueReference> propNames ) {
  Operator.Type type = operator.getType();
  switch ( type ) {
  case COMPARISON:
    ComparisonOperator compOper = (ComparisonOperator) operator;
    for ( Expression expr : compOper.getParams() ) {
      addPropertyNames( expr, propNames );
    }
    break;
  case LOGICAL:
    LogicalOperator logicalOper = (LogicalOperator) operator;
    for ( Operator param : logicalOper.getParams() ) {
      addPropertyNames( param, propNames );
    }
    break;
  case SPATIAL:
    SpatialOperator spatialOper = (SpatialOperator) operator;
    for ( Object param : spatialOper.getParams() ) {
      if ( param instanceof Expression ) {
        addPropertyNames( (Expression) param, propNames );
      }
    }
    break;
  }
}
org.deegree.filter.spatialSpatialOperator

Javadoc

Defines a topological predicate that can be evaluated on Geometry valued objects.

Most used methods

  • getSubType
    Returns the type of spatial operator. Use this to safely determine the subtype of SpatialOperator.
  • getPropName
    Returns the name of the spatial property to be considered.
  • getParam1
    Returns the first spatial parameter.
  • getParams
  • getType
    Always returns Operator.Type#SPATIAL (for SpatialOperator instances).

Popular in Java

  • Making http post requests using okhttp
  • getResourceAsStream (ClassLoader)
  • getSystemService (Context)
  • startActivity (Activity)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now