Rectangle.getCrossesDateLine
Code IndexAdd Codota to your IDE (free)

Best code snippets using org.locationtech.spatial4j.shape.Rectangle.getCrossesDateLine(Showing top 15 results out of 315)

  • Common ways to obtain Rectangle
private void myMethod () {
Rectangle r =
  • Shape shape;shape.getBoundingBox()
  • Smart code suggestions by Codota
}
origin: org.apache.solr/solr-core

/**
 * Constructs a query to retrieve documents that fully contain the input envelope.
 */
private Query makeWithin(Rectangle bbox) {
 BooleanQuery.Builder bq = new BooleanQuery.Builder();
 BooleanClause.Occur MUST = BooleanClause.Occur.MUST;
 if (bbox.getCrossesDateLine()) {
  //use null as performance trick since no data will be beyond the world bounds
  bq.add(rangeQuery(fieldNameX, null/*-180*/, bbox.getMaxX()), BooleanClause.Occur.SHOULD );
  bq.add(rangeQuery(fieldNameX, bbox.getMinX(), null/*+180*/), BooleanClause.Occur.SHOULD );
  bq.setMinimumNumberShouldMatch(1);//must match at least one of the SHOULD
 } else {
  bq.add(rangeQuery(fieldNameX, bbox.getMinX(), bbox.getMaxX()), MUST);
 }
 bq.add(rangeQuery(fieldNameY, bbox.getMinY(), bbox.getMaxY()), MUST);
 return bq.build();
}
origin: org.apache.lucene/lucene-spatial-extras

private Field[] createIndexableFields(Rectangle bbox) {
 Field[] fields = new Field[fieldsLen];
 int idx = -1;
 if (hasStored) {
  fields[++idx] = new StoredField(field_minX, bbox.getMinX());
  fields[++idx] = new StoredField(field_minY, bbox.getMinY());
  fields[++idx] = new StoredField(field_maxX, bbox.getMaxX());
  fields[++idx] = new StoredField(field_maxY, bbox.getMaxY());
 }
 if (hasDocVals) {
  fields[++idx] = new DoubleDocValuesField(field_minX, bbox.getMinX());
  fields[++idx] = new DoubleDocValuesField(field_minY, bbox.getMinY());
  fields[++idx] = new DoubleDocValuesField(field_maxX, bbox.getMaxX());
  fields[++idx] = new DoubleDocValuesField(field_maxY, bbox.getMaxY());
 }
 if (hasPointVals) {
  fields[++idx] = new DoublePoint(field_minX, bbox.getMinX());
  fields[++idx] = new DoublePoint(field_minY, bbox.getMinY());
  fields[++idx] = new DoublePoint(field_maxX, bbox.getMaxX());
  fields[++idx] = new DoublePoint(field_maxY, bbox.getMaxY());
 }
 if (xdlFieldType != null) {
  fields[++idx] = new Field(field_xdl, bbox.getCrossesDateLine()?"T":"F", xdlFieldType);
 }
 assert idx == fields.length - 1;
 return fields;
}
origin: org.locationtech.spatial4j/spatial4j

