For IntelliJ IDEA,
Android Studio or Eclipse



private void myMethod () {}
/** * 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(); }
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; }
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);
if (!enclosingBox.getCrossesDateLine() && !r.getCrossesDateLine()) { return super.relateRectanglePhase2(r, bboxSect);
/** * 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(); }
if (!bbox.getCrossesDateLine()) {
fields[++idx] = new Field(field_xdl, bbox.getCrossesDateLine()?"T":"F", xdlFieldType);
if (!bbox.getCrossesDateLine()) {
/** * 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(); }
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; }
fields[++idx] = new Field(field_xdl, bbox.getCrossesDateLine()?"T":"F", xdlFieldType);
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);
if (!enclosingBox.getCrossesDateLine() && !r.getCrossesDateLine()) { return super.relateRectanglePhase2(r, bboxSect);
if (!bbox.getCrossesDateLine()) {