title: Realm filter CLLocation
body: <p>I have warpper class for CLLoaction</p>
  
  <p><strong>Wrapper</strong></p>
  
  <pre><code>class Location: Object {
      dynamic var long: Double = 0
      dynamic var lat: Double = 0
  }
  </code></pre>
  
  <p>I have to filter stored <code>Location</code> for those which are in 1km radius based on my current location. I thought NSPredicate with block would do the job, but realm doesn't support it. So my question is how other way I can achieve it?
  Of course I could do something like this:</p>
  
  <pre><code>let locations = realm.objects(Location)
  var locationsInRadius = [Location]()
  for l in locations {
      let location = CLLocation(latitude: l.lat, longitude: l.long)
      if (location.distanceFromLocation(currentLocation) &lt; radius){
          locationsInRadius.append(l)
      }
  }
  </code></pre>
  
  <p>But it feels wrong according to whole realm concept of filters.</p>