if (r.getCrossesDateLine()) {
 Collection<Geometry> pair = new ArrayList<>(2);
 pair.add(geometryFactory.toGeometry(new Envelope(
if (circle.getBoundingBox().getCrossesDateLine())
 throw new IllegalArgumentException("Doesn't support dateline cross yet: "+circle);//TODO
GeometricShapeFactory gsf = new GeometricShapeFactory(geometryFactory);
origin: locationtech/spatial4j

if (!enclosingBox.getCrossesDateLine() && !r.getCrossesDateLine()) {
 return super.relateRectanglePhase2(r, bboxSect);
origin: org.apache.lucene/lucene-spatial-extras

if (!bbox.getCrossesDateLine()) {
origin: org.apache.lucene/lucene-spatial-extras

/**
 * Constructs a query to retrieve documents that fully contain the input envelope.
 */
private Query makeWithin(Rectangle bbox) {
 BooleanQuery.Builder bq = new BooleanQuery.Builder();
 BooleanClause.Occur MUST = BooleanClause.Occur.MUST;
 if (bbox.getCrossesDateLine()) {
  //use null as performance trick since no data will be beyond the world bounds
  bq.add(rangeQuery(fieldNameX, null/*-180*/, bbox.getMaxX()), BooleanClause.Occur.SHOULD );
  bq.add(rangeQuery(fieldNameX, bbox.getMinX(), null/*+180*/), BooleanClause.Occur.SHOULD );
  bq.setMinimumNumberShouldMatch(1);//must match at least one of the SHOULD
 } else {
  bq.add(rangeQuery(fieldNameX, bbox.getMinX(), bbox.getMaxX()), MUST);
 }
 bq.add(rangeQuery(fieldNameY, bbox.getMinY(), bbox.getMaxY()), MUST);
 return bq.build();
}
origin: org.apache.solr/solr-core

if (!bbox.getCrossesDateLine()) {
origin: org.apache.solr/solr-core

fields[++idx] = new Field(field_xdl, bbox.getCrossesDateLine()?"T":"F", xdlFieldType);
origin: org.apache.solr/solr-core

if (!bbox.getCrossesDateLine()) {
origin: org.apache.solr/solr-core

/**
 * Constructs a query to retrieve documents that fully contain the input envelope.
 */
private Query makeWithin(Rectangle bbox) {
 BooleanQuery.Builder bq = new BooleanQuery.Builder();
 BooleanClause.Occur MUST = BooleanClause.Occur.MUST;
 if (bbox.getCrossesDateLine()) {
  //use null as performance trick since no data will be beyond the world bounds
  bq.add(rangeQuery(fieldNameX, null/*-180*/, bbox.getMaxX()), BooleanClause.Occur.SHOULD );
  bq.add(rangeQuery(fieldNameX, bbox.getMinX(), null/*+180*/), BooleanClause.Occur.SHOULD );
  bq.setMinimumNumberShouldMatch(1);//must match at least one of the SHOULD
 } else {
  bq.add(rangeQuery(fieldNameX, bbox.getMinX(), bbox.getMaxX()), MUST);
 }
 bq.add(rangeQuery(fieldNameY, bbox.getMinY(), bbox.getMaxY()), MUST);
 return bq.build();
}
origin: org.apache.lucene/lucene-spatial-extras

private Field[] createIndexableFields(Rectangle bbox) {
 Field[] fields = new Field[fieldsLen];
 int idx = -1;
 if (hasStored) {
  fields[++idx] = new StoredField(field_minX, bbox.getMinX());
  fields[++idx] = new StoredField(field_minY, bbox.getMinY());
  fields[++idx] = new StoredField(field_maxX, bbox.getMaxX());
  fields[++idx] = new StoredField(field_maxY, bbox.getMaxY());
 }
 if (hasDocVals) {
  fields[++idx] = new DoubleDocValuesField(field_minX, bbox.getMinX());
  fields[++idx] = new DoubleDocValuesField(field_minY, bbox.getMinY());
  fields[++idx] = new DoubleDocValuesField(field_maxX, bbox.getMaxX());
  fields[++idx] = new DoubleDocValuesField(field_maxY, bbox.getMaxY());
 }
 if (hasPointVals) {
  fields[++idx] = new DoublePoint(field_minX, bbox.getMinX());
  fields[++idx] = new DoublePoint(field_minY, bbox.getMinY());
  fields[++idx] = new DoublePoint(field_maxX, bbox.getMaxX());
  fields[++idx] = new DoublePoint(field_maxY, bbox.getMaxY());
 }
 if (xdlFieldType != null) {
  fields[++idx] = new Field(field_xdl, bbox.getCrossesDateLine()?"T":"F", xdlFieldType);
 }
 assert idx == fields.length - 1;
 return fields;
}
origin: org.apache.solr/solr-core

fields[++idx] = new Field(field_xdl, bbox.getCrossesDateLine()?"T":"F", xdlFieldType);
origin: locationtech/spatial4j

if (r.getCrossesDateLine()) {
 Collection<Geometry> pair = new ArrayList<>(2);
 pair.add(geometryFactory.toGeometry(new Envelope(
if (circle.getBoundingBox().getCrossesDateLine())
 throw new IllegalArgumentException("Doesn't support dateline cross yet: "+circle);//TODO
GeometricShapeFactory gsf = new GeometricShapeFactory(geometryFactory);
origin: org.locationtech.spatial4j/spatial4j

if (!enclosingBox.getCrossesDateLine() && !r.getCrossesDateLine()) {
 return super.relateRectanglePhase2(r, bboxSect);
origin: org.apache.solr/solr-core

if (!bbox.getCrossesDateLine()) {
org.locationtech.spatial4j.shapeRectanglegetCrossesDateLine

Javadoc

Only meaningful for geospatial contexts.

Popular methods of Rectangle

  • getMaxX
    The right edge of the X coordinate.
  • getMaxY
    The top edge of the Y coordinate.
  • getMinX
    The left edge of the X coordinate.
  • getMinY
    The bottom edge of the Y coordinate.
  • reset
    Expert: Resets the state of this shape given the arguments. This is a performance feature to avoid e
  • getArea
  • getCenter
  • getWidth
    The width. In geospatial contexts, this is generally in degrees longitude and is aware of the dateli
  • relate
  • getHeight
    The height. In geospatial contexts, this is in degrees latitude. It will always be >= 0.
  • getPerimeter
  • hasArea
  • getPerimeter,
  • hasArea,
  • isEmpty,
  • relateXRange,
  • relateYRange

Popular classes and methods

  • getApplicationContext (Context)
  • getContentResolver (Context)
  • requestLocationUpdates (LocationManager)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Component (java.awt)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • JTable (javax.swing)

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)