增加查询条件，限制返回结果指定字段值的位置与给定地理位置临近。

        :param key: 查询条件字段名
        :param point: 需要查询的地理位置
        :rtype: Query
548541
def near(self, key, point):
        
        if point is None:
            raise ValueError('near query does not accept None')

        self._add_condition(key, '$nearSphere', point)
        return self
1325728
def query(cls, file, offset=None, limit=None, api=None):
        
        api = api if api else cls._API

        file = Transform.to_file(file)
        return super(Marker, cls)._query(
            url=cls._URL['query'], offset=offset, limit=limit,
            file=file, fields='_all', api=api
        )
75043
def subpoint(query_point, a=A, b=B):
    """"""
    x, y, z = query_point

    lat = geodetic_lat(query_point)
    lon = np.arctan2(y, x)
    e2_ = (a * a - b * b) / (a * a)
    n__ = a / np.sqrt(1 - e2_ * np.sin(lat)**2)
    nx_ = n__ * np.cos(lat) * np.cos(lon)
    ny_ = n__ * np.cos(lat) * np.sin(lon)
    nz_ = (1 - e2_) * n__ * np.sin(lat)

    return np.stack([nx_, ny_, nz_], axis=0)
1202702
function geocode(point, options, _callback, _errorCallback) {
  let promise;
  let cb_resolve, cb_reject;

  var addr = settings.GEOCODEHOST;
  addr += "?point=" + +point[0] + "," + +point[1];

  if (typeof options == "function") {
    _errorCallback = _callback;
    _callback = options;
    options = {};
  }

  options = {
    lang: "en",
    seq: 0,
    ...(options || {})
  };

  if (options.seq) {
    addr += "&seq=" + +options.seq;
  }
  if (options.lang) {
    addr += "&lng=" + options.lang;
  }

  if (typeof Promise != "undefined") {
    promise = new Promise((resolve, reject) => {
      cb_resolve = resolve;
      cb_reject = reject;
    });
  } else {
    cb_resolve = cb_reject = () => {};
  }

  const callback = geojson => {
    cb_resolve(geojson);
    _callback && _callback(geojson);
  };

  const errorCallback = geojson => {
    cb_reject(geojson);
    _errorCallback && _errorCallback(geojson);
  };

  settings.load(addr, json => callback(json), err => errorCallback(err));

  return promise;
}
313885
def then_the_return_element_have_no_key(context, line, key):
    
    line = int(line)
    data = context.apiRequest.data
    assert 0 <= line < len(data)
    assert key not in data[line]
476298
def set_set_point(self, param):
        
        if self.temperature_low_limit <= param <= self.temperature_high_limit:
            self.set_point_temperature = param
        return ""
1180864
def read_point_prop(self, device_name, point):
        
        with open("%s.bin" % device_name, "rb") as file:
            return pickle.load(file)["points"][point]
825785
def add_point(self, name, value, **attrs):
        
        return Points(self.requester).create(self.id, name, value, **attrs)
970653
def matches_key_in_query(self, key, query_key, query):
        
        dumped = query.dump()
        dumped['className'] = query._query_class._class_name
        self._add_condition(key, '$select', {'key': query_key, 'query': dumped})
        return self
900144
def removePoint(self, point, preserveCurve=False):
        
        if not isinstance(point, int):
            point = self.points.index(point)
        point = normalizers.normalizeIndex(point)
        if point >= self._len__points():
            raise ValueError("No point located at index %d." % point)
        preserveCurve = normalizers.normalizeBoolean(preserveCurve)
        self._removePoint(point, preserveCurve)
300361
def set_key(key, value, host=None, port=None, db=None, password=None):
    '''
    
    '''
    server = _connect(host, port, db, password)
    return server.set(key, value)
828154
public QueryParameters set(String key, Object value, Integer type, Direction direction, Integer position) {
        this.updateValue(key, value);
        this.updateType(key, type);
        this.updateDirection(key, direction);
        this.updatePosition(key, position);

        return this;
    }
65391
def get_point_id(self, p, char_length):
        
        print('Checking point', p)
        # TODO: This search loop NEEDS to be replaced with something sane
        index = -1
        for nr, i in enumerate(self.Points):
            if(np.all(i == p)):
                print('Point already in list at index {0}'.format(nr))
                if self.Charlengths[nr] > char_length:
                    print('Updating characteristic length')
                    self.Charlengths[nr] = char_length
                return nr

        if(index == -1):
            print('adding point:', p)
            self.Points.append(p)
            self.Charlengths.append(char_length)
            return len(self.Points) - 1
8203
def query_key(path)
      i = 0
      path.map do |v|
        i += 1
        if i != 1
          "[#{v}]"
        else
          v
        end
      end.join('')
    end
1372868
def key(self, key, strictkey=None):
        
        return self._select(self._pointer.key(key, strictkey))
1105634
def from_point(cls, point):
        
        return cls(point.latitude, point.longitude, point.altitude)
743214
function addPointToDomain( point, x, y, domainId ){

        var domain = domains[ domainId ];
        var newPoint = {
            value: point,
            x: x,
            y: y,
            identifier: domain.identifier,
            domainId: domainId
        };

        pointsHash[ x + '_' + y ] = {
            value: point,
            identifier: domain.identifier,
            domainId: domainId
        };

        domain.points.push( newPoint );
    }